You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2007/02/02 04:39:54 UTC

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

Author: felicity
Date: Thu Feb  1 19:39:54 2007
New Revision: 502470

URL: http://svn.apache.org/viewvc?view=rev&rev=502470
Log:
bug 5223: fix regexp for sendmail authenticated connections

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=502470&r1=502469&r2=502470
==============================================================================
--- spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message/Metadata/Received.pm (original)
+++ spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message/Metadata/Received.pm Thu Feb  1 19:39:54 2007
@@ -411,7 +411,7 @@
     $auth = $1;
   }
   # Sendmail, MDaemon, some webmail servers, and others
-  elsif (/^from .*?(?:\]\)|\)\]) .*?\(.*?authenticated.*?\).*? by/) {
+  elsif (/^from .*?(?:\](?: \([^)]*\))?\)|\)\]) .*?\(.*?authenticated.*?\).*? by/) {
     $auth = 'Sendmail';
   }
   # Critical Path Messaging Server

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=502470&r1=502469&r2=502470
==============================================================================
--- spamassassin/branches/3.1/t/rcvd_parser.t (original)
+++ spamassassin/branches/3.1/t/rcvd_parser.t Thu Feb  1 19:39:54 2007
@@ -18,7 +18,7 @@
 
 use lib '.'; use lib 't';
 use SATest; sa_t_init("rcvd_parser");
-use Test; BEGIN { plan tests => 53 };
+use Test; BEGIN { plan tests => 54 };
 
 
 use strict;
@@ -577,6 +577,15 @@
  
   [ ip=81.64.155.54 rdns=rousalka.dyndns.org helo=rousalka.dyndns.org by=mx.laposte.net ident= envfrom= id=413489B100C9C1FD auth=CriticalPath ] [ ip=82.68.189.22 rdns=82-68-189-22.dsl.in-addr.zen.co.uk helo=!10.0.0.253! by=ensim.rackshack.net ident= envfrom= id=i8TAFAI25021 auth=Sendmail ] [ ip=213.174.165.187 rdns=!213.174.165.187! helo=!213.174.165.187! by=vsmtp1.tin.it ident= envfrom= id=416A525B0000A53B auth=CriticalPath ] [ ip=66.250.6.18 rdns=Collation_Software.demarc.cogentco.com helo=!10.10.10.215! by=waste.org ident= envfrom= id=i46MehGO005108 auth=Sendmail ] [ ip=82.83.139.45 rdns=dsl-082-083-139-045.arcor-ip.net helo=dsl-082-082-143-115.arcor-ip.net by=postman.arcor.de ident= envfrom= id=i2U75jD1003350 auth=Sendmail ]
   
+},
+q{
+
+Received: from MARISELA (dsl-189-149-70-163.prod-infinitum.com.mx [189.149.70.163] (may be forged)) (authenticated bits=0) by mail.legosoft.com.mx (8.13.8/8.13.8) with ESMTP id kB3G26P6019032 for <rb...@cactus-soft.dyndns.org>; Sun, 3 Dec 2006 10:02:16 -0600 (CST)
+
+} => q{
+
+  [ ip=189.149.70.163 rdns=dsl-189-149-70-163.prod-infinitum.com.mx helo=MARISELA by=mail.legosoft.com.mx ident= envfrom= id=kB3G26P6019032 auth=Sendmail ]
+
 },
 q{