You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by km...@apache.org on 2014/02/20 19:02:46 UTC

svn commit: r1570286 - in /spamassassin/trunk: lib/Mail/SpamAssassin/ lib/Mail/SpamAssassin/Plugin/ rules/ rulesrc/sandbox/kmcgrail/

Author: kmcgrail
Date: Thu Feb 20 18:02:45 2014
New Revision: 1570286

URL: http://svn.apache.org/r1570286
Log:
disabling hash rules correctly in 20_ac_rules_test.cf until we have a plugin, bug 7013 to change BAYES_99 back and make BAYES_999 an overlap rule, bug 7015 for untaint var bug thanks to Tomasz Potega

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm
    spamassassin/trunk/lib/Mail/SpamAssassin/Util.pm
    spamassassin/trunk/rules/23_bayes.cf
    spamassassin/trunk/rules/30_text_de.cf
    spamassassin/trunk/rules/30_text_fr.cf
    spamassassin/trunk/rules/30_text_nl.cf
    spamassassin/trunk/rules/30_text_pl.cf
    spamassassin/trunk/rules/30_text_pt_br.cf
    spamassassin/trunk/rules/50_scores.cf
    spamassassin/trunk/rules/60_shortcircuit.cf
    spamassassin/trunk/rulesrc/sandbox/kmcgrail/20_ac_rules_test.cf

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm?rev=1570286&r1=1570285&r2=1570286&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/AutoLearnThreshold.pm Thu Feb 20 18:02:45 2014
@@ -125,7 +125,7 @@ the spaminess of a message.
 With C<bayes_auto_learn_on_error> off, autolearning will be performed
 even if bayes classifier already agrees with the new classification (i.e.
 yielded BAYES_00 for what we are now trying to teach it as ham, or yielded
-BAYES_99 / BAYES_999 for spam). This is a traditional setting, the default was chosen
+BAYES_99 for spam). This is a traditional setting, the default was chosen
 to retain backward compatibility.
 
 With C<bayes_auto_learn_on_error> turned on, autolearning will be performed
