1 |
diff -Nur smeserver-spamassassin-2.4.0.old/root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/10use_bayes_auto_learn smeserver-spamassassin-2.4.0/root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/10use_bayes_auto_learn |
2 |
--- smeserver-spamassassin-2.4.0.old/root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/10use_bayes_auto_learn 1969-12-31 19:00:00.000000000 -0500 |
3 |
+++ smeserver-spamassassin-2.4.0/root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/10use_bayes_auto_learn 2017-06-28 14:35:09.134000000 -0400 |
4 |
@@ -0,0 +1,18 @@ |
5 |
+{ |
6 |
+ return "# bayes disabled" unless $spamassassin{UseBayes}; |
7 |
+ |
8 |
+ my $AutoLearn = $spamassassin{UseBayesAutoLearn} || 0; |
9 |
+ # default SA value of 12 is too high |
10 |
+ my $BayesAutoLearnThresholdSpam = $spamassassin{'BayesAutoLearnThresholdSpam'}||6; |
11 |
+ # 0.10 is spamassassin default but it is too high, set to -1.15. |
12 |
+ my $BayesAutoLearnThresholdNonspam = $spamassassin{'BayesAutoLearnThresholdNonSpam'}|| -1.15; |
13 |
+ |
14 |
+ # should get at least 6: 3 from body and 3 from header. |
15 |
+ # http://spamassassin.apache.org/full/3.1.x/doc/Mail_SpamAssassin_Plugin_AutoLearnThreshold.html |
16 |
+ $BayesAutoLearnThresholdSpam = 6 unless $BayesAutoLearnThresholdSpam >= 6; |
17 |
+ |
18 |
+ $OUT = "bayes_auto_learn $AutoLearn\n"; |
19 |
+ return unless $AutoLearn == 1; |
20 |
+ $OUT .= "bayes_auto_learn_threshold_nonspam $BayesAutoLearnThresholdNonspam\n"; |
21 |
+ $OUT .= "bayes_auto_learn_threshold_spam $BayesAutoLearnThresholdSpam\n"; |
22 |
+} |