/[smeserver]/rpms/smeserver-spamassassin/sme10/smeserver-spamassassin-2.6.0-bz8160-auto_learn.patch
ViewVC logotype

Contents of /rpms/smeserver-spamassassin/sme10/smeserver-spamassassin-2.6.0-bz8160-auto_learn.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Wed Jun 28 18:41:51 2017 UTC (7 years, 4 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-spamassassin-2_6_0-8_el7_sme
* Wed Jun 28 2017 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-8.sme
- disable auto_learn by default when enabling Bayes [SME: 8160]
- added properties UseBayesAutoLearn, BayesAutoLearnThresholdSpam and BayesAutoLearnThresholdNonSpam

1 diff -Nur smeserver-spamassassin-2.6.0.old/root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/10use_bayes_auto_learn smeserver-spamassassin-2.6.0/root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/10use_bayes_auto_learn
2 --- smeserver-spamassassin-2.6.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.6.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 +}

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed