Attachment Warnings - End of Line Behavior Changed (CR, LF)

Michael H. Warfield mhw at
Thu Feb 2 01:58:49 GMT 2006

On Wed, 2006-02-01 at 10:43 -0500, Denis Beauchemin wrote:
> Marco Radzinschi wrote:

> > Hello:

> > I noticed that the CR/LF behavior has changed in the newest version of 
> > MailScanner (4.49) from DOS (LF only) to Unix-type text files 
> > (<CR>+<LF>) for the generated attachment warnings.

> DOS = CR+LF, Unix/Linux = LF

> > I treid removing the excess <CR> characters in the report templates 
> > myself, but I noticed that the Perl script still appends to the report 
> > templates with <CR>+<LF>, which makes it appear mangled on a GroupWise 
> > system running on Windows.

> > I did not see a configuration option for this, so I am assuming that 
> > it is hard-coded somewhere in the script, or in one of the external 
> > modules that the script uses. Does anyone know how to change this 
> > behavior?

> This has been discussed previously (about 1-2 weeks ago).  It is 
> probably a bug in MIME::Tools IIRC.  Some people were supposed to talk 
> to the developer to get a fix.  Don't know how it turned out...

	Turns out it's far worse than we imagined.  It's not really a "bug" in
MIME::Tools per se.  Rather, it's an ambiguity in the entire
quoted-printable encoding on top of the issues of LF vs CR/LF.  Some of
that's all the way down in the core Perl MIME stuff below MIME::Tools.
By re-encoding MIME attachments, we may end up with the entire encoded
attachment altered even though the canonical text remains the same.
This is a big no-no for signed attachments and that's what Julian is
referring to as a big problem that's being worked on.  I suspect I
dumped a rather odious hairball in his lap over the whole PGP/MIME /
S/MIME mess of which the eol line termination endings are only a minor
part.  Fixing MIME::Tools turns out not to fix any of it.  But some
hooks into MIME::Tools for saving the encoded parts by be the workaround
for both problems.  Work in progress...

	ITMT...  Turn off "Sign Clean Messages".

> Denis

> -- 
>    _
>   °v°   Denis Beauchemin, analyste
>  /(_)\  Université de Sherbrooke, S.T.I.
>   ^ ^   T: 819.821.8000x2252 F: 819.821.8045

Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at
   /\/\|=mhw=|\/\/          | (678) 463-0932 |
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471        | possible worlds.  A pessimist is sure of it!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url :

More information about the MailScanner mailing list