spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j.@apache.org
Subject svn commit: r374490 - in /spamassassin/branches/3.1: lib/Mail/SpamAssassin/Message/Metadata/Received.pm t/rcvd_parser.t
Date Thu, 02 Feb 2006 20:50:00 GMT
Author: jm
Date: Thu Feb  2 12:49:57 2006
New Revision: 374490

URL: http://svn.apache.org/viewcvs?rev=374490&view=rev
Log:
bug 4759: 'fetchmail marker' only valid in the trusted header set of Received lines

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/viewcvs/spamassassin/branches/3.1/lib/Mail/SpamAssassin/Message/Metadata/Received.pm?rev=374490&r1=374489&r2=374490&view=diff
==============================================================================
--- 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 
2 12:49:57 2006
@@ -257,8 +257,10 @@
 
     if ($in_trusted) {
       push (@{$self->{relays_trusted}}, $relay);
+      $self->{allow_fetchmail_markers} = 1;
     } else {
       push (@{$self->{relays_untrusted}}, $relay);
+      $self->{allow_fetchmail_markers} = 0;
     }
   }
 
@@ -1217,8 +1219,12 @@
 # spamcop does this, and it's a great idea ;)
 sub found_pop_fetcher_sig {
   my ($self) = @_;
-  dbg("received-header: found fetchmail marker, restarting parse");
-  $self->{relays} = [ ];
+  if ($self->{allow_fetchmail_markers}) {
+    dbg("received-header: found fetchmail marker, restarting parse");
+    $self->{relays_trusted} = [ ];
+  } else {
+    dbg("received-header: found fetchmail marker outside trusted area, ignored");
+  }
 }
 
 # ---------------------------------------------------------------------------

Modified: spamassassin/branches/3.1/t/rcvd_parser.t
URL: http://svn.apache.org/viewcvs/spamassassin/branches/3.1/t/rcvd_parser.t?rev=374490&r1=374489&r2=374490&view=diff
==============================================================================
--- spamassassin/branches/3.1/t/rcvd_parser.t (original)
+++ spamassassin/branches/3.1/t/rcvd_parser.t Thu Feb  2 12:49:57 2006
@@ -442,7 +442,7 @@
 
 } => q{
 
-[ ip=159.134.118.16 rdns=mail00.svc.cra.dublin.eircom.net helo=mail00.svc.cra.dublin.eircom.net
by=amgod.boxhost.net ident= envfrom= id=0ACFC31014D auth= ] [ ip=83.70.48.2 rdns=83-70-48-2.bas2.dbn.dublin.eircom.net
helo=?192.168.23.32? by=mail00.svc.cra.dublin.eircom.net ident= envfrom= id= auth= ] [ ip=127.0.0.1
rdns=localhost helo=localhost by=radish.zzzz.org ident= envfrom= id=1398F5900D9 auth= ]
+[ ip=159.134.118.16 rdns=mail00.svc.cra.dublin.eircom.net helo=mail00.svc.cra.dublin.eircom.net
by=amgod.boxhost.net ident= envfrom= id=0ACFC31014D auth= ] [ ip=83.70.48.2 rdns=83-70-48-2.bas2.dbn.dublin.eircom.net
helo=?192.168.23.32? by=mail00.svc.cra.dublin.eircom.net ident= envfrom= id= auth= ]
 
 },
 q{
@@ -465,7 +465,7 @@
 
 } => q{
   
-[ ip=128.200.80.6 rdns=smtp3.es.uci.edu helo=smtp3.es.uci.edu by=amgod.boxhost.net ident=
envfrom= id=87D0A310091 auth= ] [ ip=128.200.80.22 rdns=rigel.oac.uci.edu helo=rigel.oac.uci.edu
by=smtp3.es.uci.edu ident= envfrom= id=i2907ZaF008726 auth= ] [ ip=127.0.0.1 rdns=localhost
helo=localhost by=radish.jmason.org ident= envfrom= id=27B275900D9 auth= ]
+[ ip=128.200.80.6 rdns=smtp3.es.uci.edu helo=smtp3.es.uci.edu by=amgod.boxhost.net ident=
envfrom= id=87D0A310091 auth= ] [ ip=128.200.80.22 rdns=rigel.oac.uci.edu helo=rigel.oac.uci.edu
by=smtp3.es.uci.edu ident= envfrom= id=i2907ZaF008726 auth= ]
   
 },
 q{



Mime
View raw message