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]

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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