[Dovecot] File locking problems and duplicate emails with the snarf plugin

Adrian Barker A.Barker at ucl.ac.uk
Mon Nov 26 19:07:13 EET 2007


Timo Sirainen wrote:
> On Wed, 2007-11-21 at 20:29 +0000, Adrian Barker wrote:
>> Two weeks ago we switched all our IMAP users (around 25,000) from the
>> Washington IMAP server to Dovecot, and since then there have been
>> several occasions when reading new email just hangs, and duplicate
>> emails appear. We are using the 'snarf' plugin to copy new email to the
>> inbox, and it looks as though the problems are caused by file locking.
> 
> How do you deliver mails to the mboxes? If not using Dovecot's deliver,
> the mbox locking order could be different between them and they'd
> deadlock. mbox_read/write_locks settings affect this.
> 
>> We have been using the Washington IMAP server for a number of years
>> without any file locking problems, so the underlying file locking
>> mechanism is robust. 
> 
> Did UW-IMAP really use fcntl locks with mboxes? Could it be that it just
> didn't, and now the problem is with fcntl locking in general?
> 

We use Exim to deliver the email, which uses both fcntl and lock files.
We cannot use the Dovecot deliver process, as we have a mixture of Unix,
POP and IMAP clients. We used the default file locking for Dovecot, but
on Friday turned off the use of lock files (after running various file
locking tests) and now just use fcntl. This seems to have improved the
performance substantially. We will know in a day or two whether the
problem is completely solved.



-- 

Adrian Barker
Internet Technology Section
Information Systems
University College London, Gower Street, London WC1E 6BT
External phone: +44 20 7679 5140,  Fax (+44) 20 7388 5406
Internal phone: x 25140
Email: A.Barker at ucl.ac.uk


More information about the dovecot mailing list