Page 1 of 1

BAD-HEADER in "Email Notification On Job Completion"

Posted: June 25th, 2010, 12:28 pm
by josz
Version: 0.5.2-1 Final
OS: Debian-Lenny
Install-type: debian repository
Skin: Default
Firewall Software: iptables
IPV6? no
reproducible? yes

In every "Email Notification On Job Completion", there is a BAD-HEADER detected by Amavis caused by:
Duplicate header field: "Content-Transfer-Encoding"

In the email-header there are 2 "Content-Transfer-Encoding". I can not figure out where this generated.

Below are my email headers

Code: Select all

Delivered-To: admin@##########.nl
Received: from localhost (kast.##########.nl [127.0.0.1])
	by mail.##########.nl (Postfix) with ESMTP id 7645C23406
	for <admin@##########.nl>; Fri, 25 Jun 2010 14:59:57 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; d=##########.nl;
	s=2009-dkim; t=1277470797; bh=Dtf51z5Qj3doRPckXKS0FVQr+x4=; h=From;
	b=dxKt3lqMXcGYCvh+UQGZi35EoVvJm/lhQ5+uGThGQeoH+TIa5BxklYXVChms5yUD3
	PKogvXxpD0t77xmkxLvimwo7VbFPJclQYMaaFrmJRpbyf1Cwg7duaOKe7f5vuIQlKkM
	g9gS0UOGBVJIQIE2bcPbkTFNKNIht/DDV2sJYNs=
X-Quarantine-ID: <5BDjEAFxJtYT>
X-Virus-Scanned: Debian amavisd-new at ##########.nl
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field:
	"Content-Transfer-Encoding"
X-Spam-Flag: NO
X-Spam-Score: -4.273
X-Spam-Level: 
X-Spam-Status: No, score=-4.273 required=2.6 tests=[ALL_TRUSTED=-1.8,
	AWL=0.126, BAYES_00=-2.599] autolearn=ham
Received: from mail.##########.nl ([127.0.0.1])
	by localhost (kast.##########.nl [127.0.0.1]) (amavisd-new, port 10026)
	with ESMTP id 5BDjEAFxJtYT for <admin@##########.nl>;
	Fri, 25 Jun 2010 14:59:54 +0200 (CEST)
Received: from kast.##########.nl (kast.##########.nl [127.0.0.1])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.##########.nl (Postfix) with ESMTPS id 5450A233FE
	for <admin@##########.nl>; Fri, 25 Jun 2010 14:59:54 +0200 (CEST)
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
To: admin@##########.nl
Subject: SABnzbd: opdracht comchipjuli2010 is klaar
Date: Fri, 25 Jun 2010 12:59:53 +0000
From: sabnzb@##########.nl
X-priority: 5
X-MS-priority: 5
Content-Transfer-Encoding: quoted-printable
Message-Id: <20100625125954.5450A233FE@mail.##########.nl>



Re: BAD-HEADER in "Email Notification On Job Completion"

Posted: June 26th, 2010, 2:47 am
by shypike
They may indeed be multiple headers, I'll check that.

Kind of a dumb action by Amavis, I'd say.
What's the problem with having two (non-contradictory) headers?
I don't even think it's a email protocol violation.

Re: BAD-HEADER in "Email Notification On Job Completion"

Posted: June 26th, 2010, 3:39 am
by josz
Thanks,
you are right it's not a violation of the spec's

RFC822 (section 4.1, ‘Syntax’) notes that:

“This specification permits multiple occurrences of most fields. Except as noted, their interpretation is not specified here, and their use is discouraged.”.

But Amavis would be happy if you can fix it ;).

Jos

Re: BAD-HEADER in "Email Notification On Job Completion"

Posted: June 27th, 2010, 8:30 am
by shypike
Will be fixed in 0.5.3.
It's actually a bug (or weak implementation) in the Python email library.
A work-around is easy.