Hi
Running dovecot 2.1.7 (from debian repo).
We have some old compressed maildir messages with the wrong S= size in the filename (our fault).
If I delete index files, log in to the mailbox and try to FETCH the bad message, dovecot complains about the incorrect message size, attempts to fix the filename and disconnects the client. However, it changes the filesize to the size of the message on disk, not the message's uncompressed size.
For subsequent clients, the FETCH works, but dovecot logs an error (and maybe re-indexes the mailbox?) and the message UID changes.
Jan 14 18:40:56 imap01 dovecot: imap(bub@confidence.com): Error: Cached message size larger than expected (1612 > 1556) Jan 14 18:40:56 imap01 dovecot: imap(bub@confidence.com): Error: Maildir filename has wrong S value, renamed the file from /mail/mailstore01/505/236/bub@confidence.com/.Sent Items/cur/1168058702.93517743273399070372.fetchmail01,S=1612:2,Sab to /mail/mailstore01/505/236/bub@confidence.com/.Sent Items/cur/1168058702.93517743273399070372.fetchmail01,S=931:2,Sab Jan 14 18:40:56 imap01 dovecot: imap(bub@confidence.com): Error: Corrupted index cache file /mail/index01/505/236/bub@confidence.com/.Sent Items/dovecot.index.cache: Broken physical size for mail UID 1 Jan 14 18:40:56 imap01 dovecot: imap(bub@confidence.com): Error: read(/mail/mailstore01/505/236/bub@confidence.com/.Sent Items/cur/1168058702.93517743273399070372.fetchmail01,S=1612:2,Sab) failed: Input/output error (uid=1)
Jan 14 18:41:25 imap01 dovecot: imap(bub@confidence.com): Error: Cached message size smaller than expected (931 < 1556) Jan 14 18:41:25 imap01 dovecot: imap(bub@confidence.com): Error: Maildir filename has wrong S value, renamed the file from /mail/mailstore01/505/236/bub@confidence.com/.Sent Items/cur/1168058702.93517743273399070372.fetchmail01,S=931:2,Sab to /mail/mailstore01/505/236/bub@confidence.com/.Sent Items/cur/1168058702.93517743273399070372.fetchmail01,S=931:2,Sab Jan 14 18:41:25 imap01 dovecot: imap(bub@confidence.com): Error: Corrupted index cache file /mail/index01/505/236/bub@confidence.com/.Sent Items/dovecot.index.cache: Broken physical size for mail UID 2 Jan 14 18:41:25 imap01 dovecot: imap(bub@confidence.com): Error: Cached message size smaller than expected (931 < 1556) Jan 14 18:41:25 imap01 dovecot: imap(bub@confidence.com): Error: Maildir filename has wrong S value, renamed the file from /mail/mailstore01/505/236/bub@confidence.com/.Sent Items/cur/1168058702.93517743273399070372.fetchmail01,S=931:2,Sab to /mail/mailstore01/505/236/bub@confidence.com/.Sent Items/cur/1168058702.93517743273399070372.fetchmail01,S=931:2,Sab Jan 14 18:41:25 imap01 dovecot: imap(bub@confidence.com): Error: Corrupted index cache file /mail/index01/505/236/bub@confidence.com/.Sent Items/dovecot.index.cache: Broken physical size for mail UID 2
Jan 14 18:41:53 imap01 dovecot: imap(bub@confidence.com): Error: Cached message size smaller than expected (931 < 1556) Jan 14 18:41:53 imap01 dovecot: imap(bub@confidence.com): Error: Maildir filename has wrong S value, renamed the file from /mail/mailstore01/505/236/bub@confidence.com/.Sent Items/cur/1168058702.93517743273399070372.fetchmail01,S=931:2,Sab to /mail/mailstore01/505/236/bub@confidence.com/.Sent Items/cur/1168058702.93517743273399070372.fetchmail01,S=931:2,Sab Jan 14 18:41:53 imap01 dovecot: imap(bub@confidence.com): Error: Corrupted index cache file /mail/index01/505/236/bub@confidence.com/.Sent Items/dovecot.index.cache: Broken physical size for mail UID 2 Jan 14 18:41:53 imap01 dovecot: imap(bub@confidence.com): Error: Cached message size smaller than expected (931 < 1556) Jan 14 18:41:53 imap01 dovecot: imap(bub@confidence.com): Error: Maildir filename has wrong S value, renamed the file from /mail/mailstore01/505/236/bub@confidence.com/.Sent Items/cur/1168058702.93517743273399070372.fetchmail01,S=931:2,Sab to /mail/mailstore01/505/236/bub@confidence.com/.Sent Items/cur/1168058702.93517743273399070372.fetchmail01,S=931:2,Sab Jan 14 18:41:53 imap01 dovecot: imap(bub@confidence.com): Error: Corrupted index cache file /mail/index01/505/236/bub@confidence.com/.Sent Items/dovecot.index.cache: Broken physical size for mail UID 2