Hi!
I am getting "Cached message size smaller than expected" errors since dovecot-2.1.x. Until now, I thought that those errors don't do any harm, I assumed that the cache will just be rebuilt after the error had been detected.
However, since dovecot 2.2.x (I tried 2.2.7 and 2.2.10), the errors sometimes seem to actually cause mail access to fail.
With dovecot-2.1.1, only the first two messages were logged, since using 2.2.7 and 2.2.10, the "read ... failed: Invalid argument" sometimes appear: -------------------- 8< -------------------- May 7 17:03:52 samba dovecot: imap(xyz): Error: Cached message size smaller than expected (2246 < 2247) May 7 17:03:52 samba dovecot: imap(xyz): Error: Corrupted index cache file /home/xyz/mail/.imap/INBOX/dovecot.index.cache: Broken physical size for mail UID 11277 May 7 17:03:52 samba dovecot: imap(xyz): Error: read(/var/mail/xyz) failed: Invalid argument May 7 17:03:52 samba dovecot: imap(xyz): Error: read(/var/mail/xyz) failed: Invalid argument (uid=11277) -------------------- 8< --------------------
I am using dovecot on RHEL6 with mbox mailboxes. Message size differences are always 1 byte.
Any hints would be appreciated!
Cheers, --leo
P.S.: Those errors occur some times a day and affect different users.. (Upgrade 2.1.1 -> 2.2.7 was on 2013-11-22, 2.2.10 was installed on 2014-01-20.)
# for f in maillog* ; do echo -n "$f: "; grep "dovecot:.*Error: read.*failed.*Invalid arg" $f | wc -l; done maillog: 31 maillog-20130801: 0 maillog-20130901: 1 maillog-20131001: 0 maillog-20131101: 0 maillog-20131201: 30 maillog-20140101: 92 maillog-20140201: 110 maillog-20140301: 99 maillog-20140401: 133 maillog-20140501: 100
# for f in maillog* ; do echo -n "$f: "; grep "dovecot:.*Error: Cached message size smaller than expected" $f | wc -l; done maillog: 99 maillog-20130801: 465 maillog-20130901: 484 maillog-20131001: 512 maillog-20131101: 460 maillog-20131201: 520 maillog-20140101: 402 maillog-20140201: 400 maillog-20140301: 355 maillog-20140401: 481 maillog-20140501: 434
-- e-mail ::: Leo.Bergolth (at) wu.ac.at fax ::: +43-1-31336-906050 location ::: IT-Services | Vienna University of Economics | Austria