Mailing List Archive

svn commit: r442679 - in /spamassassin/trunk: lib/Mail/SpamAssassin/Message/Metadata/Received.pm t/rcvd_parser.t
Author: jm
Date: Tue Sep 12 12:31:22 2006
New Revision: 442679

URL: http://svn.apache.org/viewvc?view=rev&rev=442679
Log:
bug 5098: add support for ecelerity Received headers, thanks to Joe Schaefer <joe+gmane at sunstarsys.com>

Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Message/Metadata/Received.pm
spamassassin/trunk/t/rcvd_parser.t

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Message/Metadata/Received.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Message/Metadata/Received.pm?view=diff&rev=442679&r1=442678&r2=442679
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Message/Metadata/Received.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Message/Metadata/Received.pm Tue Sep 12 12:31:22 2006
@@ -380,6 +380,14 @@
}
}

+ if (/ecelerity /) {
+ if (/^from \(\[(${IP_ADDRESS}):\d+\] helo=(\S+)\) by (\S+) /) {
+ $ip = $1; $helo = $2; $by = $3;
+ / id (\S+) / and $id = $1;
+ goto enough;
+ }
+ }
+
if (/Exim/) {
# one of the HUGE number of Exim formats :(
# This must be scriptable. (update: it is. cf bug 3950, 3582)

Modified: spamassassin/trunk/t/rcvd_parser.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/rcvd_parser.t?view=diff&rev=442679&r1=442678&r2=442679
==============================================================================
--- spamassassin/trunk/t/rcvd_parser.t (original)
+++ spamassassin/trunk/t/rcvd_parser.t Tue Sep 12 12:31:22 2006
@@ -18,7 +18,7 @@

use lib '.'; use lib 't';
use SATest; sa_t_init("rcvd_parser");
-use Test; BEGIN { plan tests => 50 };
+use Test; BEGIN { plan tests => 53 };


use strict;
@@ -107,6 +107,39 @@
} => q{

[ ip=61.31.138.57 rdns= helo=0 by=nccdi.com ident= envfrom= id= auth= ]
+
+},
+q{
+
+Received: from ([192.168.1.205:50387] helo=i6.prod.democracyinaction.com)
+ by m12.prod.democracyinaction.com (ecelerity 2.1.1.3 r(11743)) with ESMTP
+ id 80/0A-02454-4DCB6054 for <example@vandinter.org>; Tue, 12 Sep 2006 09:57:40 -0400
+
+} => q{
+
+[ ip=192.168.1.205 rdns= helo=i6.prod.democracyinaction.com by=m12.prod.democracyinaction.com ident= envfrom= id=80/0A-02454-4DCB6054 auth= ]
+
+},
+q{
+
+Received: from [127.0.0.1] ([127.0.0.1:50024])
+ by bm1-13.ed10.com (ecelerity 2.1.1.8 r(12431)) with ECSTREAM
+ id 10/BD-03444-F4DB6054 for <example@vandinter.org>; Tue, 12 Sep 2006 09:59:43 -0400
+
+} => q{
+
+[ ip=127.0.0.1 rdns= helo= by=bm1-13.ed10.com ident= envfrom= id=10/BD-03444-F4DB6054 auth= ]
+
+},
+q{
+
+Received: from ([67.91.233.27:53798] helo=eclectic.kluge.net)
+ by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP
+ id 5A/F0-04030-76FF6054 for <dev@spamassassin.apache.org>; Tue, 12 Sep 2006 11:41:44 -0700
+
+} => q{
+
+[ ip=67.91.233.27 rdns= helo=eclectic.kluge.net by=idunn.apache.osuosl.org ident= envfrom= id=5A/F0-04030-76FF6054 auth= ]

},
q{