Spamassassin autolearn


Oct 22, 2017
Hi. Can anyone tell what should be the correct settings for bayes autolearn?

Where shoud i set thresholds and other
I am also interested in this question.
For starters, I did these actions:
cp /var/lib/pmg/templates/ /etc/pmg/templates/
vim /etc/pmg/templates/
# ...
bayes_auto_learn 1

Log before:
SA score=1/5 time=3.518 bayes=undefined autolearn=no autolearn_force=no

Log after:
SA score=0/5 time=4.529 bayes=undefined autolearn=ham autolearn_force=no
I did the same and added this lines in /etc/pmg/templates/
use_bayes_rules 1
bayes_auto_learn 1
bayes_auto_learn_threshold_nonspam -0.1
bayes_auto_learn_threshold_spam 10

Nonspam messages learned but spam is not.

sa-learn --dump-magic shows following:

0.000 0 46 0 non-token data: nspam
0.000 0 522 0 non-token data: nham

But this 46 tokens was learned a long time ago, and now this counter does not changing even though i have many spam messages with score 10 and more
0.000 0 4 0 non-token data: nspam
0.000 0 473 0 non-token data: nham
0.000 0 9 0 non-token data: nspam
0.000 0 499 0 non-token data: nham


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!