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 --- 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 +++ 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 @@ -0,0 +1,18 @@ +{ + return "# bayes disabled" unless $spamassassin{UseBayes}; + + my $AutoLearn = $spamassassin{UseBayesAutoLearn} || 0; + # default SA value of 12 is too high + my $BayesAutoLearnThresholdSpam = $spamassassin{'BayesAutoLearnThresholdSpam'}||6; + # 0.10 is spamassassin default but it is too high, set to -1.15. + my $BayesAutoLearnThresholdNonspam = $spamassassin{'BayesAutoLearnThresholdNonSpam'}|| -1.15; + + # should get at least 6: 3 from body and 3 from header. + # http://spamassassin.apache.org/full/3.1.x/doc/Mail_SpamAssassin_Plugin_AutoLearnThreshold.html + $BayesAutoLearnThresholdSpam = 6 unless $BayesAutoLearnThresholdSpam >= 6; + + $OUT = "bayes_auto_learn $AutoLearn\n"; + return unless $AutoLearn == 1; + $OUT .= "bayes_auto_learn_threshold_nonspam $BayesAutoLearnThresholdNonspam\n"; + $OUT .= "bayes_auto_learn_threshold_spam $BayesAutoLearnThresholdSpam\n"; +}