bugSpamAssassin Milter Plugin - Bugs: bug #6970, extra space in spamass-milter...

 
 

bug #6970: extra space in spamass-milter generated header

Submitted by:  None
Submitted on:  Wed 24 Dec 2003 04:45:05 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Dan Nelson <dnelson>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 14 May 2004 03:13:53 PM UTC, comment #1:

I submitted a patch yesterday to fix this problem. The patch seems to have been deleted from this website since then. You can find a copy of this patch on the spamassassin mailing list if you search the archive for 'first hop patch'.

This problem exists with spamass-milter-0.2.0 when used with the current (2.63) version of spamassassin. To date, this problem has not been solved.

Anonymous
Wed 24 Dec 2003 04:45:05 AM UTC, original submission:

Since milters are called before the local MTA has had a chance to add its headers, spamass-milter 0.2.0 adds the relevant header when it passes the email to SpamAssassin so that SpamAssassin can perform checks (such as RBL) on the sending MTA.

The following code in spamass-milter.cpp constructs the header and passes it to SpamAssassin:
assassin->output((string)"Received: from "+macro_s+" ("+smfi_getsymval(ctx,"_")+") by "+smfi_getsymval(ctx,"j")+"; "+macro_b+"\r\n");

There's a slight problem that occurs when macro_b is not defined. macro_b is defined if it is defined within the Sendmail configuration. When macro_b is not defined the resulting header that is sent to SpamAssassin is left with a whitespace character immediately preceeding the carriage return character.

When SpamAssassin parses headers its regexes only match headers ending with a non-whitespace character followed by the carriage return. As a result if macro_b is not defined then SpamAssassin will not parse the header spamass-milter supplies because of the extra whitespace. This breaks a couple of features of SpamAssassin (such as the -notfirsthop DNS checks) since SpamAssassin assumes that it knows the header added by the local MTA (or spamass-milter in this case).

My suggestion is to append the whitespace and macro_b iff macro_b is defined. When not defined the header would terminate with a semicolon followed by carriage return.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #1310:  spamass-milter-mm.patch added by None (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 14 May 2004 03:13:54 PM UTCNoneAttached File-=>Added spamass-milter-mm.patch, #1302
Thu 13 May 2004 09:44:46 PM UTCdnelsonStatusNone=>Fixed
  Assigned toNone=>dnelson
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1