[Dovecot] Quota bug in deliver?
Hi,
I may be wrong, but I suspect a bug in dovecot deliver when using
quotas.
I've put some mails into a mailbox and then reduced the quota, to
have the mailbox be over quota - here's the quota informaiton:
[...]
2 getquotaroot INBOX
- QUOTAROOT "INBOX" ""
- QUOTA "" (STORAGE 880 5) 2 OK Getquotaroot completed. [...]
When I have a setup with quotas only in the database, everything
works as expected and deliver denies the message:
Sep 5 21:50:14 ms4 deliver(postfach@email5.former03.local):
msgid=20070905195014.9D874239C007@ms4.srv.hoster03.de: save failed
to INBOX: Quota exceed
ed
Sep 5 21:50:14 ms4 deliver(postfach@email5.former03.local):
msgid=20070905195014.9D874239C007@ms4.srv.hoster03.de: Rejected:
Quota exceeded
When I put a standard quota into the config as follows, the delivery
succeeds (apparently deliver checks the standard quota, while IMAP
correctly checks the quota from the database if it is returned.
Sep 5 21:46:11 ms4 deliver(postfach@email5.former03.local):
msgid=20070905194611.9FE49239C007@ms4.srv.hoster03.de: saved mail
to INBOX
The mailbox is still over quota here, but deliver does not seem to
notice.
== standard quota in the config plugin { quota = maildir:storage=102400:messages=1000 [...] }
In case I've overlooked something, please let me know. Otherwise let
me know if you need some more information.
Baltasar
_____ FORMER 03 GmbH _____ www.former03.de _____ fon 089.322112.0
bc> When I put a standard quota into the config as follows, the bc> delivery succeeds (apparently deliver checks the standard quota, bc> while IMAP correctly checks the quota from the database if it is bc> returned. Sep 5 21:46:11 ms4
bc> The mailbox is still over quota here, but deliver does not seem to bc> notice.
I recently debugged that situation in my own configuration. Are you using prefetches for your user query?
If you are using prefetch for your userdb lookups, you still need a separate user query to be used by deliver (it doesn't do the password query). The wiki pages show a configuration for keeping the prefetch for IMAP but having a user query for deliver. I don't know if that works since I simply got rid of my prefetch completely and moved on to a different problem when that cured it. (I plan to try to put the prefetch back in later when I get some spare time.)
bill-dovecot@carpenter.ORG (WJCarpenter) PGP 0x91865119 38 95 1B 69 C9 C6 3D 25 73 46 32 04 69 D6 ED F3
Hi,
On 05.09.2007, at 22:19, WJCarpenter wrote:
bc> When I put a standard quota into the config as follows, the bc> delivery succeeds (apparently deliver checks the standard quota, bc> while IMAP correctly checks the quota from the database if it is bc> returned. Sep 5 21:46:11 ms4
bc> The mailbox is still over quota here, but deliver does not seem to bc> notice.
I recently debugged that situation in my own configuration. Are you using prefetches for your user query?
If you are using prefetch for your userdb lookups, you still need a separate user query to be used by deliver (it doesn't do the password query). The wiki pages show a configuration for keeping the prefetch for IMAP but having a user query for deliver. I don't know if that works since I simply got rid of my prefetch completely and moved on to a different problem when that cured it. (I plan to try to put the prefetch back in later when I get some spare time.)
I do use prefetch, I have an separate query, too. Without that the
quota fails completely.
Having both statements and prefetch, the quota works fine with IMAP
and deliver when I have no quota line in the plugin section, when I
add the line (see !!MARK!! below), the deliver takes the quota from
that line instead of the database information. IMAP uses the
information from the database all the time, no matter if I have a
quota line in the config.
### SNIP /etc/dovecot/dovecot.conf protocol imap { mail_plugins = quota trash imap_quota }
protocol pop3 { pop3_uidl_format = %08Xu%08Xv pop3_client_workarounds = outlook-no-nuls oe-ns-eoh }
protocol lda { postmaster_address = postmaster@<mydomain> auth_socket_path = /var/run/dovecot/auth-master mail_plugins = cmusieve quota }
auth default { mechanisms = plain digest-md5 cram-md5 ntlm rpa passdb sql { args = /etc/dovecot/dovecot-sql.conf } userdb prefetch { } userdb sql { args = /etc/dovecot/dovecot-sql.conf } user = _dcauth socket listen { master { path = /var/run/dovecot/auth-master mode = 0600 user = vmail group = mail } } }
plugin {
# !!MARK!!
# deliver seems to use the userdb quota only when I don't have the
following line
quota = maildir:storage=102400:messages=1000
acl = vfile:/etc/dovecot/acls
trash = /etc/dovecot/dovecot-trash.conf
}
### SNIP
_____ FORMER 03 GmbH _____ www.former03.de
FORMER 03 | Baltasar Cevc wrote:
Hi,
On 05.09.2007, at 22:19, WJCarpenter wrote:
bc> When I put a standard quota into the config as follows, the bc> delivery succeeds (apparently deliver checks the standard quota, bc> while IMAP correctly checks the quota from the database if it is bc> returned. Sep 5 21:46:11 ms4
bc> The mailbox is still over quota here, but deliver does not seem to bc> notice.
I recently debugged that situation in my own configuration. Are you using prefetches for your user query?
If you are using prefetch for your userdb lookups, you still need a separate user query to be used by deliver (it doesn't do the password query). The wiki pages show a configuration for keeping the prefetch for IMAP but having a user query for deliver. I don't know if that works since I simply got rid of my prefetch completely and moved on to a different problem when that cured it. (I plan to try to put the prefetch back in later when I get some spare time.)
I do use prefetch, I have an separate query, too. Without that the quota fails completely.
Having both statements and prefetch, the quota works fine with IMAP and deliver when I have no quota line in the plugin section, when I add the line (see !!MARK!! below), the deliver takes the quota from that line instead of the database information. IMAP uses the information from the database all the time, no matter if I have a quota line in the config. [...]
plugin { # !!MARK!! # deliver seems to use the userdb quota only when I don't have the following line quota = maildir:storage=102400:messages=1000 acl = vfile:/etc/dovecot/acls trash = /etc/dovecot/dovecot-trash.conf } I discovered something similar. User's quota from the DB was not used when the user's quota was over the limit of the plugin part. According to the docs the db quota values should always come first before the plugin part but it does not.
Marcin.
On Thu, 6 Sep 2007, Marcin Michal Jessa wrote:
I do use prefetch, I have an separate query, too. Without that the quota fails completely.
Having both statements and prefetch, the quota works fine with IMAP and deliver when I have no quota line in the plugin section, when I add the line (see !!MARK!! below), the deliver takes the quota from that line instead of the database information. IMAP uses the information from the database all the time, no matter if I have a quota line in the config. [...]
plugin { # !!MARK!! # deliver seems to use the userdb quota only when I don't have the following line quota = maildir:storage=102400:messages=1000 acl = vfile:/etc/dovecot/acls trash = /etc/dovecot/dovecot-trash.conf } I discovered something similar. User's quota from the DB was not used when the user's quota was over the limit of the plugin part. According to the docs the db quota values should always come first before the plugin part but it does not.
I think you might be experiencing a bug that Timo recently fixed:
http://www.dovecot.org/list/dovecot/2007-August/025016.html
Right now, it is only available in HG, but should be included in 1.0.4.
-Doug
participants (4)
-
bill-dovecot@carpenter.ORG
-
Doug Council
-
FORMER 03 | Baltasar Cevc
-
Marcin Michal Jessa