On 02/26/08, Timo Sirainen wrote:
On Tue, 2008-02-26 at 15:56 -0500, Philip J. Hollenback wrote:
I've recently upgraded to 1.0.10 in hopes that this problem would go away but no luck. I've got some users at my company with large inboxes on maildir (say 22,000 messages). Their mailboxes are hosted on nfs and dovecot is configured to do dotlocking.
Are there multiple Dovecot servers accessing the mailboxes? Can the same user have different connections to different servers at the same time?
This sounds like NFS caching problems that are described in http://wiki.dovecot.org/NFS
The real problem seemed to be when users run multiple imap clients and they stomp on each others' index files on the nfs filesystem.
I believe I have this fixed. I should clarify that there is only one dovecot server which in turn nfs-mounts the mailbox filesystem from a netapp. I realized after reading all the dovecot nfs documentation that I could point the INDEX variable to a local filesystem on the dovecot server. I did that with the following dovecot.conf default_mail_env:
default_mail_env = mbox:%h/mail:INBOX=/var/mail/%u:INDEX=/opt/dcache/%u
because the default at my company is mbox. Then for each maildir user I set a dovecot.passwd entry as follows:
user:XXXXX:501:100::/home/user:/bin/false::Maildir:/home/%u/Maildir:INDEX=/opt/dcache/%u
finally I set my dovecot.conf locking/nfs options as follows:
mmap_disable=yes dotlock_use_excl = no lock_method = fcntl mbox_read_locks = dotlock mbox_write_locks = dotlock
since I'm using dovecot 1.0 I believe this is the correct way to do dotlocking on the mbox files and fcntl locking on the index files (which remember are on the local filesystem under /opt/dcache).
Since I've made this change I've seen no more corrupted index files.
P.
-- Phil Hollenback hollenba@schrodinger.com Schrodinger, Inc.