Andreas Calvo Gómez
2009-Sep-10 11:13 UTC
[Dovecot] Override quota rules based on mail's content
Hi, I've a mail server with Postfix and Dovecot, using a LDAP backend to get the users. I've also configure quota rules, and I'm able to get the quota from LDAP. But I need the mails that come from the local domain to bypass the quota rule and be delivered to the users' inbox. Is there any way to do that? Information required by Dovecot's mailing list rules: +++ dovecot.conf +++ # 1.1.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.28-15-server x86_64 Ubuntu 9.04 ext4 log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable: /usr/lib/dovecot/imap-login login_user: postfix valid_chroot_dirs: /var/spool/dovecot first_valid_uid: 1000 first_valid_gid: 512 mail_privileged_group: mail mail_location: maildir:/var/spool/dovecot/%n/ mail_plugins: quota imap_quota imap_client_workarounds: delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep auth default: mechanisms: plain login default_realm: esci.es username_format: %Lu passdb: driver: pam passdb: driver: ldap args: /etc/dovecot/dovecot-ldap.conf userdb: driver: prefetch userdb: driver: passwd userdb: driver: ldap args: /etc/dovecot/dovecot-ldap-userdb.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: mail group: mail plugin: quota: maildir:User quota quota_rule: *:storage=50M quota_rule2: Trash:ignore +++ dovecot-ldap.conf +++ hosts = ldap.esci.es auth_bind = yes ldap_version = 3 base = ou=Users, dc=esci, dc=es scope = subtree user_attrs homeDirectory=home,uidNumber=uid,gidNumber=gid,mailQuota=quota_rule=*:storage=%$M user_filter = (&(objectClass=posixAccount)(|(mail=%u)(uid=%u)(uid=%n))) pass_attrs = uid=user,userPassword=password,\ homeDirectory=userdb_home,uidNumber=userdb_uid,gidNumber=userdb_gid,mailQuota=userdb_quota_rule=*:storage=%$M pass_filter = (&(objectClass=posixAccount)(|(mail=%u)(uid=%u))) default_pass_scheme = SSHA Thanks. --------------------- Andreas Calvo G?mez <andreas.calvo at admi.esci.es> Dept. Inform?tica ESCI Pg. Pujades, 1 08003 Barcelona tel. (34) 932954710 ext.233 fax. (34) 932954720 http://www.esci.es --------------------
Timo Sirainen
2009-Sep-10 17:47 UTC
[Dovecot] Override quota rules based on mail's content
On Thu, 2009-09-10 at 13:13 +0200, Andreas Calvo G?mez wrote:> But I need the mails that come from the local domain to bypass the quota > rule and be delivered to the users' inbox. > Is there any way to do that?Create a copy of dovecot.conf that doesn't use quota and use it with deliver -c /etc/dovecot-noquota.conf -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090910/0a0e1640/attachment-0002.bin>
While we're on this subject, Having to maintain two copies of the config file isn't a very elegant solution. Is there a possiblity of perhaps introducing a flag to deliver to instruct it to ignore quote rules?> On Thu, 2009-09-10 at 13:13 +0200, Andreas Calvo G?mez wrote: > >> But I need the mails that come from the local domain to bypass the quota >> rule and be delivered to the users' inbox. >> Is there any way to do that? >> > > Create a copy of dovecot.conf that doesn't use quota and use it with > deliver -c /etc/dovecot-noquota.conf > >
Andreas Calvo Gómez
2009-Sep-14 07:15 UTC
[Dovecot] Override quota rules based on mail's content
Hi, thanks for your quick answer. But, where can I filter the sender and allow the mail to be delivered to the user mailbox? Thanks. --------------------- Andreas Calvo G?mez <andreas.calvo at admi.esci.es> Dept. Inform?tica ESCI Pg. Pujades, 1 08003 Barcelona tel. (34) 932954710 ext.233 fax. (34) 932954720 http://www.esci.es -------------------- El jue, 10-09-2009 a las 13:47 -0400, Timo Sirainen escribi?:> On Thu, 2009-09-10 at 13:13 +0200, Andreas Calvo G?mez wrote: > > But I need the mails that come from the local domain to bypass the quota > > rule and be delivered to the users' inbox. > > Is there any way to do that? > > Create a copy of dovecot.conf that doesn't use quota and use it with > deliver -c /etc/dovecot-noquota.conf >