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/03/12 20:00:19 UTC
svn commit: rev 9387 - in incubator/spamassassin/trunk: lib/Mail/SpamAssassin lib/Mail/SpamAssassin/Message rules
Author: quinlan
Date: Fri Mar 12 11:00:18 2004
New Revision: 9387
Modified:
incubator/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm
incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm
incubator/spamassassin/trunk/rules/70_testing.cf
Log:
bug 3163: probable improvement of HTML obfuscation test
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 Fri Mar 12 11:00:18 2004
@@ -987,6 +987,9 @@
if ($self->{html_text}[-1] =~ /\S$/s && $text =~ /^\S/s) {
$self->{html}{obfuscation}++;
}
+ if ($self->{html_text}[-1] =~ /\S\z/ && $text =~ /^\S/) {
+ $self->{html}{t_obfuscation}++;
+ }
if ($self->{html_text}[-1] =~ /\b(\w{1,7})$/s) {
my $start = length($1);
if ($text =~ /^(\w{1,7})\b/s) {
Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm (original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/Message/Node.pm Fri Mar 12 11:00:18 2004
@@ -383,6 +383,9 @@
if (exists $r->{tags} && exists $r->{obfuscation}) {
$r->{obfuscation_ratio} = $r->{obfuscation} / $r->{tags};
}
+ if (exists $r->{tags} && exists $r->{t_obfuscation}) {
+ $r->{t_obfuscation_ratio} = $r->{t_obfuscation} / $r->{tags};
+ }
if (exists $r->{attr_bad} && exists $r->{attr_all}) {
$r->{attr_bad} = $r->{attr_bad} / $r->{attr_all};
}
Modified: incubator/spamassassin/trunk/rules/70_testing.cf
==============================================================================
--- incubator/spamassassin/trunk/rules/70_testing.cf (original)
+++ incubator/spamassassin/trunk/rules/70_testing.cf Fri Mar 12 11:00:18 2004
@@ -709,3 +709,18 @@
body T_BILL_1618 /\bs\W{0,4}1618\b/i
describe T_BILL_1618 Possible mention of bill 1618 (anti-spam bill)
+# bug 3163
+body T_HTML_OBFUSCATE_00_05 eval:html_range('obfuscation_ratio','.0','.05')
+body T_HTML_OBFUSCATE_05_10 eval:html_range('obfuscation_ratio','.05','.1')
+body T_HTML_OBFUSCATE2_00_05 eval:html_range('t_obfuscation_ratio','.0','.05')
+body T_HTML_OBFUSCATE2_05_10 eval:html_range('t_obfuscation_ratio','.05','.1')
+body T_HTML_OBFUSCATE2_00_10 eval:html_range('t_obfuscation_ratio','.0','.1')
+body T_HTML_OBFUSCATE2_10_20 eval:html_range('t_obfuscation_ratio','.1','.2')
+body T_HTML_OBFUSCATE2_20_30 eval:html_range('t_obfuscation_ratio','.2','.3')
+body T_HTML_OBFUSCATE2_30_40 eval:html_range('t_obfuscation_ratio','.3','.4')
+body T_HTML_OBFUSCATE2_40_50 eval:html_range('t_obfuscation_ratio','.4','.5')
+body T_HTML_OBFUSCATE2_50_60 eval:html_range('t_obfuscation_ratio','.5','.6')
+body T_HTML_OBFUSCATE2_60_70 eval:html_range('t_obfuscation_ratio','.6','.7')
+body T_HTML_OBFUSCATE2_70_80 eval:html_range('t_obfuscation_ratio','.7','.8')
+body T_HTML_OBFUSCATE2_80_90 eval:html_range('t_obfuscation_ratio','.8','.9')
+body T_HTML_OBFUSCATE2_90_100 eval:html_range('t_obfuscation_ratio','.9','1.0')