WARNING: using attachment_dir with plugin zlib can corrupt mails

Timo Sirainen timo at sirainen.com
Sat Sep 7 15:46:16 EEST 2019


On 19 Jul 2019, at 17.52, Patrick Cernko via dovecot <dovecot at dovecot.org> wrote:
> 
> Hello list, hello Dovecot developers,
> 
> this week, I discovered a serious bug in Dovecot, that lead to several broken mails on our servers. The bug corrupts the first few characters of the mail header during saving. On our setup, it was almost always only the very first line of text, that was corrupted.
> 
> The bug seems to be triggered by a bad "interaction" of attachment_dir option and zlib plugin. If you use both, you most likely are affected, too, except you only use zlib plugin for reading previously compressed stored mails. That's also the workaround we use now: zlib plugin only enabled in mail_plugins but no plugin/zlib_save set.

Actually the mail isn't saved corrupted. The bug is when reading the mail. So any existing corrupted mails become fixed after upgrading.

Fix here: https://github.com/dovecot/core/commit/5068b11e594ad7cc1f7cedf2bd9280520e0e534d <https://github.com/dovecot/core/commit/5068b11e594ad7cc1f7cedf2bd9280520e0e534d>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20190907/d2af9770/attachment.html>


More information about the dovecot mailing list