[Dovecot] NFS, test52, maildir, freebsd 4.x and OS X (Panther) Server

Sean Porter dovecot at seanporter.com
Tue Nov 23 20:48:06 EET 2004


I've been working on setting up a Dovecot server with a maildir  
mailboxes stored over NFS. Initially, everything was working great, and  
then I started seeing this error as previously discussed on the list in  
my maillog:

(mail_index_expunge): assertion failed: (!t->view->external)

Timo, in another thread, suggested to remove line 247 in  
mail-index-transaction.c in the test52 source, which I blithely ignored  
as I thought this would remove only the error message from the logfile  
and not fix the problem. At Mark Lidstone's helpful off-list insistence  
I did remove the line, recompile, and everything did seem to be  
working, until I encountered a different error.

I started doing some light load testing from multiple clients  
(essentially, clicking like a rabid monkey on Get Mail in Thunderbird  
and hitting different mailbox links in Squirrelmail as the same user)  
and started running into this error in the logs:

Nov 22 20:10:46 server dovecot: IMAP(mailuser at example.com):  
rename(/host/mail/mailboxes/mailuser at example.com/dovecot-uidlist.lock,  
/host/mail/mailboxes/mailuser at example.com/dovecot-uidlist) failed:  
Input/output error
Nov 22 20:10:46 server dovecot: IMAP(mailuser at example.com):  
file_dotlock_replace(/host/mail/mailboxes/mailuser at example.com/dovecot- 
uidlist) failed: Input/output error

Oddly, the dovecot-uidlist.lock file was unremovable on the NFS server  
(OS X Panther Server) with a simple 'rm', so I started digging into  
things a little further. It seems that the OS X NFS code is based on  
the FreeBSD 5.x codebase. The server that Dovecot (and my NFS client)  
lives on is FreeBSD 4.x, which doesn't support NFS locking at  
all(incidentally, the FreeBSD NFS Server is apparently incompatible  
with Linux NFS clients as well -- nice!).

Per the suggestion in http://www.dovecot.org/doc/nfs.txt I'd already  
been storing my index files locally, but it appeared that the control  
files were somehow blowing up, even with NFS-safe dotlocking.

All hope was nearly lost when I came across this tidbit in a post from  
Timo(http://www.dovecot.org/list/dovecot/2003-May/001489.html):

- :CONTROL=dir in default_mail_env can specify where to save
dovecot-uidlist and .customflags files. Useful for above problems.

I then changed my dovecot.conf to retreive the mailboxes from the NFS  
mount, but store the indexes and the control files locally:

default_mail_env =  
maildir:/host/mail/mailboxes/%u:INDEX=/home/dovecot/%u/indexes: 
CONTROL=/home/dovecot/%u/control

All seems well so far.

I know this is a relatively unique setup, but I thought it might help  
some of the other people that are running into NFS-related issues.

Suggestion: perhaps the :CONTROL directive could be added to  
mail-storages.txt or dovecot-example.conf? A hint may also want to be  
added to http://www.dovecot.org/doc/nfs.txt.

Sean




More information about the dovecot mailing list