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
12.02.2023 21:36, Alessio Cecchi ?????:> 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?We use NFS on Ubuntu nfs-kernel-server 1:1.3.4-2.1ubuntu5.5 nfs-common 1:1.3.4-2.1ubuntu5.5 $ nfsstat | grep nfs Server nfs v4: Now Maildir mounted with these options: type nfs4 (rw,noatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,acregmin=1800,acregmax=1800,acdirmin=1800,acdirmax=1800,hard,nordirplus,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=IP-address,local_lock=none,addr=ip-address)> Are you using LDA or LMTP for delivery?Uses LMTP for delivery.> After what change did the problem start?It seems that problem exists a long time. -- Best wishes Sohin Vyacheslav