[Dovecot] Dovecot2 + Quota
Hello!
I need to configure Quota on Roundcubemail with Dovecot2.
So, I did:
90-quota.conf:
SQL backend:
quota = dict:User quota::proxy::sqlquota quota_rule = *:storage=20M:messages=1000 } dict { sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
OK, works! but, My webmail shows me 20M of quota. But on my Postfixadmin I configured 200M.
How can I fix this?
Att;
*Lucas Possamai*
On 2014-01-31 12:41, drum.lucas@gmail.com wrote:
Hello!
I need to configure Quota on Roundcubemail with Dovecot2.
So, I did:
90-quota.conf:
SQL backend:
quota = dict:User quota::proxy::sqlquota quota_rule = *:storage=20M:messages=1000 } dict { sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
OK, works! but, My webmail shows me 20M of quota. But on my Postfixadmin I configured 200M.
How can I fix this?
remove quota_rule
you as shown override postfixadmin with it, still not working ?
i think its explained very well on readmes in postfixadmin
dovecot-sql.conf: driver = mysql connect = host=localhost dbname=mail user=mail password=xxxxxxxxxxxx default_pass_scheme = MD5
user_query = SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n' as mail, 150 AS uid, 12 AS gid, CONCAT('dirsize:storage=', ROUND( mailbox.quota / 1024 ) ) AS quota FROM mailbox WHERE username = '%u' AND active = '1'
password_query = SELECT username as user, password, '/var/vmail/%d/%n' as userdb_home, 'maildir:/var/vmail/%d/%n' as userdb_mail, 150 as userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'
90-quota.conf:
Quota backends
plugin { quota = dict:User quota::proxy::sqlquota } dict { sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext }
Postixadmin config.inc.php:
$CONF['maxquota'] = '0'; $CONF['quota'] = 'YES'; $CONF['quota_multiplier'] = '1024000';
I need quota peer user.
Att;
*Lucas Possamai*
https://www.digitalocean.com/?refcode=25021cb7dbdf
2014-01-31 Benny Pedersen <me@junc.eu>:
On 2014-01-31 12:41, drum.lucas@gmail.com wrote:
Hello!
I need to configure Quota on Roundcubemail with Dovecot2.
So, I did:
90-quota.conf:
SQL backend:
quota = dict:User quota::proxy::sqlquota quota_rule = *:storage=20M:messages=1000 } dict { sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
OK, works! but, My webmail shows me 20M of quota. But on my Postfixadmin I configured 200M.
How can I fix this?
remove quota_rule
you as shown override postfixadmin with it, still not working ?
i think its explained very well on readmes in postfixadmin
On 2014-01-31 13:16, drum.lucas@gmail.com wrote:
dovecot-sql.conf: driver = mysql connect = host=localhost dbname=mail user=mail password=xxxxxxxxxxxx default_pass_scheme = MD5
user_query = SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n' as mail, 150 AS uid, 12 AS gid, CONCAT('dirsize:storage=', ROUND( mailbox.quota / 1024 ) ) AS quota FROM mailbox WHERE username = '%u' AND active = '1'
i have in dovecot v1
dovecot v1 format with postfixadmin quotas
user_query = SELECT concat('/home/vmail/', maildir) AS home, concat('/home/vmail/', maildir) AS maildir, 1002 AS uid, 1002 AS gid, concat('*:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%u'
quotadict is to see used quotas in postfixadmin, damm i know that but forgot it :=)
On 01/31/2014 07:16 AM, drum.lucas@gmail.com wrote:
dovecot-sql.conf: driver = mysql connect = host=localhost dbname=mail user=mail password=xxxxxxxxxxxx default_pass_scheme = MD5
user_query = SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n' as mail, 150 AS uid, 12 AS gid, CONCAT('dirsize:storage=', ROUND( mailbox.quota / 1024 ) ) AS quota FROM mailbox WHERE username = '%u' AND active = '1'
password_query = SELECT username as user, password, '/var/vmail/%d/%n' as userdb_home, 'maildir:/var/vmail/%d/%n' as userdb_mail, 150 as userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1' Your password query returns userdb_ fields, are you using driver = prefetch? http://wiki2.dovecot.org/UserDatabase says: This assumes that the passdb already returned also all the required user database information. Your password query does not return the quota size.
Also as Robert said, the field name returned by the query should be quota_rule and userdb_quota_rule in the password query, and the value so formatted.
Am 31.01.2014 12:41, schrieb drum.lucas@gmail.com:
Hello!
I need to configure Quota on Roundcubemail with Dovecot2.
So, I did:
90-quota.conf:
SQL backend:
quota = dict:User quota::proxy::sqlquota quota_rule = *:storage=20M:messages=1000 } dict { sqlquota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
}
OK, works! but, My webmail shows me 20M of quota. But on my Postfixadmin I configured 200M.
How can I fix this?
what about use something like this in
dovecot-sql.conf.ext
user_query = SELECT concat('/usr/local/virtual/', maildir) AS home, \
concat('*:bytes=', mailbox.quota) AS quota_rule, \
#when saving to Trash mailbox the user gets additional 50MB
"Trash:storage=+50240" AS quota_rule2,
#when saving to Sent mailbox the user gets additional 50MB
"Sent:storage=+50240" AS quota_rule3,
#when saving to Drafts mailbox the user gets additional 50MB
"Drafts:storage=+50240" AS quota_rule4,
#when saving to Templates mailbox the user gets additional 50MB
"Templates:storage=+50240" AS quota_rule5,
#when saving to Junk mailbox the user gets additional 50MB
"Junk:storage=+50240" AS quota_rule6,
#when saving to Archives mailbox the user gets additional 50MB
"Archives:storage=+50240" AS quota_rule7, \
quota rules are not needed to configured here
but something like
concat('*:bytes=', mailbox.quota) AS quota_rule
fits with dovecot, postfixadmin, squirrelmail at my site
Att;
*Lucas Possamai*
Best Regards MfG Robert Schetterer
-- [*] sys4 AG
http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer Aufsichtsratsvorsitzender: Florian Kirstein
participants (4)
-
Benny Pedersen
-
drum.lucas@gmail.com
-
Gedalya
-
Robert Schetterer