[Dovecot] Quota BUG - fixed

Adrian Minta adrian.minta at gmail.com
Thu Nov 10 18:03:14 EET 2011


After some deep investigations I manage to solve the problem. I was only 
reading quota in user_querry. Now I read it in user_querry and in 
password_query and all seems fine:

--dovecot-sql.conf---

user_query = SELECT '/home/%d/%n' as home, 'maildir:/home/%d/%n' as mail, 150 AS uid, 8 AS gid, CONCAT('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%u' AND active = '1'
password_query = SELECT username as user, password, '/home/%d/%n' as userdb_home, 'maildir:/home/%d/%n' as userdb_mail, 150 as userdb_uid, 8 as userdb_gid, CONCAT('*:bytes=', quota) as userdb_quota_rule FROM mailbox WHERE username = '%u' AND active = '1'


--dovecot.conf---

plugin {
     quota = dict:user::proxy::quotadict
     quota_rule2 = Trash:storage=10%%
     quota_rule3 = SPAM:storage=10%%
}


the result is fine now:

2 getquotaroot inbox
* QUOTAROOT "INBOX" "user"
* QUOTA "user" (STORAGE 1997999 2000000)
2 OK Getquotaroot completed.


Only one "cosmetic" bug remains when an empty mailbox appear as a small 
negative number in quota2 table, but this is fixable in postfixadmin.


-- 

Best regards,
Adrian Minta    MA3173-RIPE,www.minta.ro





More information about the dovecot mailing list