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: <root xxxxxxx>
X-Envelope-To: <matthew iu.nl>
X-Quarantine-ID: <WIsm0Gds-9kP>
X-Amavis-Alert: BAD HEADER Improper use of control character
(char 0D hex):
Reply-To: Matthew <matthew iu.nl>\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 <matthew iu.nl>;
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: matthew iu.nl
Subject: Testing html mail
From: Matthew <matthew iu.nl>
Reply-To: Matthew <matthew iu.nl>
MIME-Version: 1.0
Content-Type: text/html; charset=iso-8859-1
Message-Id: <20060713131208.D4087E4853 xxxxxxx>
Date: Thu, 13 Jul 2006 15:12:08 +0200 (CEST)
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
4.01//EN' 'http://www.w3.o
rg/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/lo
go04.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.o
rg/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/lo
go04.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 = "matthew iu.nl";
// Subject
$subject = "Testing html mail";
// headers
$headers = "From: Matthew <matthew iu.nl>\r\n";
$headers .= "Reply-To: Matthew <matthew iu.nl>\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: m.whittaker-williams iu.nl
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
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|