Upon trying to use the "zlib" plugin, which also encompasses support for the bzip2 compression format, I discovered that its heuristics for detecting bzip2 compressed messages in a maildir store are broken. This means that some messages will decompress without issue whereas others will not, leading to the following shenanigans: Sep 12 23:24:06 server dovecot: IMAP(username): gzread() failed: UNEXPECTED_EOF Sep 12 23:24:06 server dovecot: IMAP(username): zlib_istream.seek() failed: Invalid argument Sep 12 23:24:06 server dovecot: IMAP(username): FETCH for mailbox Archives.2009 UID 1212 failed to read message input: Invalid argument Sep 12 23:24:06 server dovecot: IMAP(username): Disconnected: BUG: Unknown internal error bytes=250/3142 Upstream says: "Yeah, bzip2 code is broken in v1.2. I fixed it in v2.0 by basically rewriting the whole thing. Maybe I should just disable bzip2 support in v1.2." Source: http://www.mail-archive.com/dovecot@dovecot.org/msg26061.html Because this renders it essentially useless for any production purpose, my request is basically that the bzip2 USE flag be masked for versions lower than 2.0.
Fixed in net-mail/dovecot/dovecot-1.2.14. I wonder if we should disable it for all older versions too?
Thanks, Patrick. Regarding the older versions, I would recommend it as you can be reasonably sure that it's no less broken in those cases. Timo Sirainen is an excellent programmer and it's pertinent that he just took a decision to fully rewrite this aspect of dovecot in order to fix it. However, as alluded to before, gzip support should be fine although I haven't heavily tested it (I went straight to dovecot-2.0.2 after this discovery because I badly needed the degree of compression that bz2 offers and its LDA has the ability to compress before storage).
Just stabilize 1.2.14 in 30 days? (versus bumping old versions and waiting for 30 days anyway?)
Re Comment 3: I would say just two things: 1) The feature is broken and my goal is to stop people building in the feature and potentially attempting to use it in production 2) I am asking for a USE flag to be masked with version scope. This does not entail any activity on the ebuilds whatsoever. It simply prevents the flag from being enabled while building the affected ebuilds (unless the user goes to some lengths to revert the use.mask policy in question).
I should clarify my proposal. I'm suggesting that the following line be inserted into profiles/base/package.use.mask: <net-mail/dovecot-2 bzip2
(In reply to comment #5) > I should clarify my proposal. I'm suggesting that the following line be > inserted into profiles/base/package.use.mask: > > <net-mail/dovecot-2 bzip2 > Good idea. Done :) That should also conclude this bug.