[Dovecot] (Somewhat urgent) Problem with maildir++ quota
Hi.
I have an strange problem with dovecot's maildir quota and postfix.
I've tested quota and it works fine but sometimes there are users that having their Maildir/ empty, they trigger the "quota exceeded" message when someone sends email to them.
Some config / version info:
### Versions: ii dovecot-common 1:1.0.10-1ubuntu5.1 ii dovecot-imapd 1:1.0.10-1ubuntu5.1 ii dovecot-pop3d 1:1.0.10-1ubuntu5.1
### From dovecot.conf:
(...)
# SQL database
(...)
dict { #quota = mysql:/etc/dovecot-dict-quota.conf }
(...)
plugin { quota = maildir:storage=51200 }
### dovecot-mysql.conf (splitted to be readable): user_query = SELECT maildir, 5000 AS uid, 5000 AS gid, concat('maildir:storage=', floor(quota/1024)) AS quota FROM mailbox WHERE username = '%u' AND active = '1'
### Database "mailbox" record example:
| prueba@domain.com | Password | prueba |
domain.com/prueba/
| 51200000 | domain.com | 2009-02-02 10:01:24 | 2009-02-02 10:07:46
| 1 |
The symptons: users are working nicely, and quota works (If I create a new user and set it a quota of, say, 1MB, I can send him msgs until Maildir reachs 1MB, after that I get "quota exceeded" messages). But sometimes there are users with the Maildir empty that can't receive messages and trigger the "quota exceeded" warning. Users always download messages by POP.
Removing "maildirsize" file in their folder fixes the problem. Also fixes it changing the quota to any value (maildirsize is then removed and recreated after a new message arrives for the user).
Sometime that I don't know if it's strange is that I don't see "removing" messages in the maildirsize file after user downloads messages. I mean that I can't see "-1" lines in maildirsizes:
# cat prueba/maildirsize 51200000S 0 0 615 1 1540 1 11446 1 46085 1 2623 1 21218 1 2815301 1 15110 1 21289 1 18330 1 (and so).
Any idea of what's going on? Shouldn't appear "MSGSIZE -1" lines in maildirsize file to "restore" space in Maildir after POP RETRs?
Currently I'm fixing the problem with a regular:
# find /home/vmail/vhosts -name "maildirsize" -exec rm {} \;
But there must exist a better solution (or maybe my config is wrong).
Thanks a lot for any help.
-- Santiago Romero
Hi.
I found a "mail_plugin" directive under "pop" and "imap" sections in dovecot.conf.
Must the "quota" plugin be referenced there? :?
-- Santiago Romero
Santiago Romero wrote:
Hi.
Hello.
I found a "mail_plugin" directive under "pop" and "imap" sections in dovecot.conf.
Must the "quota" plugin be referenced there? :?
Yes, and you may also need to enforce the quota usage in the delivering process of your mail software or use "deliver" LDA plugin for that define de quota plugin in the LDA section.
Regards
+----------------------------------------------------------------+ | Juan C. Blanco | | | | Centro de Calculo | | | Facultad de Informatica U.P.M. | E-mail: jcblanco@fi.upm.es | | Campus de Montegancedo | | | Boadilla del Monte | Tel.: (+34) 91 336 7466 | | 28660 MADRID (Spain) | Fax : (+34) 91 336 6913 | +----------------------------------------------------------------+
Yes, and you may also need to enforce the quota usage in the delivering process of your mail software or use "deliver" LDA plugin for that define de quota plugin in the LDA section.
I already had that (that's why "quota exceeded" messages where being triggered).
I thought that enabling the plugin there was enough and pop/imap would use it also, but I was wrong :)
Thanks for your answers.
-- Santiago Romero
participants (2)
-
Juan C. Blanco
-
Santiago Romero