[Dovecot] Quota calculation problem with 1.2 beta 4

Wolfgang.Friebel at desy.de Wolfgang.Friebel at desy.de
Thu Apr 2 13:18:26 EEST 2009


On Wed, 1 Apr 2009, Wolfgang.Friebel at desy.de wrote:

> On Wed, 1 Apr 2009, Timo Sirainen wrote:
>
>>> but the IMAP command reported correctly what I also found in the
>>> maildirsize file (in userdb the configured limit was 1000M, his actual
>>> INBOX size was below 600M):
>> 
>> Are you calling deliver with -d parameter? If not, the userdb lookup is
>> not done in that case. If you are, set mail_debug=yes and paste the logs
>> when this happens.
>> 
>
> I did not call deliver with the -d parameter. I just added that right now

Sorry for the trouble. I did recheck that I already had called deliver 
using -d ${recipient}. That seems not to be the problem.

I made several experiments with quota settings and userdb while mail_debug 
was on. Here are my findings:

After changing /etc/userdb and modifying my 
userdb_quota_rule=*:storage=200M with an editor the IMAP GETQUOTAROOT does 
immediately report the changed value. The ~user/Maildir/maildirsize 
content does however not change and according to the maillog output the 
quota calculation is done based on the contents of that file.

If I do delete that file after changing the contents of the users INBOX 
the file gets regenerated with the contents from the quota rule (i.e. 
900MB, see below) and not with the value from the userdb (200M)

If then I do another IMAP GETQUOTAROOT the correct value is reported again 
(200M) and the contents of ~user/Maildir/maildirsize is changed to that 
value as well.

This is however not the only finding. I manipulated further my userdb 
quota and did set it to 90MB. Shortly after that another user (Quota 
900MB) received a mail. The debug output for that mail delivery:

dovecot: deliver(user2): Quota warning: bytes=89653 2480 (95%)...

indicates that my settings were used instead for quota calculation. The 
maildirsize content for that user was however still at 900MB, not 90MB.

I am now puzzled what should happen when and whether I am looking to the 
correct indicators for problems. I could make the log file available, I 
would however prefer to generate a logfile where I get told what to try in 
what order to get more information from that logfile.

It could be that the bug is somewhere in my config, which I do post again 
for reference (excerpt), but I cannot see what might be wrong with it.

protocol imap {
   mail_plugins = quota imap_quota zlib acl imap_acl
}

protocol lda {
   mail_plugins = sieve quota acl
}
auth default {
   mechanisms = gssapi gss-spnego login plain
   passdb pam {
   }
   userdb passwd-file {
        args = /etc/userdb
   }
   user = root
}
plugin {
   quota = maildir:Quota
   quota_rule = *:storage=900MB
   quota_rule2 = Trash:ignore
}


-- 
Wolfgang Friebel                   Deutsches Elektronen-Synchrotron DESY
Phone/Fax:  +49 33762 77372/216    Platanenallee 6
Mail: Wolfgang.Friebel AT desy.de  D-15738 Zeuthen  Germany


More information about the dovecot mailing list