On Wed, 2011-11-09 at 14:59 +0200, Adrian M wrote: > Hello list, > I believe I found a bug with quota. > The dovecot quota replies with incorrect values when the mailbox is above 2GB. > > du -ks returns 2005764bytes > > dovecot IMAP on the same user/directory: > 1 getquotaroot inbox > * QUOTAROOT "INBOX" "user" > * QUOTA "user" (STORAGE 1096 2000000)* QUOTAROOT "INBOX" "user" > * QUOTA "user" (STORAGE 1096 2000000) > 1 OK Getquotaroot completed.
So it wraps. > dovecot.conf: > dict { > quotadict= mysql:/etc/dovecot/dovecot-dict-quota.conf > } > plugin { > quota = dict:user::proxy::quotadict > } > > dovecot-dict-quota.conf : > user_query = SELECT '/home/%d/%n' as home, 'maildir:/home/%d/%n' as > mail, 150 AS uid, 8 AS gid, CONCAT('*:bytes=', CAST(quota AS CHAR)) AS > quota_rule FROM mailbox WHERE username = '%u' AND active = '1' This is dovecot-sql.conf, not dovecot-dict-quota.conf (or alternatively you've named them in a "wrong" way). Anyway, here's a guess: the quota is stored in mysql in "integer", which has a maximum value of 2 GB. Actually looks like Dovecot wiki pages also use "integer". Replace that with "bigint" and recalculate quota and it should work.