Hi,
Could anyone explain to me why amavisd-new seems to find headers ended with
<CRLF> as a BAD Header.
After reading RFC822 and RFC2821 I am a bit confused why amavisd-new will not
accept this as a good header.
According to RFC822 the header field needs to be terminated by <CRLF>.
My setup is postfix -> amavisd-new -> postfix(lmtp) -> virtual
Postfix version: postfix-2.2.10_1,1
Amavisd-new version: amavisd-new-2.4.1_1,1
Spamassassin version: p5-Mail-SpamAssassin-3.1.3
Problem:
Return-Path: <>
Delivered-To: bad-header-quarantine
X-Envelope-From: <[EMAIL PROTECTED]>
X-Envelope-To: <[EMAIL PROTECTED]>
X-Quarantine-ID: <WIsm0Gds-9kP>
X-Amavis-Alert: BAD HEADER Improper use of control character (char 0D hex):
Reply-To: Matthew <[EMAIL PROTECTED]>\r\n
Received: from xxxxx ([127.0.0.1])
by localhost (xxxxx[127.0.0.1]) (amavisd-new, port 10024)
with LMTP id WIsm0Gds-9kP for <[EMAIL PROTECTED]>;
Thu, 13 Jul 2006 15:12:08 +0200 (CEST)
Received: by xxxxxx (Postfix, from userid 0)
id D4087E4853; Thu, 13 Jul 2006 15:12:08 +0200 (CEST)
To: [EMAIL PROTECTED]
Subject: Testing html mail
From: Matthew <[EMAIL PROTECTED]>
Reply-To: Matthew <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/html; charset=iso-8859-1
Message-Id: <[EMAIL PROTECTED]>
Date: Thu, 13 Jul 2006 15:12:08 +0200 (CEST)
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #FFFFFF;
}
-->
</style>
</head>
<body>
<div align="center">
<p> Image testing</p>
<img src="http://www.iu.nl/nl/logo04.gif">
<p> Table testing </p>
<table>
<tr>
<th> Test</th
</tr>
<tr>
<td> Testing</td>
</tr>
</table>
<p> Text size testing </p>
<h1>Foo</h1>
<h2>Bar</h2>
<h3>Foo</h3>
<h4>Bar</h3>
<h5>Foo</h5>
</div>
</body>
</html>
When I replace \r\n with \n amavisd-new seems to find the header just fine.
So it seems to me that amavisd-new isn`t keeping up to the old RFC 822.
Is there a special reason why amavis should even consider this header bad?
For the information I used a simple test mail with php
Simple test code where it fails upon:
<?
// message
$message = "
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=iso-8859-1\">
<style type=\"text/css\">
<!--
body {
background-color: #FFFFFF;
}
-->
</style>
</head>
<body>
<div align=\"center\">
<p> Image testing</p>
<img src=\"http://www.iu.nl/nl/logo04.gif\">
<p> Table testing </p>
<table>
<tr>
<th> Test</th
</tr>
<tr>
<td> Testing</td>
</tr>
</table>
<p> Text size testing </p>
<h1>Foo</h1>
<h2>Bar</h2>
<h3>Foo</h3>
<h4>Bar</h3>
<h5>Foo</h5>
</div>
</body>
</html>
";
// Recipient
$to = "[EMAIL PROTECTED]";
// Subject
$subject = "Testing html mail";
// headers
$headers = "From: Matthew <[EMAIL PROTECTED]>\r\n";
$headers .= "Reply-To: Matthew <[EMAIL PROTECTED]>\r\n";
$headers .= "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1" . "\r\n";
// Lets mail this test
mail($to, $subject, $message, $headers);
?>
Thanks
With kind regards
Matthew Whittaker-Williams
--
Unix system & Network Engineer
Internet Unie Services B.V.
Postbus 23667
1100 ED AMSTERDAM
Tel: +31(0)20 463 0506
Fax: +31(0)20 463 2146
Email: [EMAIL PROTECTED]
URL: http://iu.nl
PGP: 0x08A909D0
Ripe nic-handle: MW2861-RIPE
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/