Enable Antispam / Bayes rules

Hello,

I’ve noticed in the configuration files on github that you have enabled the Dovecot antispam plugin to detect when a message moves between folders so we can pass it to sa-learn for training.

I can see this working when emails are moved using the command:

# sa-learn --dbpath /var/mail/.spamassassin --dump magic
0.000          0          3          0  non-token data: bayes db version
0.000          0        313          0  non-token data: nspam
0.000          0        481          0  non-token data: nham
0.000          0      71445          0  non-token data: ntokens
0.000          0 1369826883          0  non-token data: oldest atime
0.000          0 1411039164          0  non-token data: newest atime
0.000          0          0          0  non-token data: last journal sync atime
0.000          0          0          0  non-token data: last expiry atime
0.000          0          0          0  non-token data: last expire atime delta
0.000          0          0          0  non-token data: last expire reduction count

However do we also need to enable / un comment these in the spamassasin conf file to make use of the learned bayes rules?

# /etc/spamassasin/local.cf 
bayes_path /var/mail/.spamassassin/bayes

Thanks!

Could you explain on what you did to enable this? Is just adding that one line to > /etc/spamassasin/local.cf ? Theres no file at > /var/mail/.spamassassin/bayes?

Also, when I run this command, sa-learn --dbpath /var/mail/.spamassassin --dump magic I get this output ?

ERROR: Bayes dump returned an error, please re-run with -D for more information

@madmax /var/mail/.spamassassin/ directory and files will be created when you teach spamassasin by moving emails in / out of the Spam folder.