Re: [Dovecot] Maybe wrong quota recalculation behaviour on overquota delivery try

2010-09-03 Thread Timo Sirainen
On Fri, 2010-09-03 at 08:19 +0200, Luca Palazzo wrote:
> Hi Timo,
> thanks you for reply.
> I'm pretty sure you are right. Quota recalculation based on Maildir++ 
> standard is too I/O intensive for our system because we have lot of 
> maildirs migrated from old system. Mail files are missing often size in 
> filename so now I understand why so much stat calls.
> Is there any script/util in dovecot to fix filenames?

The problem with changing filenames is that it changes also the maildir
base filename. So that requires changing also dovecot-uidlist. But it
gets worse if you use base filenames as POP3 UIDLs, then a change in it
causes POP3 clients to redownload those mails.




Re: [Dovecot] Maybe wrong quota recalculation behaviour on overquota delivery try

2010-09-02 Thread Luca Palazzo

Hi Timo,
thanks you for reply.
I'm pretty sure you are right. Quota recalculation based on Maildir++ 
standard is too I/O intensive for our system because we have lot of 
maildirs migrated from old system. Mail files are missing often size in 
filename so now I understand why so much stat calls.

Is there any script/util in dovecot to fix filenames?

Thank you.

Luca

On 09/02/2010 07:32 PM, Timo Sirainen wrote:

On Thu, 2010-09-02 at 19:14 +0200, Luca Palazzo wrote:


Looking at mbox servers log nothing seem to happen, but stracing lmtp
process we can see stat system calls to all Maildir files, as if
dovecot
was recalculating quota and regenerating maildirsize file.

It happens always when LMTP tries to deliver a mail to an overquota
account.


Yes, that's pretty much how Maildir++ quota works. If maildirsize file
doesn't only contain a single line showing the quota, or if it's older
than 15 minutes, it's recalculated. The maildir filenames really should
have ,S=size in the filenames, otherwise quota recalculation is horribly
slow.

Maybe you should switch to dict quota with file backend.
http://wiki2.dovecot.org/Quota/Dict




Re: [Dovecot] Maybe wrong quota recalculation behaviour on overquota delivery try

2010-09-02 Thread Timo Sirainen
On Thu, 2010-09-02 at 19:14 +0200, Luca Palazzo wrote:
> 
> Looking at mbox servers log nothing seem to happen, but stracing lmtp 
> process we can see stat system calls to all Maildir files, as if
> dovecot 
> was recalculating quota and regenerating maildirsize file.
> 
> It happens always when LMTP tries to deliver a mail to an overquota
> account.

Yes, that's pretty much how Maildir++ quota works. If maildirsize file
doesn't only contain a single line showing the quota, or if it's older
than 15 minutes, it's recalculated. The maildir filenames really should
have ,S=size in the filenames, otherwise quota recalculation is horribly
slow.

Maybe you should switch to dict quota with file backend.
http://wiki2.dovecot.org/Quota/Dict