This bug with 'procmail -d user' also causes 'formail -i ...' to
further corrupt the message, but the bug is dependent on the headers
present before the non-RFC compliant 'From ' header.
If we start with a message whose headers begin:
From [EMAIL PROTECTED] Tue Aug 28 20:14:03 2007
Return-path: [EMAIL PROTECTED]
Envelope-to: [EMAIL PROTECTED]
Delivery-date: Tue, 28 Aug 2007 20:14:03 +0100
And then deliver it using 'procmail -d athan', we get:
From [EMAIL PROTECTED] Tue Aug 28 20:14:03 2007
From athan Tue Aug 28 20:14:03 2007
Return-path: [EMAIL PROTECTED]
Envelope-to: [EMAIL PROTECTED]
Delivery-date: Tue, 28 Aug 2007 20:14:03 +0100
Now, within procmail we run it through, bogofilter -e -p -u, and get:
From [EMAIL PROTECTED] Tue Aug 28 20:14:03 2007
From athan Tue Aug 28 20:14:03 2007
Return-path: [EMAIL PROTECTED]
Envelope-to: [EMAIL PROTECTED]
Delivery-date: Tue, 28 Aug 2007 20:14:03 +0100
Then, as bogofilter isn't catching everything, we run it through,
spamassassin, and get:
From [EMAIL PROTECTED] Tue Aug 28 20:14:03 2007
X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on
bowl.fysh.org
X-Spam-Level:
X-Spam-Status: No, score=-1.6 required=3.0
tests=AWL,BAYES_00,UPPERCASE_25_50
autolearn=ham version=3.1.7-deb
From athan Tue Aug 28 20:14:03 2007
Return-path: [EMAIL PROTECTED]
Envelope-to: [EMAIL PROTECTED]
Delivery-date: Tue, 28 Aug 2007 20:14:03 +0100
Note how SpamAssassin has inserted some headers after the properly
formed 'From ' header, but before the improperly formed 'From ' header.
Now we run it hits a procmailrc rule to set Content-Type correctly for
inline PGP signed messages, which filters it through:
formail -i Content-Type: application/pgp; format=text; x-action=sign
and the headers end up as:
From [EMAIL PROTECTED] Tue Aug 28 20:14:03 2007
X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on
bowl.fysh.org
X-Spam-Level:
X-Spam-Status: No, score=-1.6 required=3.0
tests=AWL,BAYES_00,UPPERCASE_25_50
autolearn=ham version=3.1.7-deb
Content-Type: application/pgp; format=text; x-action=sign
From athan Tue Aug 28 20:14:03 2007
Return-path: [EMAIL PROTECTED]
Envelope-to: [EMAIL PROTECTED]
Delivery-date: Tue, 28 Aug 2007 20:14:03 +0100
Note the addition of a blank line, causing premature end of headers.
In fact formail has now not REPLACED the Content-Type header, it's added
a new one. If the 'From ' line is filtered out before calling formail
then things work properly.
It would seem that 'From ' should be turned into something
RFC-compliant, not 'From ', maybe 'Old-From_: ' ?
Now to see if I can make procmail strip/change that badly formed
header
-Ath
--
- Athanasius = Athanasius(at)miggy.org / http://www.miggy.org/
Finger athan(at)fysh.org for PGP key
And it's me who is my enemy. Me who beats me up.
Me who makes the monsters. Me who strips my confidence. Paula Cole - ME
signature.asc
Description: Digital signature