On Tue, Nov 08, 2005 at 08:09:12PM -0500, Joseph Brennan wrote: > So, why does Mimedefang remove the return characters as it creates > INPUTMSG? We'd really like to know where they are so we can track > down bugs in our own users' mail software.
Likely an oversight... but I'm just guessing. Normally, CR are removed because the input stream has line endings encoded as CRLF while a normal unix text file has lines ending in just LF... since the input is processed byte-by-byte, if you find a "CR", you ignore it and set a flag "previous was CR", then on the next character, if the flag is set, and the character isn't a LF, it was a lone "CR" character. > We're interested in patching mimedefang.c to do this, but have this > funny feeling that there is a good reason David removes them. What > would it break? Nothing that I can think of easily. Perl has no problem with character data, in general. It could be that, depending on where the CR characters are, certain MIME decodings go wrong that otherwise wouldn't go wrong. But that's rather unlikely. -- #!perl -wpl # mmfppfmpmmpp mmpffm <[EMAIL PROTECTED]> $p=3-2*/[^\W\dmpf_]/i;s.[a-z]{$p}.vec($f=join('',$p-1?chr(sub{$_[0]*9+$_[1]*3+ $_[2]}->(map{/p|f/i+/f/i}split//,$&)+97):qw(m p f)[map{((ord$&)%32-1)/$_%3}(9, 3,1)]),5,1)='`'lt$&;$f.eig; # Jan-Pieter Cornet _______________________________________________ Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang