Have you tried 'default_mail_env = :INDEX=/var/spool/mail/INDEX/%u'? I've not tried it myself, mind you :)
Looking through the code in 1.0-stable, in src/lib-storage/index/mbox/mbox-storage.c and src/lib-storage/index/maildir/maildir-storage.c it looks for the first ":" then takes root_dir as the leftmost part and looks for INDEX= and INBOX= in the rightmost part. I'm not sure what happens then when root_dir is empty (mbox_create and maildir_create return NULL).
You didn't say which version you're using? I think 1.0-test might be different again (Timo mentioned re-organising the whole mailbox "driver" thing).
Best Wishes, Chris
dovecot.7.signal11@spamgourmet.com wrote:
dovecot: IMAP(uid): fstat() failed with file /home/uid/mail/.imap/INBOX/dovecot.index.log: Stale NFS file handle
(a) why can't it just close the file and re-open ?
NFS has issues with files that are open on one client, and get deleted on another. UNIX systems require that files don't disappear while they are in use, but NFS is stateless and it simply can't know when a file is in use. The result is the 'stale NFS handle' kludge, which also prevents a simple close-and-open. Don't use index files on NFS disks.
First, the file did not disappear - the NFS is flaky under high load, that's all. Closing and re-opening the file would probably fix the issue, at least after the traffic spike.
Second, these are files that are intended for dovecots internal use only. If the NFS filehandle goes stale, it's anyway highly unlikely that someone else has deleted them, and dovecot should know that - IMHO it should at least try to recover.
Third, I'm perfectly willing to put the index files on a local disk, but I need dovecot to autodetect the rest of the mail environment, unless I want to define it completely for each user individually, and apparently dovecot does not let me do that(?).
From the (few) answers I got so far, it seems that it is in fact impossible to specify 'default_mail_env = INDEX=/var/spool/mail/INDEX/%u', so would anybody know where in the sources the root directory for the indexes is set, such that I can patch the code?
-- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin@reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094