[Dovecot] Dovecot strange behaviors on Solaris

Thomas Wouters thomas at xs4all.net
Sat Dec 3 14:37:41 EET 2005

On Fri, Dec 02, 2005 at 03:04:17PM -0700, Mario Nigrovic-rvvk40 wrote:

> Typical entry from .procmailrc:

> :0
> * ^(From|To|CC):.*@.*\<si2.org
> Maildir/.SI2/

The :0 means procmail won't be using locking for this mailbox (which is
perfectly fine, for Maildir), however:

> #lock_method = flock
> lock_method = fcntl

Here you tell dovecot to use fcntl for locking. fcntl over NFS might work
(depending on the client and server, and IIRC NetApp at least tries to do it
right) but it has some fundamental flaws (NFS is stateless, locking
obviously is not) so I would highly recommend you switch to dotlock,
instead. In any case, it's the most reliable lock method over NFS. Since
procmail won't be locking, you're only guarding against multiple instances
of dovecot, which should all be using dotlock.

(Procmail can also use dotlocking if you want, but it uses a compile-time
test to see which lock method it should use.)

> #lock_method = dotlock
> protocol imap {
>   listen = *:2143
> }

> When I run as above (INDEX=MEMORY), I have access to all my mail, but I'm 
> seeing literally thousands of .nfs files created all throughout my 
> .mail/Maildir directories, and Thunderbird periodically locks up.  As the 
> filesystem fills with useless .nfs files (I deleted 10000 from ONE mailbox 
> directory this morning), everything gets really, really slow, and I suspect 
> this contributes to Thunder bird's problem.

.nfs* files are a hack used to deal with state (open files, quite likely
your lockfiles) over the stateless NFS protocol.

> But, if I run with the INDEX on a local disk, many mailboxes will not load 
> (the most critical ones, of course...), but also some do.  My inbox will 
> list messages, but cannot display any.  Others won't even list messages.

I'm not sure why a local index wouldn't work. It worked fine for us for a
while, until we had too many users to be able to deal with the occasional
index corruption. You may also want to place the control files on a local
disk, by the way, since only dovecot uses them. Unless you have multiple
servers that run dovecot, of course. Using local controlfiles may also
relieve your locking woes, without switching locking mechanism (although
dotlock also works fine for local filesystems.)

Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!

More information about the dovecot mailing list