On Tue, 2013-01-29 at 19:58 +0000, Rob Redpath wrote: > I'm encountering two, probably related, errors in my Dovecot 2.1.10 > install. The issue relates to compressed email stored in Maildir format > directories. > > In some cases, a mailbox will become inaccessible, and the following > will be logged from a doveadm fetch:- > > doveadm(i...@example.com): Error: Corrupted index cache file > /var/spool/virtual_mail/info_example.com_d/dovecot.index.cache: Broken > physical size for mail UID 2777 > doveadm(i...@example.com): Error: Cached message size smaller than > expected (18996 < 64624) > doveadm(i...@example.com): Error: Maildir filename has wrong S value, > renamed the file from > /var/spool/virtual_mail/info_example.com_d/cur/1277451630.H877760P14612.mailserver.example.com,S=18996:2,Z > to > /var/spool/virtual_mail/info_example.com_d/cur/1277451630.H877760P14612.mailserver.example.com,S=18996:2,Z > > Interestingly, the file mentioned in the error ( > /var/spool/virtual_mail/info_example.com_d/dovecot.index.cache ) doesn't > exist. > > The uncompressed size of the file is 64624 bytes, the compressed size is > 18996.
Dovecot's zlib plugin requires that the maildir filenames have ,S=uncompressed size. Otherwise you get those errors. http://dovecot.org/tools/maildir-size-check.sh can be used to fix the filenames.