Author: tille
Date: Thu Jan  5 22:13:31 2012
New Revision: 3105

URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=3105
Log:
Handle spammy subjects

Modified:
    blends/trunk/team_analysis_tools/get-archive-pages

Modified: blends/trunk/team_analysis_tools/get-archive-pages
URL: 
http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/get-archive-pages?rev=3105&op=diff
==============================================================================
--- blends/trunk/team_analysis_tools/get-archive-pages (original)
+++ blends/trunk/team_analysis_tools/get-archive-pages Thu Jan  5 22:13:31 2012
@@ -333,11 +333,20 @@
                                        last;
                                    }
                                }
+                               my $spamsubject;
+                               my $numspamsubjects = 0;
+                               foreach $spamsubject (@SPAMSUBJECTS) {
+                                   if ( $subject =~ /$spamauthor/ ) {
+                                       $numspamsubjects = 1;
+                                       last;
+                                   }
+                               }
+                               
                                # authors with strange names also provide spam
                                my $countstrangechars = 0;
                                while ($author =~ 
/;\s*&#x[\dA-F][\dA-F][\dA-F]/g) { $countstrangechars++ }
                                
-                               if ( $author =~ /^[-&#x\d;\sA-F\?:,]+$/ || 
$countstrangechars > 7 || $numspamauthors > 0 ) {
+                               if ( $author =~ /^[-&#x\d;\sA-F\?:,]+$/ || 
$countstrangechars > 7 || $numspamauthors > 0 || $numspamsubjects > 0 ) {
                                     # $author =~ /info/i ) { # never had a 
non-spam message from an author whos name contains info
                                     # This is not reliable: We have for 
instance
                                     #   
http://lists.debian.org/debian-security/2003/07/msg00054.html


_______________________________________________
Blends-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/blends-commit

Reply via email to