[Dovecot] Quotas not recalculating
Hello all --
I have an interesting issue, where the quotas are refusing the recalculate for anyone on my server.
# doveadm quota get -u kyle@averageurl.com Quota name Type Value Limit % storage=540672 STORAGE 0 - 0 storage=540672 MESSAGE 0 - 0 # doveadm quota recalc -u kyle@averageurl.com # doveadm quota get -u kyle@averageurl.com Quota name Type Value Limit % storage=540672 STORAGE 0 - 0 storage=540672 MESSAGE 0 - 0 # du -sh /var/mail/vhosts/averageurl.com/kyle 512M /var/mail/vhosts/averageurl.com/kyle
The IMAP client (Thunderbird) state that the user has no quotas in place at all. Now, if I copy the maildirsize file from another user to this user account, the quotas display in the IMAP client. At this point, however, trying to recalc the quota does nothing.
Any help with this would be appreciated, config below...
--Kyle
# doveconf -n # 2.0.beta6 (3156315704ef): /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-71.29.1.el6.x86_64 x86_64 CentOS Linux release 6.0 (Final) ext4 auth_gssapi_hostname = imap.mail.averageurl.com auth_krb5_keytab = /etc/dovecot/krb5.keytab auth_mechanisms = plain login gssapi digest-md5 cram-md5 first_valid_uid = 502 last_valid_uid = 502 mail_debug = yes mail_location = maildir:/var/mail/vhosts/%d/%n mail_plugins = $mail_plugins quota mbox_write_locks = fcntl passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { quota = maildir:Quota sieve = /var/mail/vhosts/%d/%n/.sieve sieve_dir = /var/mail/vhosts/%d/%n/sieve/ } protocols = imap lmtp sieve service auth { unix_listener auth-userdb { group = mailstore mode = 0660 } } service imap-login { inet_listener imap { port = 143 } inet_listener imaps { port = 993 ssl = yes } } service imap { process_limit = 128 } service lmtp { unix_listener lmtp { mode = 0666 } } service managesieve-login { inet_listener sieve { port = 4190 } process_min_avail = 0 service_count = 1 } ssl_ca = </etc/pki/tls/certs/AverageURL.crt ssl_cert = </etc/pki/dovecot/certs/imap.mail.averageurl.com.crt ssl_key = </etc/pki/dovecot/private/imap.mail.averageurl.com.pem.insecure userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } protocol lda { mail_plugins = $mail_plugins sieve } protocol imap { mail_max_userip_connections = 20 mail_plugins = $mail_plugins imap_quota } protocol lmtp { mail_plugins = $mail_plugins sieve } protocol sieve { mail_max_userip_connections = 2 managesieve_max_line_length = 65536 }
# cat /etc/dovecot/dovecot-sql.conf.ext
driver = mysql
connect = host=/var/lib/mysql/mysql.sock user=<snip> password=<snip>
dbname=<snip>
user_query = SELECT 502 AS uid, 502 AS gid, "/var/mail/vhosts/%d/%n" AS
home, concat("maildir:storage=", floor(m.quota/1024)) AS quota FROM
vmailboxes m, vhosts h WHERE m
.username
= '%n' AND m
.domain
=
h
.UUID
AND h
.vhost
= '%d'
default_pass_scheme = PLAIN
password_query = SELECT aes_decrypt(m
.password
, <snip>) AS password
FROM vmailboxes m, vhosts h WHERE m
.username
= '%n' AND m
.domain
= h
.UUID
AND h
.vhost
= '%d'
On 9/4/2011 1:10 PM, Kyle Brantley wrote:
Hello all --
I have an interesting issue, where the quotas are refusing the recalculate for anyone on my server.
# doveadm quota get -u kyle@averageurl.com Quota name Type Value Limit % storage=540672 STORAGE 0 - 0 storage=540672 MESSAGE 0 - 0 # doveadm quota recalc -u kyle@averageurl.com # doveadm quota get -u kyle@averageurl.com Quota name Type Value Limit % storage=540672 STORAGE 0 - 0 storage=540672 MESSAGE 0 - 0 # du -sh /var/mail/vhosts/averageurl.com/kyle 512M /var/mail/vhosts/averageurl.com/kyle
The IMAP client (Thunderbird) state that the user has no quotas in place at all. Now, if I copy the maildirsize file from another user to this user account, the quotas display in the IMAP client. At this point, however, trying to recalc the quota does nothing.
Any help with this would be appreciated, config below...
--Kyle
<snip>
Okay, something else isn't cooperating with this at all. I reconfigured it to use dirsize just to test (quota = dirsize:User quota in 90-quota.conf instead of quota = maildir:User quota), and it is still trying to use maildir quotas:
Sep 5 01:24:22 serenity dovecot: imap(kyle@averageurl.com): Debug: Effective uid=502, gid=502, home=/var/mail/vhosts/averageurl.com/kyle Sep 5 01:24:22 serenity dovecot: imap(kyle@averageurl.com): Debug: Quota root: name=storage=540672 backend=maildir args=
Relevant postconf -n
changes:
plugin { quota = dirsize:User quota sieve = /var/mail/vhosts/%d/%n/.sieve sieve_dir = /var/mail/vhosts/%d/%n/sieve/ }
Any ideas what is going on would be great.
--Kyle
On 5.9.2011, at 4.28, Kyle Brantley wrote:
Okay, something else isn't cooperating with this at all. I reconfigured it to use dirsize just to test (quota = dirsize:User quota in 90-quota.conf instead of quota = maildir:User quota), and it is still trying to use maildir quotas:
Your user_query in dovecot-sql.conf overrides the quota setting.
On Mon, 5 Sep 2011 08:39:39 +0300, Timo Sirainen wrote:
On 5.9.2011, at 4.28, Kyle Brantley wrote:
Okay, something else isn't cooperating with this at all. I reconfigured it to use dirsize just to test (quota = dirsize:User quota in 90-quota.conf instead of quota = maildir:User quota), and it is still trying to use maildir quotas:
Your user_query in dovecot-sql.conf overrides the quota setting.
Same problem here. But how can I use maildirsize quota && user_query in dovecot-slq.conf ?
I want to manage my users in a sql table and use maildirsize quota.
Greetz, Tobias
On 6.9.2011, at 23.01, Tobias Hachmer wrote:
On Mon, 5 Sep 2011 08:39:39 +0300, Timo Sirainen wrote:
On 5.9.2011, at 4.28, Kyle Brantley wrote:
Okay, something else isn't cooperating with this at all. I reconfigured it to use dirsize just to test (quota = dirsize:User quota in 90-quota.conf instead of quota = maildir:User quota), and it is still trying to use maildir quotas:
Your user_query in dovecot-sql.conf overrides the quota setting.
Same problem here. But how can I use maildirsize quota && user_query in dovecot-slq.conf ?
I want to manage my users in a sql table and use maildirsize quota.
There's nothing special in that. Just about all the examples in wiki assume you want to do that. http://wiki2.dovecot.org/Quota/Configuration#Per-user_quota
On Tue, 6 Sep 2011 23:08:37 +0300, Timo Sirainen wrote:
On 6.9.2011, at 23.01, Tobias Hachmer wrote:
On Mon, 5 Sep 2011 08:39:39 +0300, Timo Sirainen wrote:
On 5.9.2011, at 4.28, Kyle Brantley wrote:
Okay, something else isn't cooperating with this at all. I reconfigured it to use dirsize just to test (quota = dirsize:User quota in 90-quota.conf instead of quota = maildir:User quota), and it is still trying to use maildir quotas:
Your user_query in dovecot-sql.conf overrides the quota setting.
Same problem here. But how can I use maildirsize quota && user_query in dovecot-slq.conf ?
I want to manage my users in a sql table and use maildirsize quota.
There's nothing special in that. Just about all the examples in wiki assume you want to do that. http://wiki2.dovecot.org/Quota/Configuration#Per-user_quota
OK, thanks. Removing "CONCAT('*:bytes=', CAST(quota AS CHAR)) AS
userdb_quota_rule" from user_query as well as from password_query in
dovecot-sql.conf worked for me.
Greetz, Tobias
On 9/6/2011 2:17 PM, Tobias Hachmer wrote:
On Tue, 6 Sep 2011 23:08:37 +0300, Timo Sirainen wrote:
On 6.9.2011, at 23.01, Tobias Hachmer wrote:
On Mon, 5 Sep 2011 08:39:39 +0300, Timo Sirainen wrote:
On 5.9.2011, at 4.28, Kyle Brantley wrote:
Okay, something else isn't cooperating with this at all. I reconfigured it to use dirsize just to test (quota = dirsize:User quota in 90-quota.conf instead of quota = maildir:User quota), and it is still trying to use maildir quotas:
Your user_query in dovecot-sql.conf overrides the quota setting.
Same problem here. But how can I use maildirsize quota && user_query in dovecot-slq.conf ?
I want to manage my users in a sql table and use maildirsize quota.
There's nothing special in that. Just about all the examples in wiki assume you want to do that. http://wiki2.dovecot.org/Quota/Configuration#Per-user_quota
OK, thanks. Removing "CONCAT('*:bytes=', CAST(quota AS CHAR)) AS
userdb_quota_rule" from user_query as well as from password_query in dovecot-sql.conf worked for me.Greetz, Tobias
I was migrating from 1.x to 2.x and manually rebuilt everything with respect to the configs... except for my queries. In my case, luckily, it was as easy as changing the column returned from "quota" to "quota_rule" and replacing the "maildir:storage=" with "*:storage=."
Thanks for the help, all.
--Kyle
participants (3)
-
Kyle Brantley
-
Timo Sirainen
-
Tobias Hachmer