[Dovecot] Possible mbox corruption if mail is saved with wrong Content-Length header (2.1.6)

Timo Sirainen tss at iki.fi
Sun Sep 2 17:28:28 EEST 2012


On 31.8.2012, at 11.42, Jost Krieger wrote:

> One of our users likes to delete attachments from his mails. He is using
> roundcube and we installed a plugin for that.

Does the plugin change the mbox file directly?

> imap(x1234567): Error: Cached message size larger than expected (6796 > 2844)

This looks like it does. Existing emails must not be changed, IMAP protocol forbids it (and Dovecot internals don't support it either). The only safe way to drop attachments is to assign a new UID for the mail, which basically means saving a new message without attachments and deleting the old one. The Content-Length header doesn't really have anything to do with this error.




More information about the dovecot mailing list