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 2006/05/16 20:45:00 UTC

svn commit: r407022 - /spamassassin/rules/trunk/sandbox/jm/SendmailID.pm

Author: jm
Date: Tue May 16 11:44:59 2006
New Revision: 407022

URL: http://svn.apache.org/viewcvs?rev=407022&view=rev
Log:
work around a couple of FPs

Modified:
    spamassassin/rules/trunk/sandbox/jm/SendmailID.pm

Modified: spamassassin/rules/trunk/sandbox/jm/SendmailID.pm
URL: http://svn.apache.org/viewcvs/spamassassin/rules/trunk/sandbox/jm/SendmailID.pm?rev=407022&r1=407021&r2=407022&view=diff
==============================================================================
--- spamassassin/rules/trunk/sandbox/jm/SendmailID.pm (original)
+++ spamassassin/rules/trunk/sandbox/jm/SendmailID.pm Tue May 16 11:44:59 2006
@@ -36,20 +36,28 @@
 
   my $rcvd = $pms->get("Received");
   $rcvd =~ s/\s+/ /gs;
-  while ($rcvd =~ / \(8\.[^\/]+\/8\.\S+\) with ESMTP id (\S+) for <[^>]+>; (\S+ \S+ \S+ \S+ ..:..:.. \S+)/g)
+  while ($rcvd =~ / \((8\.[^\/]+)\/8\.\S+\) with ESMTP id (\S+) for <[^>]+>; (\S+ \S+ \S+ \S+ ..:..:.. \S+)/g)
   {
-    my $id = $1;
-    my $date = $2;
+    my $ver = $1;
+    my $id = $2;
+    my $date = $3;
+
+    if ($ver =~ /^8\.9/) {
+      next;         # Nextel FPs
+    }
+
     my $time = Mail::SpamAssassin::Util::parse_rfc822_date($date);
     if (!$time) {       # Time::ParseDate failed
       return 1;
     }
 
     my $id2 = time2smid($time);
-    # warn "JMD $id $id2";
+    my $id3 = time2smid($time - (60*60));   # or the prev hour
+
+    Mail::SpamAssassin::dbg ("sendmailid: match $id vs $id2 or $id3");
     $id =~ s/^(....).*$/$1/;
 
-    if ($id ne $id2) {
+    if ($id ne $id2 && $id ne $id3) {
       return 1;
     }
   }