S S

Linux support on-site, on-line and in the cloud.

0793 572 8612

Systems Administration Notes.

Dovecot panic.


Dovecot panic.

Yesterday evening dovecot suddenly started kicking up. Every time I logged in the connection was unexpectedly closed.

There were a lot of messages in /var/loc/maillog/fR

dovecot: imap(fulford): Panic: file mail-index-sync-keywords.c: line 227
 (keywords_update_records): assertion failed: (data_offset >= siz
eof(struct mail_index_record))

followed by a backtrace. Not very helpful.

The mailbox still continued to open and process ok with mailx but nevertheless tried moving it aside and starting afresh, but no joy came of it.

Research on the internet suggested that it might be dovecot index file corruption and that the name of the index file would include the RE "dovecot.index".

Searching for this string with find revealed that there are thousands of em, one for each mailbox/folder on the system. It was clearly nothing to do with the real inbox at /var/spool/mail/<username> but a box managed with dovecot

The culprit turned up at ~/mail/.imap/INBOX/dovecot.index and the solution was simply to delete the existing file. Accessing mail again via the dovecot imap server caused the index to be rebuilt and all was fine. Not a single message was lost.

Clifford W Fulford
29 February 2016.



The layout and associated style sheets for this page are taken from the World Wide Web Consortium and used here under the W3C software licence.