On Wed, Oct 06, 2010 at 05:18:03PM +0200, Stefan `Sec` Zehl wrote:
I found an annoying bug in mutts attachment handling which took me 2
days to debug.
Whenever you attach a file of content-type "application/pgp", mutt
re-encodes every 0x0a in the file into 0x0d 0x0a before base64-encoding
and sending it.
The bug is not easily noticed, because if you save this attachment from
within mutt, it reverses this transformation.
Mutt currently assumes application/pgp parts are produced by Mutt
itself, so it is attempting to canonicalize the line endings. I
suppose the solution is to add a bitfield to the BODY structure where
it can be indicated that the user has manually set the content-type
and not perform any automatic conversion.