You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2004/01/08 03:46:36 UTC

svn commit: rev 6107 - incubator/spamassassin/branches/b2_6_0/lib/Mail/SpamAssassin

Author: jm
Date: Wed Jan  7 18:46:35 2004
New Revision: 6107

Modified:
   incubator/spamassassin/branches/b2_6_0/lib/Mail/SpamAssassin/Received.pm
Log:
oops, wasn't supposed to have committed that.  reverting


Modified: incubator/spamassassin/branches/b2_6_0/lib/Mail/SpamAssassin/Received.pm
==============================================================================
--- incubator/spamassassin/branches/b2_6_0/lib/Mail/SpamAssassin/Received.pm	(original)
+++ incubator/spamassassin/branches/b2_6_0/lib/Mail/SpamAssassin/Received.pm	Wed Jan  7 18:46:35 2004
@@ -652,16 +652,14 @@
     }
 
     # Received: from ironport.com (10.1.1.5) by a50.ironport.com with ESMTP; 01 Apr 2003 12:00:51 -0800
-    # Received: from dyn-81-166-39-132.ppp.tiscali.fr (81.166.39.132) by cpmail.dk.tiscali.com (6.7.018)
     # note: must be before 'Content Technologies SMTPRS' rule, cf. bug 2787
-    if (/^from ([^\d]\S+) \((${IP_ADDRESS})\) by (\S+) /) {
+    if (/^from (\S+) \((${IP_ADDRESS})\) by (\S+) with /) {
       $helo = $1; $ip = $2; $by = $3; goto enough;
     }
 
     # Received: from scv3.apple.com (scv3.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.2.1) with ESMTP id <T6...@mailgate2.apple.com>; Mon, 17 Mar 2003 17:04:54 -0800
     if (/^from (\S+) \((\S+)\) by (\S+) \(/) {
-      return;		# useless without the $ip anyway!
-      #$helo = $1; $rdns = $2; $by = $3; goto enough;
+      $helo = $1; $rdns = $2; $by = $3; goto enough;
     }
 
     # Received: from 01al10015010057.ad.bls.com ([90.152.5.141] [90.152.5.141])
@@ -669,7 +667,7 @@
     if (/^from (\S+) \(\[(\S+)\] \[(\S+)\]\) by (\S+) with /) {
       # not sure what $3 is ;)
       $helo = $1; $ip = $2; $by = $4;
-      goto enough;
+	goto enough;
     }
 
     # Received: from 206.47.0.153 by dm3cn8.bell.ca with ESMTP (Tumbleweed MMS
@@ -832,19 +830,12 @@
 
 enough:
 
-  # flag handovers we couldn't get an IP address from at all
-  if ($ip eq '') {
-    dbg ("received-header: could not parse IP address from: $_");
-  }
-
   $ip = Mail::SpamAssassin::Util::extract_ipv4_addr_from_string ($ip);
-  if (!$ip) {
-    dbg ("received-header: could not parse IPv4 address, assuming IPv6");
+  if (!defined $ip) {
     return;	# ignore IPv6 handovers
   }
 
   if ($ip eq '127.0.0.1') {
-    dbg ("received-header: ignoring localhost handover");
     return;	# ignore localhost handovers
   }