@@ -241,7 +241,7 @@ sub autolearn_discriminator {
     my $tests = $scan->get_tag('TESTS');
     if (defined $tests && $tests ne 'none') {
       my %t = map { ($_,1) } split(/,/, $tests);
-      if ($isspam && ($t{'BAYES_99'} || $t{'BAYES_999'}) || !$isspam && $t{'BAYES_00'}) {
+      if ($isspam && $t{'BAYES_99'} || !$isspam && $t{'BAYES_00'}) {
         dbg("learn: auto-learn? no: learn-on-error, %s, already classified ".
             "as such",  $isspam ? 'spam' : 'ham');
         return;

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Util.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Util.pm?rev=1570286&r1=1570285&r2=1570286&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Util.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Util.pm Thu Feb 20 18:02:45 2014
@@ -285,7 +285,7 @@ sub untaint_var {
   my $r = ref $_[0];
   if (!$r) {
     no re 'taint';  # override a  "use re 'taint'"  from outer scope
-    return if !defined $_[0];
+    return undef if !defined $_[0];
     local($1); # avoid Perl taint bug: tainted global $1 propagates taintedness
     $_[0] =~ /^(.*)\z/s;
     return $1;

Modified: spamassassin/trunk/rules/23_bayes.cf
URL: http://svn.apache.org/viewvc/spamassassin/trunk/rules/23_bayes.cf?rev=1570286&r1=1570285&r2=1570286&view=diff
==============================================================================
--- spamassassin/trunk/rules/23_bayes.cf (original)
+++ spamassassin/trunk/rules/23_bayes.cf Thu Feb 20 18:02:45 2014
@@ -41,7 +41,9 @@ body BAYES_50		eval:check_bayes('0.40', 
 body BAYES_60		eval:check_bayes('0.60', '0.80')
 body BAYES_80		eval:check_bayes('0.80', '0.95')
 body BAYES_95		eval:check_bayes('0.95', '0.99')
-body BAYES_99		eval:check_bayes('0.99', '0.999')
+body BAYES_99		eval:check_bayes('0.99', '1.00')
+
+#Additional rule to add more of a score to BAYES_99 FOR 99.9% to 100%
 body BAYES_999		eval:check_bayes('0.999', '1.00')
 
 tflags BAYES_00		nice learn
@@ -63,7 +65,7 @@ describe BAYES_50	Bayes spam probability
 describe BAYES_60	Bayes spam probability is 60 to 80%
 describe BAYES_80	Bayes spam probability is 80 to 95%
 describe BAYES_95	Bayes spam probability is 95 to 99%
-describe BAYES_99	Bayes spam probability is 99 to 99.9%
+describe BAYES_99	Bayes spam probability is 99 to 100%
 describe BAYES_999      Bayes spam probability is 99.9 to 100%
 
 endif

Modified: spamassassin/trunk/rules/30_text_de.cf
URL: http://svn.apache.org/viewvc/spamassassin/trunk/rules/30_text_de.cf?rev=1570286&r1=1570285&r2=1570286&view=diff
==============================================================================
--- spamassassin/trunk/rules/30_text_de.cf (original)
+++ spamassassin/trunk/rules/30_text_de.cf Thu Feb 20 18:02:45 2014
@@ -326,7 +326,7 @@ lang de describe BAYES_50 Spamwahrschein
 lang de describe BAYES_60 Spamwahrscheinlichkeit nach Bayes-Test: 60-80%
 lang de describe BAYES_80 Spamwahrscheinlichkeit nach Bayes-Test: 80-95%
 lang de describe BAYES_95 Spamwahrscheinlichkeit nach Bayes-Test: 95-99%
-lang de describe BAYES_99 Spamwahrscheinlichkeit nach Bayes-Test: 99-99.9%
+lang de describe BAYES_99 Spamwahrscheinlichkeit nach Bayes-Test: 99-100%
 lang de describe BAYES_999 Spamwahrscheinlichkeit nach Bayes-Test: 99.9-100%
 endif
 #

Modified: spamassassin/trunk/rules/30_text_fr.cf
URL: http://svn.apache.org/viewvc/spamassassin/trunk/rules/30_text_fr.cf?rev=1570286&r1=1570285&r2=1570286&view=diff
==============================================================================
--- spamassassin/trunk/rules/30_text_fr.cf (original)
+++ spamassassin/trunk/rules/30_text_fr.cf Thu Feb 20 18:02:45 2014
@@ -79,7 +79,7 @@ lang fr describe BAYES_50	L'algorithme B
 lang fr describe BAYES_60	L'algorithme Bayésien a évalué la probabilité de spam entre 60 et 80%
 lang fr describe BAYES_80	L'algorithme Bayésien a évalué la probabilité de spam entre 80 et 95%
 lang fr describe BAYES_95	L'algorithme Bayésien a évalué la probabilité de spam entre 95 et 99%
-lang fr describe BAYES_99	L'algorithme Bayésien a évalué la probabilité de spam entre 99 et 99.9%
+lang fr describe BAYES_99	L'algorithme Bayésien a évalué la probabilité de spam entre 99 et 100%
 lang fr describe BAYES_999      L'algorithme Bayésien a évalué la probabilité de spam entre 99.9 et 100%
 endif
 

Modified: spamassassin/trunk/rules/30_text_nl.cf
URL: http://svn.apache.org/viewvc/spamassassin/trunk/rules/30_text_nl.cf?rev=1570286&r1=1570285&r2=1570286&view=diff
==============================================================================
--- spamassassin/trunk/rules/30_text_nl.cf (original)
+++ spamassassin/trunk/rules/30_text_nl.cf Thu Feb 20 18:02:45 2014
@@ -245,7 +245,7 @@ lang nl describe BAYES_50               
 lang nl describe BAYES_60                        Bayesiaanse kans op spam is 60 tot 80%
 lang nl describe BAYES_80                        Bayesiaanse kans op spam is 80 tot 95%
 lang nl describe BAYES_95                        Bayesiaanse kans op spam is 95 tot 99%
-lang nl describe BAYES_99                        Bayesiaanse kans op spam is 99 tot 99.9%
+lang nl describe BAYES_99                        Bayesiaanse kans op spam is 99 tot 100%
 lang nl describe BAYES_999                       Bayesiaanse kans op spam is 99.9 tot 100%
 endif
 #

Modified: spamassassin/trunk/rules/30_text_pl.cf
URL: http://svn.apache.org/viewvc/spamassassin/trunk/rules/30_text_pl.cf?rev=1570286&r1=1570285&r2=1570286&view=diff
==============================================================================
--- spamassassin/trunk/rules/30_text_pl.cf (original)
+++ spamassassin/trunk/rules/30_text_pl.cf Thu Feb 20 18:02:45 2014
@@ -73,7 +73,7 @@ lang pl describe BAYES_50		Bayesowskie p
 lang pl describe BAYES_60		Bayesowskie prawdopodobieñstwo spamu wynosi 60 do 80%
 lang pl describe BAYES_80		Bayesowskie prawdopodobieñstwo spamu wynosi 80 do 95%
 lang pl describe BAYES_95		Bayesowskie prawdopodobieñstwo spamu wynosi 95 do 99%
-lang pl describe BAYES_99		Bayesowskie prawdopodobieñstwo spamu wynosi 99 do 99.9%
+lang pl describe BAYES_99		Bayesowskie prawdopodobieñstwo spamu wynosi 99 do 100%
 lang pl describe BAYES_999              Bayesowskie prawdopodobieñstwo spamu wynosi 99.9 do 100%
 endif
 #

Modified: spamassassin/trunk/rules/30_text_pt_br.cf
URL: http://svn.apache.org/viewvc/spamassassin/trunk/rules/30_text_pt_br.cf?rev=1570286&r1=1570285&r2=1570286&view=diff
==============================================================================
--- spamassassin/trunk/rules/30_text_pt_br.cf (original)
+++ spamassassin/trunk/rules/30_text_pt_br.cf Thu Feb 20 18:02:45 2014
@@ -485,7 +485,7 @@ lang pt_BR describe BAYES_50 Probabilida
 lang pt_BR describe BAYES_60 Probabilidade de ser spam entre 60 to 80%
 lang pt_BR describe BAYES_80 Probabilidade de ser spam entre 80 to 95%
 lang pt_BR describe BAYES_95 Probabilidade de ser spam entre 95 to 99%
-lang pt_BR describe BAYES_99 Probabilidade de ser spam entre 99 to 99.9%
+lang pt_BR describe BAYES_99 Probabilidade de ser spam entre 99 to 100%
 lang pt_BR describe BAYES_999 Probabilidade de ser spam entre 99.9 to 100%
 endif
 #

Modified: spamassassin/trunk/rules/50_scores.cf
URL: http://svn.apache.org/viewvc/spamassassin/trunk/rules/50_scores.cf?rev=1570286&r1=1570285&r2=1570286&view=diff
==============================================================================
--- spamassassin/trunk/rules/50_scores.cf (original)
+++ spamassassin/trunk/rules/50_scores.cf Thu Feb 20 18:02:45 2014
@@ -681,7 +681,7 @@ score BAYES_60  0  0  2.5    1.5
 score BAYES_80  0  0  2.7    2.0
 score BAYES_95  0  0  3.2    3.0
 score BAYES_99  0  0  3.8    3.5
-score BAYES_999 0  0  4.0    3.7
+score BAYES_999 0  0  0.2    0.2
 endif
 
 # Informational rules about Received header parsing

Modified: spamassassin/trunk/rules/60_shortcircuit.cf
URL: http://svn.apache.org/viewvc/spamassassin/trunk/rules/60_shortcircuit.cf?rev=1570286&r1=1570285&r2=1570286&view=diff
==============================================================================
--- spamassassin/trunk/rules/60_shortcircuit.cf (original)
+++ spamassassin/trunk/rules/60_shortcircuit.cf Thu Feb 20 18:02:45 2014
@@ -35,7 +35,6 @@ priority USER_IN_BLACKLIST_TO   -900
 priority USER_IN_BLACKLIST      -900
 
 priority BAYES_99               -400
-priority BAYES_999              -400
 
 ###########################################################################
 

Modified: spamassassin/trunk/rulesrc/sandbox/kmcgrail/20_ac_rules_test.cf
URL: http://svn.apache.org/viewvc/spamassassin/trunk/rulesrc/sandbox/kmcgrail/20_ac_rules_test.cf?rev=1570286&r1=1570285&r2=1570286&view=diff
==============================================================================
--- spamassassin/trunk/rulesrc/sandbox/kmcgrail/20_ac_rules_test.cf (original)
+++ spamassassin/trunk/rulesrc/sandbox/kmcgrail/20_ac_rules_test.cf Thu Feb 20 18:02:45 2014
@@ -42,6 +42,24 @@ uri __AC_PHPOFFTOP_URI	/\/php\/off\/[0-9
 uri __AC_PHPOFFSUB_URI	/\/php\/off\/[0-9.]+\/sub\//
     # http://www.shoosecalehhd.us/3345/174/380/1411/2938.11tt1747757AAF11.php
 uri __AC_NUMS_URI	/(?:\/[0-9]+){5}\.[0-9a-zA-Z]+\.(:?php|html)\b/
+    # http://www.chubbydiet.biz/11VP6856DOBTTT53RYM380F1073AHG1687LCS12K1907471II3470154694.php
+uri __AC_LONGSEQ_URI	/\/[A-Z0-9]{50,}\.(?:php|html|cgi)\b/
+    # http://www.losefast.us/1a83066009e4c6a4463ef4bb01/C/
+uri __AC_1SEQC_URI	/\/1[a-z0-9]8[a-z0-9_]{20,}\/C\//
+    # http://www.search-lots-archiv.com/1c8481478cf46e0b6d9dd0e40801/V/F5B03UPMP/8BJ6447LN.jpg
+uri __AC_1SEQV_URI	/\/1[a-z0-9]8[a-z0-9_]{20,}\/V\//
+    # http://www.losefast.us/r/move/254/42182/61283
+uri __AC_RMOVE_URI	/\/r\/move\/[0-9]+\//
+    # http://www.flaxchid.com/mo.n+new1844407650e8crit-ical.32153002was/es?t.816265832
+uri __AC_PUNCTNUMS_URI	/\.com\/[A-Za-z+=\/.?_-]{4,}[0-9]{9,12}[a-z0-9]{1,2}[A-Za-z+=\/.?_-]+[0-9]{7,9}[A-Za-z+=\/.?_-]{6,}[0-9]{7,9}\b/
+    #http://approbativeness57.isfient.me/caller-vulgarize-thriller-formality/forget-diet-pills-and-exercise-get-350-recipes-and-a-paleo-meal-plan/359297028/unjustifiedness.aspx
+uri __AC_NDOMLONGNASPX_URI	/[A-Za-z]+[0-9]{2}\.[A-Za-z0-9-]+\.me\/(?:[A-Za-z0-9-]{10,}\/){2}[0-9]{8,}\/[A-Za-z]+\.aspx/
+    #http://www.honkzoo.org/chd196h4d60c7347h484h886d5b
+uri __AC_CHDSEQ_URI	/\/chd[a-z0-9]{20,}/
+    #http://www.honkzoo.org/mhd196h4d60c7347h484h03c00c
+uri __AC_MHDSEQ_URI	/\/mhd[a-z0-9]{20,}/
+    #http://www.altkangaroo.com/uhd228h4da2fd0c5h49bhff5c2f
+uri __AC_UHDSEQ_URI	/\/uhd[a-z0-9]{20,}/
 
 meta 		AC_SPAMMY_URI_PATTERNS1 (__AC_OUTL_URI && __AC_OUTI_URI)
 describe 	AC_SPAMMY_URI_PATTERNS1	link combos match highly spammy template
@@ -126,22 +144,18 @@ tflags AC_DIV_BONANZA	publish
 #    # http://efordold.me/?h=13579&e=ZWh1ZEAzcGhhc2UuY29t&ar=20713376%2Fvuxtxusnr_ut6umoosrtv%7E53umtfupqnwsyppywn_umlslxpq%2Fypsl_uypvzrr_tztdyumo_toqpqm_tmtceu_tt7uoqq_msm_%2Futdfw3yu_8k_vj_84_je_8_buutyxuo_tlltxveumpmmte3u%2Flt0x0ut0xut7eum_tty1u_ttf1um_tlt2utezdeuteutyutw%2F2utv3utvaut0u_wcvty8uoa2vdz_ox97tdy97utd3aut09ul%2Ftcdautd3ummssrntw3utwv8utweut80utecegutfnutaeut263yutdzeum
 #uri __AC_RHASH2_URI     /\/\?h=[0-9]{4,}&e=[A-Za-z0-9]+AzcGhhc2UuY29t&ar=[A-Za-z0-9%_]{50,}/
 #
+#meta           AC_SPAMMY_URI_PATTERNS5 (__AC_SEQHASH_URI) # || __AC_SEQHASH_URIb || __AC_SEQHASH_URIc) 
+#describe       AC_SPAMMY_URI_PATTERNS5 link combos match highly spammy template
+#score          AC_SPAMMY_URI_PATTERNS5 4.0
+#tflags                 AC_SPAMMY_URI_PATTERNS5 publish
 #
-#    # http://www.chubbydiet.biz/11VP6856DOBTTT53RYM380F1073AHG1687LCS12K1907471II3470154694.php
-#uri __AC_LONGSEQ_URI    /\/[A-Z0-9]{50,}\.(?:php|html|cgi)\b/
-#    # http://www.losefast.us/1a83066009e4c6a4463ef4bb01/C/
-#uri __AC_1SEQC_URI      /\/1[a-z0-9]8[a-z0-9_]{20,}\/C\//
-#    # http://www.search-lots-archiv.com/1c8481478cf46e0b6d9dd0e40801/V/F5B03UPMP/8BJ6447LN.jpg
-#uri __AC_1SEQV_URI      /\/1[a-z0-9]8[a-z0-9_]{20,}\/V\//
-#    # http://www.losefast.us/r/move/254/42182/61283
-#uri __AC_RMOVE_URI      /\/r\/move\/[0-9]+\//
-#    # http://www.flaxchid.com/mo.n+new1844407650e8crit-ical.32153002was/es?t.816265832
-#uri __AC_PUNCTNUMS_URI  /\.com\/[A-Za-z+=\/.?_-]{4,}[0-9]{9,12}[a-z0-9]{1,2}[A-Za-z+=\/.?_-]+[0-9]{7,9}[A-Za-z+=\/.?_-]{6,}[0-9]{7,9}\b/
-#    #http://approbativeness57.isfient.me/caller-vulgarize-thriller-formality/forget-diet-pills-and-exercise-get-350-recipes-and-a-paleo-meal-plan/359297028/unjustifiedness.aspx
-#uri __AC_NDOMLONGNASPX_URI      /[A-Za-z]+[0-9]{2}\.[A-Za-z0-9-]+\.me\/(?:[A-Za-z0-9-]{10,}\/){2}[0-9]{8,}\/[A-Za-z]+\.aspx/
-#    #http://www.honkzoo.org/chd196h4d60c7347h484h886d5b
-#uri __AC_CHDSEQ_URI     /\/chd[a-z0-9]{20,}/
-#    #http://www.honkzoo.org/mhd196h4d60c7347h484h03c00c
-#uri __AC_MHDSEQ_URI     /\/mhd[a-z0-9]{20,}/
-#    #http://www.altkangaroo.com/uhd228h4da2fd0c5h49bhff5c2f
-#uri __AC_UHDSEQ_URI     /\/uhd[a-z0-9]{20,}/
+#meta           AC_SPAMMY_URI_PATTERNS6 (__AC_RHASH_URI) # || __AC_RHASH_URIb || __AC_RHASH_URIc) 
+#describe       AC_SPAMMY_URI_PATTERNS6 link combos match highly spammy template
+#score          AC_SPAMMY_URI_PATTERNS6 4.0
+#tflags                 AC_SPAMMY_URI_PATTERNS6 publish
+#
+#meta           AC_SPAMMY_URI_PATTERNS7 (__AC_RHASH2_URI) # || __AC_RHASH2_URIb || __AC_RHASH2_URIc)
+#describe       AC_SPAMMY_URI_PATTERNS7 link combos match highly spammy template
+#score          AC_SPAMMY_URI_PATTERNS7 4.0
+#tflags                 AC_SPAMMY_URI_PATTERNS7 publish
+