On Thu, 29 Oct 2009 13:10:37 -0400 Timo Sirainen <tss@iki.fi> wrote:
On Wed, 2009-10-28 at 10:30 +0200, Nikita Koshikov wrote:
The problem that some users have their own quotas stored in ldap.
So the quota_rule should be returned by userdb lookup from ldap, right?
One more clean example. For user koshikov.n@domain.com I change quota in AD to 600M(default user quota is 512M,). After successful login to imap account, maildirsize is(first 2 lines):
629145600S 260658345 5484
So, quota value read from ldap database and applied to user's mailbox. Then I run /usr/sbin/dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh --test:
Info: Loading modules from directory: /usr/lib/dovecot/imap Info: Module loaded: /usr/lib/dovecot/imap/lib10_quota_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib11_trash_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_autocreate_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_expire_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_virtual_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_zlib_plugin.so Info: Quota root: name=Mailbox quota backend=maildir args= Info: Quota rule: root=Mailbox quota mailbox=* bytes=524288000 messages=0 Info: Quota rule: root=Mailbox quota mailbox=Trash bytes=52428800 (10%) messages=0 Info: Quota warning: bytes=471859200 (90%) messages=0 command=/etc/dovecot/plugins/quota_warning.sh 90 Info: expire: pattern=Trash type=expunge secs=2592000 Info: expire: pattern=Spam type=expunge secs=2592000 Info: auth input: quota_rule=*:bytes=629145600 Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/koshikov.n Info: auth input: mail=maildir:~/data Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=~/data Info: maildir++: root=/data/mail/domain.com/koshikov.n/data, index=, control=, inbox=/data/mail/domain.com/koshikov.n/data Info: Namespace: type=private, prefix=Agromat/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=no Info: virtual: data=/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++ Info: maildir++: root=/var/mail/virtual, index=, control=, inbox= Info: Namespace : Using permissions from /data/mail/domain.com/koshikov.n/data: mode=0700 gid=-1 Info: trash plugin: Added 'Trash' with priority 1 Info: trash plugin: Added 'Spam' with priority 2 Info: koshikov.n@domain.com/Spam: seq=1 uid=1933: Expunge Info: koshikov.n@domain.com/Spam: timestamp 1256902423 (Fri Oct 30 13:33:43 2009) -> 1256903611 (Fri Oct 30 13:53:31 2009)
Quota_rule are different from auth section and quota root\rule section. After expire-tool expunges e-mails, the maildirsize file become:
524288000S 260686038 5487
Which is default quota_rule value, not from ldap database.