[Dovecot] Quota handling on NFS Maildir

mikkel at euro123.dk mikkel at euro123.dk
Fri Feb 22 11:26:49 EET 2008


> On Thu, 2008-02-21 at 11:03 +0100, mikkel at euro123.dk wrote:
>> I have been doing some testing and it appears that the updating of the
>> file maildirsize is sometimes delayed.
>
> When do you see this delaying?
>

When I telnet manually to pop3 and imap and type commands to delete
certain messages, while keeping an eye on the maildirsize file.
This isn't always consistent, but it appears that the updates to
maildirsize are grouped together before being committed.

>> I figure this is because Dovecot collects theese changes in the
>> transactions or index file and then once in a while writes them to
>> maildirsize.
>
> POP3 is run in a single transaction, but the mails are expunged and
> maildirsize is updated only when QUIT is run. So you shouldn't be able
> to notice a situation where maildirsize doesn't match the maildir
> contents.

So what happens if QUIT is never run? If the the connection is broken
before ending properly?
Does the IMAP connection also have to be terminated properly before the
updates are written?

This may be the cause of the issue since some users in a production
environment will always break the connection (loss of internet
connectivity, the client program crashing or just generally badly behaving
e-mail clients).


> Both IMAP and POP3 use the same code to access mailboxes and update
> quota, so I can't really think of anything.
>
> Although it's of course possible to use different settings for
> POP3/IMAP.
>
>> mail_plugins(imap): quota imap_quota trash
>> mail_plugins(pop3): quota
>
> OK, both use quota plugin..
>

Yes and I know it works. When executing the pop3 remove commands myself I
can see that changes are actually written to maildirsize.

>> plugin:
>>   quota: maildir
>>   quota_rule2: Trash:storage=10M:messages=100
>
> I guess quota_rule comes from userdb? Is it the same for both imap/pop3?
> Although that shouldn't matter since the maildirsize should be updated
> in any case..
>

The queries are exactly alike for POP3 and IMAP.

Thanks for looking into this.

Regards, Mikkel



More information about the dovecot mailing list