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=10000MTry also temporarily disabling quota2 to see if it somehow confuses Dovecot?
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.Fixed: http://hg.dovecot.org/dovecot-1.2/rev/e5f3bd280210
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. > > Fixed: http://hg.dovecot.org/dovecot-1.2/rev/e5f3bd280210thanks, 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