You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by qu...@apache.org on 2004/04/21 08:06:59 UTC

svn commit: rev 10146 - incubator/spamassassin/trunk/lib/Mail/SpamAssassin

Author: quinlan
Date: Tue Apr 20 23:06:58 2004
New Revision: 10146

Modified:
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
Log:
bug 3285: SUSPICIOUS_RECIPS triggers on "user@dom.ain" <us...@dom.ain>


Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm	(original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm	Tue Apr 20 23:06:58 2004
@@ -185,6 +185,15 @@
     last if scalar(@address) >= TOCC_SIMILAR_COUNT;
   }
 
+  # remove duplicate addresses only when they appear next to each other
+  my @tmp = @address;
+  my $previous = '';
+  @address = ();
+  foreach my $current (@tmp) {
+    next if ($current eq $previous);
+    push(@address, ($previous = $current));
+  }
+
   # ideas that had both poor S/O ratios and poor hit rates:
   # - testing for reverse sorted recipient lists
   # - testing To: and Cc: headers separately