On 11/23/18 1:40 AM, Ian Zimmerman wrote:
The winner appears to be Perl, namely the Mail::Audit module (and whatever other modules it relies on). I had a couple of scripts that did gentle transformations of incoming mails. The transformations were supposed to only ever touch the headers, but I used a Mail::Audit object to write back the entire message including the body. I had complete trust that the body would be bitwise identical to the original, but not so.
What change did it make? I suppose it might use a different MIME transfer encoding, changing the representation but not the meaning.
Also, the most common variants of mbox are known to break cryptographic signatures, with the notorious ">From " escaping.