[Dovecot] mdbox corruption

Timo Sirainen tss at iki.fi
Fri Nov 30 08:10:47 EET 2012


On 30.11.2012, at 8.03, Daniel L. Miller wrote:

> Trying to clean up the last of the corruption caused by my own stupidity.  I now have two mailboxes for one user that give errors such as:
> 
> doveadm(fax at amfes.com): Error: zlib.read(/var/mail/amfes.com/fax/mdbox/storage/m.9): gz trailer has wrong CRC value at 20065618
> doveadm(fax at amfes.com): Error: read(/var/mail/amfes.com/fax/mdbox/storage/m.9) failed: Invalid argument (uid=238)
> doveadm(fax at amfes.com): Error: zlib.read(/var/mail/amfes.com/fax/mdbox/storage/m.9): corrupted data at 20145217
> [...]
> doveadm(fax at amfes.com): Error: read(/var/mail/amfes.com/fax/mdbox/storage/m.20) failed: Invalid argument (uid=5155)
> doveadm(fax at amfes.com): Error: zlib.read(/var/mail/amfes.com/fax/mdbox/storage/m.20): corrupted data at 24779604
> doveadm(fax at amfes.com): Error: Cached message size smaller than expected (1259 < 1260)
> doveadm(fax at amfes.com): Error: Corrupted index cache file /var/mail/amfes.com/fax/mdbox/mailboxes/INBOX/2010/dbox-Mails/dovecot.index.cache: Broken physical size for mail UID 5158
> 
> 'doveadm force-resync' does not appear to fix these.  There appear to be only the two mdbox files affected and I see about 40 errors. I would prefer to salvage as much as possible of these.  What options do I have?  Do a dsync to another location and take whatever I get?

There are no tools to fix broken compressed mails. I guess if dsync doesn't stop in the middle that would work. If it does stop, you'd need to figure out which messages those are (with doveadm dump) and delete them.



More information about the dovecot mailing list