[Dovecot] Postfixadmin/MySQL/Dovecot 2 and quota

Daniel Parthey d.parthey at metaways.de
Sun Sep 8 16:53:29 EEST 2013


Hi Matt,

sounds like the quota is correctly updated in MySQL, but your roundcube isn't able to fetch quota information via IMAP.

Can you reproduce this via telnet or another IMAP client (e.g. Thunderbird with Quota Display Extension)?

Can you be so kind and post your whole dovecot config (doveconf -n)?

Are there any error messages in your dovecot logs regarding quota?

I think that quota_rule, quota_rule2, quota_rule3 etc. are applied in sequence, so if you only need one quota_rule, then it should be named quota_rule.

Regards
Daniel



Matt <dovecot at mygaia.org> schrieb:
>Hi all,
>
>I'm setting up a new email server based on the softwares list below:
>
>  * Postfix
>  * Dovecot 2.0.9
>  * MySQL
>  * Postfixadmin 2.3.6
>
>My current problem is I'm unsure whether quota feature is well
>configured or not.
>In order to test and validate, I use Roundcubemail GUI which provides
>percentage of the space used by the mailbox (quota should be applied
>per
>mailbox).
>
>Here, my dovecot configuration:
>dovecot.conf:
>dict {
>  quotadict = mysql:/etc/dovecot/dovecot-dict-quota.conf
>}
>
>dovecot-dict-quota.conf:
>connect = host=localhost dbname=postfix user=postfix password=postfix
>map {
>    pattern = priv/quota/storage
>    table = quota2
>    username_field = username
>    value_field = bytes
>}
>map {
>    pattern = priv/quota/messages
>    table = quota2
>    username_field = username
>    value_field = messages
>}
>
>dovecot-sql.conf.ext:
>driver = mysql
>connect = host=localhost dbname=postfix user=postfix password=postfix
>default_pass_scheme = PLAIN-MD5
>password_query = SELECT username AS user, password, \
>    CONCAT('*:storage=', CAST(quota AS CHAR), 'b') AS quota_rule \
>    FROM mailbox WHERE username = '%u' AND active='1'
>user_query = SELECT maildir, 89 AS uid, 12 AS gid, \
>    concat('dict:storage=',floor(quota/1000),'::proxy::quotadict') AS
>quota, \
>    CONCAT('*:storage=', CAST(quota AS CHAR), 'b') AS quota_rule \
>    FROM mailbox WHERE username = '%u' AND active='1'
>
>conf.d/90-quota.conf:
>plugin {
>  quota = dict:user::proxy::quotadict
>  quota_rule2 = Trash:storage=+10%%
>}
>
>conf.d/20-imap.conf:
>protocol imap {
>  mail_plugins = $mail_plugins imap_quota
>}
>
>When I check postfixadmin GUI, I can see that quota in realtime in
>quota2 table, no problem.
>
>But Roundcubemail cannot get this information and shows a unknown
>quota.
>If I add this line:
>  quota_rule = *:storage=1G
>in conf.d/90-quota.conf file, it works, I mean roundcubemail gets and
>shows information (but not the one stored in db of course).
>
>I think I'm close to the right configuration but I need your help to
>complete this setup.
>
>Thank you in advance for your help.
>
>Best,
>Matt


More information about the dovecot mailing list