[Dovecot] quota error dovecot 1.1.13

Mikkel mikkel at euro123.dk
Wed Oct 14 15:13:43 EEST 2009


Brightblade skrev:
> Hi all,
> 
> I've troubles with dovecot and quota. Sometimes mails to users are bounced because quota is full. I'm reading quota_rules from LDAP. One "du -h ." from maildir show user is under quota ( at 70 % more or less), less than 99%, i delete maildirsize and dovecot recreate it with ldap-quota value at first line and second line is current-quota mails. Current-quota is near quota max value so dovecot execute quota_warning (99%).
> Why is dovecot thinking quota is at 99% when du -h show me its value is near 70% ? any guess?

You should read the file named "maildirsize" in the specific user's homedir.
I'll tell you whether this is caused by a wrong interpretation of your 
ldap values or whether dovecot didn't count the usage right.


The first line in the maildirsize file tells what values it got from the 
  database and the subsequent lines are counting the actual usage. 
Comparing the values on the first line to your ldap database is the 
first thing you should do.


Getting what dovecot considers the actual usage from the maildirsize 
file requires that you know how it works. One in a while dovecot saves 
the current usage to the second line of the maildirsize file. Then 
afterwards every time the there is a change (mail arrives or is deleted) 
one line showing that change is appended to the file.
When a certain limit is reached all the lines are summed together and 
the second line of the file is updates (while all subsequent lines are 
deleted).

This means that just reading the second line of the file will give you a 
pretty good indication of whether dovecot has counted the usage correctly.

If dovecot has made an error just delete the maildirsize which will 
cause dovecot to recount the usage.


Regards, Mikkel


More information about the dovecot mailing list