[Dovecot] quota not updated
Hi,
we're using quota with the maildir backend. When new mail arrives, the quota gets updated. But when mail is expunged, quota stays the same (see imap dialog below). We're using the latest version from hg ( 1.2.13 ). Any ideas?
###quota part from dovecot -n
plugin: quota: maildir:User quota quota_rule: *:storage=2000M quota_warning: storage=95%% /usr/local/bin/quota-warning.sh 95 quota_warning2: storage=80%% /usr/local/bin/quota-warning.sh 80 quota2: maildir:Shared quota:ns=shared/ quota2_rule: *:storage=10000M
###imap dialog:
- PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS ACL RIGHTS=texk QUOTA] Logged in as user a01 select INBOX
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk $MDNSent $Forwarded)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk $MDNSent $Forwarded \*)] Flags permitted.
- 15 EXISTS
- 0 RECENT
- OK [UIDVALIDITY 1264203739] UIDs valid
- OK [UIDNEXT 1133] Predicted next UID
- OK [HIGHESTMODSEQ 3543] Highest a01 OK [READ-WRITE] Select completed. a02 getquotaroot INBOX
- QUOTAROOT "INBOX" "User quota"
- QUOTA "User quota" (STORAGE 302485 2048000) a02 OK Getquotaroot completed. a03 store 15 +Flags \Deleted
- 15 FETCH (FLAGS (\Deleted \Seen NonJunk)) a03 OK Store completed. a04 expunge
- 15 EXPUNGE a04 OK Expunge completed. a05 select INBOX
- OK [CLOSED] Previous mailbox closed.
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk $MDNSent $Forwarded)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk $MDNSent $Forwarded \*)] Flags permitted.
- 14 EXISTS
- 0 RECENT
- OK [UIDVALIDITY 1264203739] UIDs valid
- OK [UIDNEXT 1133] Predicted next UID
- OK [HIGHESTMODSEQ 3545] Highest a05 OK [READ-WRITE] Select completed. a06 getquotaroot INBOX
- QUOTAROOT "INBOX" "User quota"
- QUOTA "User quota" (STORAGE 302485 2048000) a06 OK Getquotaroot completed.
Regards, Martin
On Mon, 2010-08-02 at 09:30 +0200, Martin Ott wrote:
Hi,
we're using quota with the maildir backend. When new mail arrives, the quota gets updated. But when mail is expunged, quota stays the same (see imap dialog below). We're using the latest version from hg ( 1.2.13 ). Any ideas?
Anything in logs? What about with mail_debug=yes? Does maildirsize file get changed? Any per-user quota overrides? What if you delete maildirsize file and do GETQUOTAROOT INBOX in IMAP, does it recalculate it correctly?
plugin: quota: maildir:User quota quota_rule: *:storage=2000M quota_warning: storage=95%% /usr/local/bin/quota-warning.sh 95 quota_warning2: storage=80%% /usr/local/bin/quota-warning.sh 80 quota2: maildir:Shared quota:ns=shared/ quota2_rule: *:storage=10000M
Try also temporarily disabling quota2 to see if it somehow confuses Dovecot?
Hi Timo,
thanks for your answer. I triggered the problem down to the lazy_expunge plugin. When I remove lazy_expunge from mail_plugins, quota gets calculated as expected. How can I change the quota_rule, so that only the namespace with prefix INBOX is regarded?
namespace: type: private separator: / prefix: INBOX/ inbox: yes list: yes subscriptions: yes namespace: type: public separator: / prefix: shared/ location: maildir:/var/vmail/public:INDEX=~/public:CONTROL=~/public list: children subscriptions: yes namespace: type: private separator: / prefix: .EXPUNGED/ location: maildir:~/mail/expunged hidden: yes list: no
plugin: quota: maildir:User quota quota_rule: *:storage=2000M quota_warning: storage=95%% /usr/local/bin/quota-warning.sh 95 quota_warning2: storage=80%% /usr/local/bin/quota-warning.sh 80 acl: vfile lazy_expunge: .EXPUNGED/
we're using quota with the maildir backend. When new mail arrives, the quota gets updated. But when mail is expunged, quota stays the same (see imap dialog below). We're using the latest version from hg ( 1.2.13 ). Any ideas?
Anything in logs? What about with mail_debug=yes? Does maildirsize file get changed? Any per-user quota overrides? What if you delete maildirsize file and do GETQUOTAROOT INBOX in IMAP, does it recalculate it correctly?
plugin: quota: maildir:User quota quota_rule: *:storage=2000M quota_warning: storage=95%% /usr/local/bin/quota-warning.sh 95 quota_warning2: storage=80%% /usr/local/bin/quota-warning.sh 80 quota2: maildir:Shared quota:ns=shared/ quota2_rule: *:storage=10000M
Try also temporarily disabling quota2 to see if it somehow confuses Dovecot?
On Mon, 2010-08-02 at 15:34 +0200, Martin Ott wrote:
thanks for your answer. I triggered the problem down to the lazy_expunge plugin. When I remove lazy_expunge from mail_plugins, quota gets calculated as expected. How can I change the quota_rule, so that only the namespace with prefix INBOX is regarded?
namespace: type: private separator: / prefix: INBOX/ .. plugin: quota: maildir:User quota
See if this works:
quota = maildir:User quota:ns=INBOX/
If it doesn't, I guess more code is needed..
Am 02.08.2010 16:39, schrieb Timo Sirainen:
On Mon, 2010-08-02 at 15:34 +0200, Martin Ott wrote:
thanks for your answer. I triggered the problem down to the lazy_expunge plugin. When I remove lazy_expunge from mail_plugins, quota gets calculated as expected. How can I change the quota_rule, so that only the namespace with prefix INBOX is regarded?
namespace: type: private separator: / prefix: INBOX/ .. plugin: quota: maildir:User quota
See if this works:
quota = maildir:User quota:ns=INBOX/
with
quota: maildir:User quota:ns=INBOX/
log says Aug 3 07:43:11 vlmail01 dovecot: IMAP(user): quota maildir: No maildir storages, ignoring quota. Aug 3 07:43:25 vlmail01 dovecot: deliver(user@domain.com): quota maildir: No maildir storages, ignoring quota.
and
- PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS ACL RIGHTS=texk QUOTA] Logged in as mott a getquotaroot INBOX
- QUOTAROOT "INBOX" "User quota"
- QUOTA "User quota" (STORAGE 0 2048000) a OK Getquotaroot completed.
On Tue, 2010-08-03 at 07:47 +0200, Martin Ott wrote:
See if this works:
quota = maildir:User quota:ns=INBOX/
with
quota: maildir:User quota:ns=INBOX/
log says Aug 3 07:43:11 vlmail01 dovecot: IMAP(user): quota maildir: No maildir storages, ignoring quota.
Am 03.08.2010 14:12, schrieb Timo Sirainen:
On Tue, 2010-08-03 at 07:47 +0200, Martin Ott wrote:
See if this works:
quota = maildir:User quota:ns=INBOX/
with
quota: maildir:User quota:ns=INBOX/
log says Aug 3 07:43:11 vlmail01 dovecot: IMAP(user): quota maildir: No maildir storages, ignoring quota.
thanks, the warnings in the log are gone, but when mail is expunged, quota stays the same.
There are no negative values added to maildirsize file when mail is expunged. Should there? When I remove maildirsize file, quota is recalculated correctly.
Martin
On Tue, 2010-08-03 at 14:48 +0200, Martin Ott wrote:
thanks, the warnings in the log are gone, but when mail is expunged, quota stays the same.
There are no negative values added to maildirsize file when mail is expunged. Should there?
Yes. Looks like this works correctly in v2.0. I don't think I'll bother fixing it for v1.2.
participants (2)
-
Martin Ott
-
Timo Sirainen