[Dovecot] maildir quota divergence
Hello;
We are using maildir quotas and have found differences in many users in respect to what system command are showing and doveadm quotas.
For example, four user test, we have:
doveadm quota get -u test Quota name Type Value Limit % STORAGE 98066 102400 95 MESSAGE 883
0
But if we check user mail_location with "du" system command we get he is using 70458 Kb.
We are running dovecot 2.1.17
¿any clue?
Thanks in advance.
An addition. It might be related to a recent upgrade from 2.0 branch to 2.1.17
Thanks in advance.
El 27/02/2014 14:12, Juan Carlos Sanchez escribió:
Hello;
We are using maildir quotas and have found differences in many users in respect to what system command are showing and doveadm quotas.
For example, four user test, we have:
doveadm quota get -u test Quota name Type Value Limit % STORAGE 98066 102400 95 MESSAGE 883
0
But if we check user mail_location with "du" system command we get he is using 70458 Kb.
We are running dovecot 2.1.17
¿any clue?
Thanks in advance.
--
Juan Carlos Sanchez Hernandez Responsable de Seguridad y Correo Electronico Servicio de Planificacion Informatica y Comunicaciones Universidad Politecnica de Madrid Rectorado Avda. Ramiro de Maeztu 7 28040 Madrid
Finally have found there is no divergence really. We are using zlib to compress mail, so the difference comes from that, as doveadm is calculating quotas with the original size of messages while system commands see the "real" compressed size.
Best regards.
El 27/02/2014 14:27, Juan Carlos Sanchez escribió:
An addition. It might be related to a recent upgrade from 2.0 branch to 2.1.17
Thanks in advance.
El 27/02/2014 14:12, Juan Carlos Sanchez escribió:
Hello;
We are using maildir quotas and have found differences in many users in respect to what system command are showing and doveadm quotas.
For example, four user test, we have:
doveadm quota get -u test Quota name Type Value Limit % STORAGE 98066 102400 95 MESSAGE 883
0
But if we check user mail_location with "du" system command we get he is using 70458 Kb.
We are running dovecot 2.1.17
¿any clue?
Thanks in advance.
--
Juan Carlos Sanchez Hernandez Responsable de Seguridad y Correo Electronico Servicio de Planificacion Informatica y Comunicaciones Universidad Politecnica de Madrid Rectorado Avda. Ramiro de Maeztu 7 28040 Madrid
On Thu Feb 27 14:12:19 2014, Juan Carlos Sanchez wrote:
We are using maildir quotas and have found differences in many users in respect to what system command are showing and doveadm quotas.
For example, four user test, we have:
doveadm quota get -u test Quota name Type Value Limit % STORAGE 98066 102400 95 MESSAGE 883 - 0
But if we check user mail_location with "du" system command we get he is using 70458 Kb.
We are running dovecot 2.1.17
¿any clue?
Please show us your doveconf -n.
There are a lot of possibilities, it can even be correct (if you use dbox and the user makes lots of copies of his mails).
Yours Jost Krieger
| Jost.Krieger+sig@ruhr-uni-bochum.de Please help stamp out spam! | | Postmaster, JAPH, resident answer machine at RUB Comp. Center | | Sincere words are not sweet, sweet words are not sincere. | | Lao Tse, Tao Te King 81 |
Here it goes....
# 2.1.17: /usr/local/etc/dovecot/dovecot.conf # OS: SunOS 5.10 sun4u ufs auth_cache_negative_ttl = 0 auth_cache_size = 1000 k auth_cache_ttl = 2 hours auth_master_user_separator = * auth_verbose = yes base_dir = /var/run/dovecot disable_plaintext_auth = no info_log_path = /var/log/mail/dovecot_info.log log_path = /var/log/mail/dovecot.log mail_gid = vmail mail_location = maildir:/buzones/%1Mn/%n/correo mail_plugins = quota mail_privileged_group = mail mail_uid = vmail managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date namespace inbox { inbox = yes location = mailbox Sent { auto = subscribe special_use = \Sent } mailbox Trash { auto = subscribe special_use = \Trash } prefix = } passdb { args = /path_here/file driver = passwd-file master = yes pass = yes } passdb { args = /usr/local/etc/dovecot-ldap.conf driver = ldap } plugin { quota = maildir quota_rule = *:storage=100M quota_rule2 = Trash:storage=+20M quota_rule3 = SPAM:ignore quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=80%% quota-warning 80 %u sieve = ~/.dovecot.sieve sieve_global_dir = /path_here/ zlib_save = gz zlib_save_level = 6 } protocols = imap pop3 sieve lmtp service anvil { client_limit = 4611 } service auth { client_limit = 10852 unix_listener auth-client { mode = 0660 } unix_listener auth-master { mode = 0666 } unix_listener auth-userdb { mode = 0777 } user = root } service imap-login { process_min_avail = 4 service_count = 0 } service imap { process_limit = 4096 } service lmtp { client_limit = 50 executable = lmtp -L process_min_avail = 20 unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } user = vmail } service managesieve-login { inet_listener sieve_deprecated { port = 2000 } process_limit = 1024 } service managesieve { process_limit = 1536 } service pop3-login { process_limit = 1024 } service pop3 { process_limit = 1536 } service quota-warning { executable = script /usr/local/bin/quota-warning.sh user = vmail } ssl_ca =
Please show us your doveconf -n.
--
Juan Carlos Sanchez Hernandez Responsable de Seguridad y Correo Electronico Servicio de Planificacion Informatica y Comunicaciones Universidad Politecnica de Madrid Rectorado Avda. Ramiro de Maeztu 7 28040 Madrid
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Juan Carlos Sanchez wrote:
Hello;
We are using maildir quotas and have found differences in many users in respect to what system command are showing and doveadm quotas.
For example, four user test, we have:
doveadm quota get -u test Quota name Type Value Limit % STORAGE 98066 102400 95 MESSAGE 883 - 0
But if we check user mail_location with "du" system command we get he is using 70458 Kb.
We are running dovecot 2.1.17
¿any clue?
Did you already tried: doveadm quota recalc -u user?
Did you started "du" right in Maildir? Use:
cd .../Maildir du -cs cur new .*/{cur,new}
in order to count message files only.
You do not seem to have activated the hardlink feature. If you did, you need to count each link, too.
untested size in KB:
find cur new .*/{cur,new} -type f -printf '%k\n' |
awk ' END { print n } { n=n+$1 } '
Steffen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with undefined - http://www.enigmail.net/
iQEVAwUBUw9kiHD1/YhP6VMHAQLh7Af/U4gqXDaE/9wJOdp/KvpIX9CvJIUPuX8L Is/iAS2U/vLbZgh2o26NIsOfd+4cr+uR1OIrtPeUjDkvxFL17qo4SaZf0Sn8TTX5 BVX2b2OG1M6k+cxRmt+mV3UeRAzvzSoKUIhXTju7QbwcIG/SL1w8pCyLrBPIK0w1 O7sPl+eR2cF9cvY5M1pmfb+CBc/p1djn2bkeOT4lZf8BjRSqTxUbNP7HXIT9743A vGBjCi7HsDSKHK4EaDlmtgsH3q9L5MtJQzL0ScDEcghzedhfsk4vf/96ipmhnfAQ dXuBgWrztaNyNKxpg0IkHWlA7nUS9IWLEz6EjHG17yxuI/jRhHEnLQ== =9aHd -----END PGP SIGNATURE-----
participants (3)
-
Jost Krieger
-
Juan Carlos Sanchez
-
Steffen