[Mimedefang] Problem with ^M's and Razor

David F. Skoll dfs at roaringpenguin.com
Tue Jun 4 15:34:56 EDT 2002


On Tue, 4 Jun 2002, Nate Carlson wrote:

> So, my question is, where are the ^M's coming from, and how can I get rid
> of 'em?

The "^M's" come from Sendmail, which dumps the message exactly as it
was received.  The SMTP RFC specifies that lines must end with CRLF,
which is ^M^J.

I'm surprised Razor is sensitive to line endings.  You can get rid of
them with some Perl code, I suppose:

open(IN, "<INPUTMSG");
open(OUT, ">RAZORMSG");
while(<IN>) {
    $_ =~ tr/\015//d;
    print OUT;
}
close(IN);
close(OUT);

and then submit RAZORMSG to Razor (and check RAZORMSG against Razor!)

--
David.




More information about the MIMEDefang mailing list