Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: kryptos on February 12, 2008, 08:31:13 AM

Title: Spamassassin Bayes
Post by: kryptos 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
Title: Re: Spamassassin Bayes
Post by: raem on February 12, 2008, 09:18:13 AM
kryptos

Follow the whole Howto at
http://www.sonoracomm.com/index.php?option=com_content&task=view&id=49&Itemid=32
Title: Re: Spamassassin Bayes
Post by: dpearceMN 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
Title: Re: Spamassassin Bayes
Post by: brianr 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


Title: Re: Spamassassin Bayes
Post by: kryptos 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
Title: Re: Spamassassin Bayes
Post by: Paul Howard 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.
Title: Re: Spamassassin Bayes
Post by: byte on February 20, 2008, 07:31:12 PM
Moving this topic to the SME 7.x contribs forum, it is more appropriate there. Thanks!
Title: Re: Spamassassin Bayes
Post by: mmccarn 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...