From 8ca6849166b9289e547dc132e35ba9ac3b6aaedb Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 8 Mar 2017 17:21:06 +0100 Subject: [PATCH] Makes sure bayes autolearn is disabled if not enabled Also adjust default thresholds for autolearning --- .../templates/etc/mail/spamassassin/local.cf/10BayesAutoLearn | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/10BayesAutoLearn b/root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/10BayesAutoLearn index d1605c9..8026678 100644 --- a/root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/10BayesAutoLearn +++ b/root/etc/e-smith/templates/etc/mail/spamassassin/local.cf/10BayesAutoLearn @@ -1,11 +1,16 @@ { if (($spamassassin{UseBayes} || '0') =~ m/^1|on|yes|enabled$/ && ($spamassassin{BayesAutoLearn} || 'no') =~ m/^1|on|yes|enabled$/){ - my $ham_thres = $spamassassin{BayesHamThreshold} || '-0.1'; - my $spam_thres = $spamassassin{BayesSpamThreshold} || '8'; + my $ham_thres = $spamassassin{BayesHamThreshold} || '-1.0'; + my $spam_thres = $spamassassin{BayesSpamThreshold} || '6'; $OUT .=<<"_EOF"; bayes_auto_learn 1 bayes_auto_learn_threshold_nonspam $ham_thres bayes_auto_learn_threshold_spam $spam_thres _EOF } + else{ + $OUT .=<<"_EOF"; +bayes_auto_learn 0 +_EOF + } }