/[smeserver]/rpms/smeserver-spamassassin/sme9/smeserver-spamassassin-2.4.0-bz10360-auto_learn.patch
ViewVC logotype

Annotation of /rpms/smeserver-spamassassin/sme9/smeserver-spamassassin-2.4.0-bz10360-auto_learn.patch

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


Revision 1.1 - (hide annotations) (download)
Wed Jun 28 18:47:49 2017 UTC (7 years, 4 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-spamassassin-2_4_0-9_el6_sme, HEAD
* Wed Jun 28 2017 Jean-Philipe Pialasse <tests@pialasse.com> 2.4.0-9.sme
- disable auto_learn by default when enabling Bayes [SME: 10360]
- added properties UseBayesAutoLearn, BayesAutoLearnThresholdSpam and
BayesAutoLearnThresholdNonSpam

1 unnilennium 1.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     +}

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