spamassassin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From quin...@apache.org
Subject svn commit: rev 6441 - in incubator/spamassassin/trunk: lib/Mail/SpamAssassin rules
Date Tue, 03 Feb 2004 06:02:23 GMT
Author: quinlan
Date: Mon Feb  2 22:02:22 2004
New Revision: 6441

Modified:
   incubator/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm
   incubator/spamassassin/trunk/rules/20_html_tests.cf
   incubator/spamassassin/trunk/rules/70_broken_rules.cf
   incubator/spamassassin/trunk/rules/70_cvs_rules_under_test.cf
Log:
allow HTML comment rules to be specified in html_eval, convert current rules


Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm	(original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm	Mon Feb  2 22:02:22 2004
@@ -717,11 +717,6 @@
   my ($self, $text) = @_;
 
   $self->{html}{comment_text} .= "$text\n";
-  $self->{html}{comment_8bit} = 1 if $text =~ /[\x80-\xff]{3,}/;
-  $self->{html}{comment_email} = 1 if $text =~ /\S+\@\S+/;
-  $self->{html}{comment_egp} = 1 if $text =~ /\S+begin egp html banner\S+/;
-  $self->{html}{comment_saved_url} = 1 if $text =~ /<!-- saved from url=\(\d{4}\)/;
-  $self->{html}{comment_sky} = 1 if $text =~ /SKY-(?:Email-Address|Database|Mailing|List)/;
   $self->{html}{total_comment_length} += length($text) + 7; # "<!--" + "-->"
 
   if (exists $self->{html}{"inside_script"} && $self->{html}{"inside_script"}
> 0)

Modified: incubator/spamassassin/trunk/rules/20_html_tests.cf
==============================================================================
--- incubator/spamassassin/trunk/rules/20_html_tests.cf	(original)
+++ incubator/spamassassin/trunk/rules/20_html_tests.cf	Mon Feb  2 22:02:22 2004
@@ -75,19 +75,20 @@
 body HTML_TABLE_THICK_BORD		eval:html_test('thick_border')
 describe HTML_TABLE_THICK_BORD	HTML table has thick border
 
-body HTML_COMMENT_EMAIL		eval:html_test('comment_email')
+# HTML comment tests
+body HTML_COMMENT_EMAIL		eval:html_eval('comment_text', '=~ /\S+\@\S+/')
 describe HTML_COMMENT_EMAIL	HTML comment contains email address
 
 body HTML_COMMENT_SHOUTING	eval:html_test('comment_shouting')
 describe HTML_COMMENT_SHOUTING	HTML comment inside of "shouting" markup
 
-body HTML_COMMENT_SKY		eval:html_test('comment_sky')
+body HTML_COMMENT_SKY		eval:html_eval('comment_text', '=~ /SKY-(?:Email-Address|Database|Mailing|List)/')
 describe HTML_COMMENT_SKY	HTML comment contains SKY database codes
 
-body HTML_COMMENT_8BITS		eval:html_test('comment_8bit')
+body HTML_COMMENT_8BITS		eval:html_eval('comment_text', '=~ /[\x80-\xff]{3,}/')
 describe HTML_COMMENT_8BITS	HTML comment has 3 consecutive 8-bit chars
 
-body HTML_COMMENT_SAVED_URL	eval:html_test('comment_saved_url')
+body HTML_COMMENT_SAVED_URL	eval:html_eval('comment_text', '=~ /<!-- saved from url=\(\d{4}\)/')
 describe HTML_COMMENT_SAVED_URL	HTML message is a saved web page
 
 body HTML_EMBEDS		eval:html_test('embeds')

Modified: incubator/spamassassin/trunk/rules/70_broken_rules.cf
==============================================================================
--- incubator/spamassassin/trunk/rules/70_broken_rules.cf	(original)
+++ incubator/spamassassin/trunk/rules/70_broken_rules.cf	Mon Feb  2 22:02:22 2004
@@ -381,10 +381,6 @@
 #tflags HOTMAIL_FOOTER5		nice
 #score HOTMAIL_FOOTER5 -0.122 0 0 0
 
-#body HTML_COMMENT_EGP		eval:html_test('comment_egp')
-#describe HTML_COMMENT_EGP	HTML comment contains non-spam Yahoo! Groups banner
-#tflags HTML_COMMENT_EGP		nice
-
 #header IN_REP_TO                exists:In-Reply-To
 #describe IN_REP_TO		Has a In-Reply-To header
 #tflags IN_REP_TO                nice

Modified: incubator/spamassassin/trunk/rules/70_cvs_rules_under_test.cf
==============================================================================
--- incubator/spamassassin/trunk/rules/70_cvs_rules_under_test.cf	(original)
+++ incubator/spamassassin/trunk/rules/70_cvs_rules_under_test.cf	Mon Feb  2 22:02:22 2004
@@ -461,12 +461,6 @@
 rawbody T_HTML_CONVERTED	m{<DIV><!-- Converted from text/plain format -->}
 describe T_HTML_CONVERTED	HTML conversion tool used by spam
 
-# quinlan: testing moving some comment rules from code to here
-body T_HTML_COMMENT_EMAIL	eval:html_eval('comment_text', '=~ /\S+\@\S+/')
-body T_HTML_COMMENT_SKY		eval:html_eval('comment_text', '=~ /SKY-(?:Email-Address|Database|Mailing|List)/')
-body T_HTML_COMMENT_8BITS	eval:html_eval('comment_text', '=~ /[\x80-\xff]{3,}/')
-body T_HTML_COMMENT_SAVED_URL	eval:html_eval('comment_text', '=~ /<!-- saved from url=\(\d{4}\)/')
-
 # another Message-Id format (pick one as MSGID_SPAM_3)
 header T_MSGID_SPAM_3_5		Message-Id =~ /<[a-z]{5,}\@(\S+\.)+\S+>/
 describe T_MSGID_SPAM_3_5	Message-ID has known spammer pattern

Mime
View raw message