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