You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by do...@apache.org on 2006/10/02 19:00:57 UTC

svn commit: r452120 - in /spamassassin/branches/3.1: lib/Mail/SpamAssassin/Message/Metadata/Received.pm t/rcvd_parser.t

Author: dos
Date: Mon Oct  2 10:00:56 2006
New Revision: 452120

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

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

Modified: spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message/Metadata/Received.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message/Metadata/Received.pm?view=diff&rev=452120&r1=452119&r2=452120
==============================================================================
--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message/Metadata/Received.pm (original)
+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message/Metadata/Received.pm Mon Oct  2 10:00:56 2006
@@ -473,6 +473,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/branches/3.1/t/rcvd_parser.t
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.1/t/rcvd_parser.t?view=diff&rev=452120&r1=452119&r2=452120
==============================================================================
--- spamassassin/branches/3.1/t/rcvd_parser.t (original)
+++ spamassassin/branches/3.1/t/rcvd_parser.t Mon Oct  2 10:00:56 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 <ex...@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 <ex...@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 <de...@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{