hi, I've used dovecot 1.1.16 but after upgrade to dovecot 1.2.4 per-user ldap quotas stoped working. My configuration: # 1.2.4: /etc/dovecot.conf # OS: Linux 2.6.18-128.7.1.el5xen x86_64 CentOS release 5.3 (Final) ext3 protocols: imap imaps pop3 pop3s managesieve listen(default): *, [::] listen(imap): *, [::] listen(pop3): *, [::] listen(managesieve): *:20000 login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login login_executable(managesieve): /usr/libexec/dovecot/managesieve-login login_greeting: Server ready. login_process_per_connection: no verbose_proctitle: yes first_valid_uid: 1 first_valid_gid: 90 last_valid_gid: 400 mail_privileged_group: mail mail_location: maildir:/home/%u/Maildir:INDEX=MEMORY:CONTROL=/conf/no-quotas/control/%u mail_debug: yes mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_executable(managesieve): /usr/libexec/dovecot/managesieve mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib64/dovecot/imap mail_plugin_dir(imap): /usr/lib64/dovecot/imap mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3 mail_plugin_dir(managesieve): /usr/lib64/dovecot/managesieve imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(pop3): imap_client_workarounds(managesieve): pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh pop3_client_workarounds(managesieve): lda: postmaster_address: postmaster at example.com mail_plugins: quota sieve auth_socket_path: /var/run/dovecot/auth-master auth default: debug: yes passdb: driver: ldap args: /etc/dovecot-ldap.conf userdb: driver: ldap args: /etc/dovecot-ldap.conf socket: type: listen master: path: /var/run/dovecot/auth-master mode: 511 plugin: quota: maildir trash: /etc/dovecot-trash.conf sieve: ~/.dovecot.sieve sieve_dir: ~/sieve sieve_extensions: +imapflags +notify dovecot-ldap.conf: hosts = ldap.example.com auth_bind = yes base = ou=people, dc=example, dc=com scope = subtree user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid,telephoneNumber=quota_rule=*:storage=%$M user_filter = (&(objectClass=posixAccount)(uid=%u)) pass_attrs = uid=user,userPassword=password pass_filter = (&(objectClass=posixAccount)(uid=%u)(!(shadowExpire=*))) default_pass_scheme = CRYPT Imap shows correct quota, but dovecot lda doesn't reject mail and it gets overquota, maildirsize: 15728640S 28033743 4 If I add for example quota_rule = *:storage=20M to dovecot.conf it works, but I need per-user ldap quotas. It seems dovecot deliver ignores maildirsize.
On Thu, 2009-09-10 at 12:55 +0300, Justinas Samas wrote:> user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid,telephoneNumber=quota_rule=*:storage=%$M..> Imap shows correct quota, but dovecot lda doesn't reject mail and it > gets overquota, maildirsize:I guess this is caused by two things: 1) You're not calling deliver with -d parameter, so it never does the LDAP lookup to find out quota_rule. 2) Bug in v1.2 that I just fixed: http://hg.dovecot.org/dovecot-1.2/rev/fe063e0d7109 Note that if you fix this by applying the patch (or waiting for v1.2.5 which I hope comes today) deliver will use those quota limits that are in maildirsize file. So if you change user's quota he/she needs to log in with imap/pop before the change is written to maildirsize and visible to deliver. -------------- 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/20090913/240e9959/attachment-0002.bin>
thanks, with dovecot 1.2.5 everything works perfectly! On Mon, Sep 14, 2009 at 3:46 AM, Timo Sirainen <tss at iki.fi> wrote:> On Thu, 2009-09-10 at 12:55 +0300, Justinas Samas wrote: >> user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid,telephoneNumber=quota_rule=*:storage=%$M > .. >> Imap shows correct quota, but dovecot lda doesn't reject mail and it >> gets overquota, maildirsize: > > I guess this is caused by two things: > > 1) You're not calling deliver with -d parameter, so it never does the > LDAP lookup to find out quota_rule. > > 2) Bug in v1.2 that I just fixed: > http://hg.dovecot.org/dovecot-1.2/rev/fe063e0d7109 > > Note that if you fix this by applying the patch (or waiting for v1.2.5 > which I hope comes today) deliver will use those quota limits that are > in maildirsize file. So if you change user's quota he/she needs to log > in with imap/pop before the change is written to maildirsize and visible > to deliver. >
Timo Sirainen a ?crit :> On Thu, 2009-09-10 at 12:55 +0300, Justinas Samas wrote: > >> user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid,telephoneNumber=quota_rule=*:storage=%$M >> > .. > >> Imap shows correct quota, but dovecot lda doesn't reject mail and it >> gets overquota, maildirsize: >> > > I guess this is caused by two things: > > 1) You're not calling deliver with -d parameter, so it never does the > LDAP lookup to find out quota_rule. > > 2) Bug in v1.2 that I just fixed: > http://hg.dovecot.org/dovecot-1.2/rev/fe063e0d7109 > > Note that if you fix this by applying the patch (or waiting for v1.2.5 > which I hope comes today) deliver will use those quota limits that are > in maildirsize file. So if you change user's quota he/she needs to log > in with imap/pop before the change is written to maildirsize and visible > to deliver. >Hello, I have the same issue, when i upgrade to 1.2.5 the quota per user work only if i remove the directive quota_rule=*:storage=2G I set this rules as default for all my users except for 3 users. The imap_quota report perfectly the quota but dovecot lda take the quota_rule, per user quota not apply. /dovecot -n /: # 1.2.5: /etc/dovecot/dovecot.conf # OS: Linux 2.6.22-2-686 i686 Debian squeeze/sid log_path: /var/log/dovecot.log log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps managesieve listen(default): *:143 listen(imap): *:143 listen(managesieve): *:2000 ssl_listen(default): *:993 ssl_listen(imap): *:993 ssl_listen(managesieve): ssl_cert_file: /etc/ssl/CA/imapcert.pem ssl_key_file: /etc/ssl/CA/imapkey.pem login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(managesieve): /usr/lib/dovecot/managesieve-login login_process_size: 32 login_processes_count: 1 login_max_processes_count: 256 mail_access_groups: mail mail_location: maildir:~/Maildir mail_debug: yes maildir_copy_preserve_filename: yes mbox_write_locks: fcntl dotlock mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugins(default): quota imap_quota zlib fts fts_squat mail_plugins(imap): quota imap_quota zlib fts fts_squat mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve lda: postmaster_address: mail at mydomain.com mail_plugins: sieve quota auth default: mechanisms: plain login passdb: driver: ldap args: /etc/dovecot/dovecot-ldap.conf userdb: driver: prefetch userdb: driver: ldap args: /etc/dovecot/dovecot-ldap.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix socket: type: listen master: path: /var/run/dovecot/auth-master mode: 384 plugin: quota: maildir:User Quota ##(quota_rule=*:storage=2G) --> don't work sieve: ~/.dovecot.sieve sieve_dir: ~/sieve sieve_extensions: +imapflags fts: squat fts_squat: partial=4 full=10 //etc/dovecot/dovecot-ldap.conf/ hosts = localhost auth_bind = yes ldap_version = 3 base = ou=people,dc=example,dc=com scope = subtree user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid,mailuserquota=quota_rule=*:storage=%$ user_filter = (&(objectClass=posixAccount)(mailenable=OK)(uid=%u)) pass_attrs = uid=user,userPassword=password pass_filter = (&(objectClass=posixAccount)(mailenable=OK)(uid=%u)) default_pass_scheme = CRYPT
Timo Sirainen a ?crit :> On Thu, 2009-09-10 at 12:55 +0300, Justinas Samas wrote: > >> user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid,telephoneNumber=quota_rule=*:storage=%$M >> > .. > >> Imap shows correct quota, but dovecot lda doesn't reject mail and it >> gets overquota, maildirsize: >> > > I guess this is caused by two things: > > 1) You're not calling deliver with -d parameter, so it never does the > LDAP lookup to find out quota_rule. > > 2) Bug in v1.2 that I just fixed: > http://hg.dovecot.org/dovecot-1.2/rev/fe063e0d7109 > > Note that if you fix this by applying the patch (or waiting for v1.2.5 > which I hope comes today) deliver will use those quota limits that are > in maildirsize file. So if you change user's quota he/she needs to log > in with imap/pop before the change is written to maildirsize and visible > to deliver. >Hello, I have the same issue, when i upgrade to 1.2.5 the quota per user work only if i remove the directive quota_rule=*:storage=2G I set this rules as default for all my users except for 3 users. The imap_quota report perfectly the quota but dovecot lda take the quota_rule, per user quota not apply. /dovecot -n /: # 1.2.5: /etc/dovecot/dovecot.conf # OS: Linux 2.6.22-2-686 i686 Debian squeeze/sid log_path: /var/log/dovecot.log log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps managesieve listen(default): *:143 listen(imap): *:143 listen(managesieve): *:2000 ssl_listen(default): *:993 ssl_listen(imap): *:993 ssl_listen(managesieve): ssl_cert_file: /etc/ssl/CA/imapcert.pem ssl_key_file: /etc/ssl/CA/imapkey.pem login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(managesieve): /usr/lib/dovecot/managesieve-login login_process_size: 32 login_processes_count: 1 login_max_processes_count: 256 mail_access_groups: mail mail_location: maildir:~/Maildir mail_debug: yes maildir_copy_preserve_filename: yes mbox_write_locks: fcntl dotlock mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugins(default): quota imap_quota zlib fts fts_squat mail_plugins(imap): quota imap_quota zlib fts fts_squat mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve lda: postmaster_address: mail at mydomain.com mail_plugins: sieve quota auth default: mechanisms: plain login passdb: driver: ldap args: /etc/dovecot/dovecot-ldap.conf userdb: driver: prefetch userdb: driver: ldap args: /etc/dovecot/dovecot-ldap.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix socket: type: listen master: path: /var/run/dovecot/auth-master mode: 384 plugin: quota: maildir:User Quota ##(quota_rule=*:storage=2G) --> don't work sieve: ~/.dovecot.sieve sieve_dir: ~/sieve sieve_extensions: +imapflags fts: squat fts_squat: partial=4 full=10 //etc/dovecot/dovecot-ldap.conf/ hosts = localhost auth_bind = yes ldap_version = 3 base = ou=people,dc=example,dc=com scope = subtree user_attrs = homeDirectory=home,uidNumber=uid,gidNumber=gid,mailuserquota=quota_rule=*:storage=%$ user_filter = (&(objectClass=posixAccount)(mailenable=OK)(uid=%u)) pass_attrs = uid=user,userPassword=password pass_filter = (&(objectClass=posixAccount)(mailenable=OK)(uid=%u)) default_pass_scheme = CRYPT