We're running dovecot as an IMAP server and postfix to deliver mail. One of our users is complaining that email is gettin delayed (no we're not using grey listing or anything like that). /var/log/mail.info is showing these log messages around when the user should be getting this email. The mail dirs (eg /mail) is mounted over NFS (if that helps)

Jul 26 18:31:08 mail1 deliver(user@example.com): Corrupted transaction log file /mail/example.com/user/dovecot.index.log: start_offset (5160) > file size (5140)
Jul 26 18:31:08 mail1 deliver(user@example.com): fscking index file /mail/example.com/user/dovecot.index
Jul 26 18:31:08 mail1 deliver(user@example.com): msgid=<20090726173107.8361B2DD@mail.example.com>: save failed to INBOX: Internal error occurred. Refer to server log for more information. [2009-07-26 18:31:08]
link|improve this question

79% accept rate
feedback

3 Answers

up vote 3 down vote accepted

D'oh! The cause of the delay is that dovecot is trying to process a corrupted index.

Just have the user log out of mail, delete the index file, and it will automatically be recreated when they log in. Thus, just do this:

rm /mail/example.com/user/dovecot.*

Dovecot creates temporary index files of every message; when the user logs in for the first time, the indexes are created from scratch if they are not present, so this is a simple, effective fix, and it works every time. I've had this happen with earlier versions of Dovecot, and deleting the index is 100% effective in all cases.

You are storing mail on that NFS mount in maildir format, right?

By the way, pre-1.0 or beta releases of Dovecot had this issue on a regular basis. The newer versions have fixed this.

link|improve this answer
feedback

Is the NFS mount shared?

link|improve this answer
Yes. But only mounted by a SMTP server, so nothing should be using those directories – Rory Aug 4 '09 at 8:49
feedback

Can you check the size of the mailbox. Or please check the maillog file for more details.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.