Error: Corrupted index cache file

Alessio Cecchi alessio at skye.it
Sun Feb 12 19:36:12 UTC 2023


Hi Sohin,

I've run into this error in the past in some situations:

- one was during the migration from Centos 6 to 7, probably the NFS 
client in the kernel had some differences in cache management

- one was with Ubuntu and NFS server in Google Cloud, I don't remember 
exactly how I solved it in that case but the problem was the NFS server 
(maybe because the NFS server only supported version 4.1 and there were 
locking issues)

- one was where I used Director but local delivery via LDA, I solved it 
by switching to delivery via LMTP

What NFS server/storage are you using? And with what NFS version your 
Maildir are mounted?

Are you using LDA or LMTP for delivery?

After what change did the problem start?

Ciao

Il 10/02/23 16:15, Sohin Vyacheslav ha scritto:
> Hi All,
>
> In mail.log exists an error messages "Error: Corrupted index cache 
> file 
> /data/mail/vhosts/domain.com/user at domain.com/Maildir/dovecot.index.cache: 
> invalid record size" for some accounts.
>
> I tried these steps to fix it:
>
> 1. Running commands
> # doveadm -D -v index -u user at domain.com INBOX
> # doveadm -v force-resync -u user at domain.com INBOX
>
> after this I saw that the following files are updated in ../Maildir/:
> dovecot.index.cache
> dovecot.index.log
> dovecot-uidlist
>
> But after some time error messages occurred again.
>
> 2. Added NFS mount option 'nordirplus' to /etc/fstab with remount 
> /data partition, add 'mmap_disable = yes' and 'mail_fsync = always' to 
> 10-mail.conf as advised on 
> https://doc.dovecot.org/configuration_manual/nfs/ (because /data 
> partition mounted via NFS);
>
> 3. Renaming 3 files with/without Dovecot service pre-stop.
>
> # mv dovecot.index old.dovecot.index
> # mv dovecot.index.cache old.dovecot.index.cache
> # mv dovecot.index.log old.dovecot.index.log
>
> Unfortunately, all done steps didn't fix issue.
> What is the proper way to fix corrupted index cache errors?
>
>
> dovecot package: 1:2.2.33.2-1ubuntu4.8 (Ubuntu-18.04).
>
>
> p.s. for some of email accounts also exists error messages "Error: 
> Broken file ../Maildir/dovecot-uidlist line ###: Invalid data:" 
> besides mentioned cache error.
>
>
-- 
Alessio Cecchi
Postmaster @ http://www.qboxmail.it
https://www.linkedin.com/in/alessice



More information about the dovecot mailing list