8

I received following error message in /var/mail/mail.err:

Jun 14 00:03:42 max dovecot: IMAP(bernhard): 
Corrupted index cache file /home/bernhard/Mail/.indexes/.imap/INBOX/dovecot.index.cache: 
Broken virtual size for mail UID 5618

What is the preferred way to restore the index?

10

According to this thread titled: IMAP Dovecot Error - Corrupted index cache 10.6.4 it sounds like you just need to do the following:

Scribit

Re: IMAP Dovecot Error - Corrupted index cache 10.6.4

Nov 30, 2010 11:10 AM (in response to Scribit)

I am not sure if this is the best procedure and there may be unintended consequences, but this is what I did to resolve the issue.

I stopped the mail service.

From a shell, I navigated to each directory where an issue was reported.

In these directories, I renamed the following files, prepending them with "old."

   dovecot.index
   dovecot.index.cache
   dovecot.index.log

EXAMPLE: mv dovecot.index old.dovecot.index

I then restarted the mail service. These 3 files were recreated for each IMAP folder on client access.

  • 3
    Thanks a lot. It is sufficient to delete the affected files and restart dovecot. It creates new index files after start.. – user55518 Jun 17 '14 at 21:20
2

I find the easiest way to restore the index files is this.

Stop Dovecot

sudo systemctl stop dovecot

Rename, or delete, the entire .imap folder for any affected users (I prefer delete, but the cautious may feel otherwise)

sudo rm -R /home/bernhard/Mail/.indexes/.imap/

Start Dovecot

sudo systemctl start dovecot

When the mailbox is checked, Dovecot will simply recreate the indexes as if it were a new mailbox that it didn't see before, without missing a beat.

Your Answer

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