
bugzilla-daemon at bugzilla
Apr 2, 2012, 4:20 PM
Post #5 of 5
(172 views)
Permalink
|
|
[Bug 6783] IP address of NaSMail user should not be subjected to rules
[In reply to]
|
|
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6783 Kevin A. McGrail <kmcgrail [at] pccc> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #4 from Kevin A. McGrail <kmcgrail [at] pccc> 2012-04-02 23:20:00 UTC --- (In reply to comment #2) > Hi Kevin, > > here's one example: > > from 67.85.219.192 (NaSMail authenticated user john.doe) by webmail.example.com > with HTTP; Fri, 30 Mar 2012 12:39:58 +0100 (BST) I prefer real-world examples not sanitized/fake versions. However, the change is small so I've added the rcvd test case and the small regex for NaSMail. The patch below appears to be for 3.3.X but I've made the change only on trunk. Index: lib/Mail/SpamAssassin/Message/Metadata/Received.pm =================================================================== --- lib/Mail/SpamAssassin/Message/Metadata/Received.pm (revision 1308568) +++ lib/Mail/SpamAssassin/Message/Metadata/Received.pm (working copy) @@ -446,7 +446,8 @@ # from 142.169.110.122 (SquirrelMail authenticated user synapse) by # mail.nomis80.org with HTTP; Sat, 3 Apr 2004 10:33:43 -0500 (EST) - if (/ \(SquirrelMail authenticated user /) { + # Expanded to NaSMail Bug 6783 + if (/ \((?:SquirrelMail|NaSMail) authenticated user /) { #REVERTING bug 3236 and implementing re: bug 6549 if (/(${IP_ADDRESS}).{10,80}by (\S+) with HTTP/) { $ip = $1; $by = $2; goto enough; Index: t/rcvd_parser.t =================================================================== --- t/rcvd_parser.t (revision 1308568) +++ t/rcvd_parser.t (working copy) @@ -18,7 +18,7 @@ use lib '.'; use lib 't'; use SATest; sa_t_init("rcvd_parser"); -use Test; BEGIN { plan tests => 142 }; +use Test; BEGIN { plan tests => 143 }; use strict; # format is: @@ -459,8 +459,12 @@ '[ ip=153.90.199.141 rdns= helo= by=web1.cs.montana.edu ident= envfrom= id= auth= msa=0 ]', 'from ausisaps301-dmz.aus.amer.dell.com ([143.166.226.16]) (SquirrelMail authenticated user hoolis); by www.penguintowne.org with HTTP; Mon, 22 Mar 2004 12:54:13 -0600 (CST)' => - '[ ip=143.166.226.16 rdns= helo= by=www.penguintowne.org ident= envfrom= id= auth=Sendmail msa=0 ]' + '[ ip=143.166.226.16 rdns= helo= by=www.penguintowne.org ident= envfrom= id= auth=Sendmail msa=0 ]', + #ADDED PER Bug 6783 + 'from 67.85.219.192 (NaSMail authenticated user john.doe) by webmail.example.com with HTTP; Fri, 30 Mar 2012 12:39:58 +0100 (BST)' => + '[ ip=67.85.219.192 rdns= helo= by=webmail.example.com ident= envfrom= id= auth= msa=0 ]' + ); my $sa = create_saobj(); svn commit -m 'Bug 6783 for NaSMail Received Header' Sending lib/Mail/SpamAssassin/Message/Metadata/Received.pm Sending t/rcvd_parser.t Transmitting file data .. Committed revision 1308610. -- Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
|