Koozali.org: home of the SME Server

Spamassassin Bayes

Offline kryptos

  • *****
  • 245
  • +0/-0
Spamassassin Bayes
« on: February 12, 2008, 08:31:13 AM »
Hi All,

based on the wiki:

Quote
Setup Blacklists & Bayesian Autolearning
(Much of what follows has been shamelessly copied from the Sonoracomm howto)
The default SME settings (as you can see above) do not include DNSBL filtering, spam rejection, or (which is not obvious from the above) bayesian filtering in spamassassin to allow spamassassin to learn from received email and improve over time.

The following command will enable the default blacklists, enable the bayesian learning filter and set thresholds for the bayesian filter.

config setprop spamassassin UseBayes 1
config setprop spamassassin BayesAutoLearnThresholdSpam 4.00
config setprop spamassassin BayesAutoLearnThresholdNonspam 0.10
sa-learn --sync --dbpath /var/spool/spamd/.spamassassin -u spamd
chown spamd.spamd /var/spool/spamd/.spamassassin/bayes_*
chown spamd.spamd /var/spool/spamd/.spamassassin/bayes.mutex
chmod 640 /var/spool/spamd/.spamassassin/bayes_*
setprop qpsmtpd DNSBL enabled
setprop qpsmtpd RHSBL enabled
config setprop spamassassin status enabled
config setprop spamassassin RejectLevel 12
config setprop spamassassin TagLevel 4
config setprop spamassassin Sensitivity custom

When I arrive with this command i end with an error below:


Quote
[root@cdi-postalwise ~]# sa-learn --sync --dbpath /var/spool/spamd/.spamassassin -u spamd
ERROR: configuration specifies 'use_bayes 0', sa-learn disabled


Anybody knows what is the casue for this? Im using SME 7.2


Regards,
Rocel

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Spamassassin Bayes
« Reply #1 on: February 12, 2008, 09:18:13 AM »
...

Offline dpearceMN

  • *
  • 8
  • +0/-0
Re: Spamassassin Bayes
« Reply #2 on: February 13, 2008, 02:29:58 AM »
BTW: There appears to be an error in the above instructions.

setprop qpsmtpd DNSBL enabled
setprop qpsmtpd RHSBL enabled

Should be

config setprop qpsmtpd DNSBL enabled
config setprop qpsmtpd RHSBL enabled

Offline brianr

  • *
  • 990
  • +2/-0
Re: Spamassassin Bayes
« Reply #3 on: February 13, 2008, 10:29:15 AM »
... and after setting the properties, you must at least do:

signal-event email-update

or (better to be sure)

signal-event post-upgrade
signal-event reboot


Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline kryptos

  • *****
  • 245
  • +0/-0
Re: Spamassassin Bayes
« Reply #4 on: February 13, 2008, 10:48:11 AM »
Hi all,

What i did was follow this as Ray suggested
Quote
http://www.sonoracomm.com/index.php?option=com_content&task=view&id=49&Itemid=32
i have done this before i thought following the other instructions from the wiki might work. I don't have any more problem with enabling Bayesian Autolearning. Thanks!


Regards,
Rocel

Offline Paul Howard

  • *
  • 17
  • +0/-0
    • The Devil Wears A Mechanical Heart
Re: Spamassassin Bayes
« Reply #5 on: February 20, 2008, 05:33:20 PM »
ERROR: configuration specifies 'use_bayes 0', sa-learn disabled

Using SME Server 7.3 but if you get the above, you need to change the configuration settings in spam assassin to enable bayes.

Code: [Select]
db configuration setprop spamassassin UseBayes 1
signal-event email-update

The wiki page for reference is http://wiki.contribs.org/DB_Variables_Configuration#SpamAssasin

Posted in case it is of use. Took me a while to find it on the wiki but that was probably just me.

Offline byte

  • *
  • 2,183
  • +2/-0
Re: Spamassassin Bayes
« Reply #6 on: February 20, 2008, 07:31:12 PM »
Moving this topic to the SME 7.x contribs forum, it is more appropriate there. Thanks!
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline mmccarn

  • *
  • 2,651
  • +10/-0
Re: Spamassassin Bayes
« Reply #7 on: February 22, 2008, 04:17:32 PM »
BTW: There appears to be an error in the above instructions.

setprop qpsmtpd DNSBL enabled
setprop qpsmtpd RHSBL enabled

Should be

config setprop qpsmtpd DNSBL enabled
config setprop qpsmtpd RHSBL enabled
I've corrected the wiki entry; thanks!

Kryptos:
Your original extract from the wiki is missing the last line that says signal-event email-update, which would have activated the changes...
« Last Edit: February 22, 2008, 04:25:52 PM by mmccarn »