- Server operating system version
- Ubuntu 22.04
- Plesk version and microupdate number
- Plesk Obsidian 18.0.72 Update 3 / Plesk Obsidian 18.0.72.3
Hello everyone,
I’ve been troubleshooting SpamAssassin on my Plesk server (**Ubuntu 24.04, Plesk Obsidian 18.0.72 Update 3 **, `psa-spamassassin` installed) and discovered what looks like either a bug or at least very confusing behavior.
1. Expectation according to Plesk documentation
Plesk KB states that SpamAssassin (including Bayes) should be trained daily automatically when users move emails into their “Spam” folders.
It also mentions that Bayes will start learning automatically once enough spam/ham samples are present (default: 200 spam + 200 ham).
References:
- How does SpamAssassin training work in Plesk?
- How to train SpamAssassin on Plesk server?
2. Actual behavior on my server
In `/etc/cron.daily/` there is a script called `spamassassin`, but its content is:
→ So the daily training never runs.
Checking logs also shows no sign of `ExecuteSpamtrain` or similar:
Dumping Bayes DB initially showed zero tokens:
Only after running manual training like this:
…I finally got a proper Bayes DB (`nspam = XXXX`, `ntokens = XXXXXXX`).
3. The problem
Without daily Bayes training, even very obvious spam was not recognized.
SpamAssassin headers showed `autolearn=no`, despite plenty of spam in user folders.
Only after manual `sa-learn` did Bayes begin working.
4. Questions
- Is it intentional that the `spamassassin` cronjob is disabled by the psa-spamassassin package?
- If yes, how is Bayes supposed to train itself automatically, as advertised in the docs?
- Shouldn’t there be a default task like `ExecuteSpamtrain` enabled on installation?
5. Suggestion
Either Plesk should re-enable the daily training cron by default,
or at least clearly notify admins in the Panel that Bayes will not learn unless a manual cron is set up.
Otherwise, SpamAssassin in a fresh Plesk installation remains practically untrained → resulting in much more spam delivered to end users (which in my case already led to customer complaints).
Question to the Plesk team / community:
Is this a bug or intended behavior? Has anyone else experienced the same issue?
Thanks.
I’ve been troubleshooting SpamAssassin on my Plesk server (**Ubuntu 24.04, Plesk Obsidian 18.0.72 Update 3 **, `psa-spamassassin` installed) and discovered what looks like either a bug or at least very confusing behavior.
1. Expectation according to Plesk documentation
Plesk KB states that SpamAssassin (including Bayes) should be trained daily automatically when users move emails into their “Spam” folders.
It also mentions that Bayes will start learning automatically once enough spam/ham samples are present (default: 200 spam + 200 ham).
References:
- How does SpamAssassin training work in Plesk?
- How to train SpamAssassin on Plesk server?
2. Actual behavior on my server
In `/etc/cron.daily/` there is a script called `spamassassin`, but its content is:
Code:
#!/bin/sh
# This task was disabled by psa-spamassassin package
exit 0
→ So the daily training never runs.
Checking logs also shows no sign of `ExecuteSpamtrain` or similar:
Code:
grep -i spamtrain /var/log/plesk/panel.log
grep -i ExecuteSpamtrain /var/log/plesk/panel.log
# no results
Dumping Bayes DB initially showed zero tokens:
Code:
sa-learn --dump magic
# nspam = 0, nham = 0
Only after running manual training like this:
Code:
sa-learn --spam /var/qmail/mailnames/*/*/Maildir/.Spam/cur/
…I finally got a proper Bayes DB (`nspam = XXXX`, `ntokens = XXXXXXX`).
3. The problem
Without daily Bayes training, even very obvious spam was not recognized.
SpamAssassin headers showed `autolearn=no`, despite plenty of spam in user folders.
Only after manual `sa-learn` did Bayes begin working.
4. Questions
- Is it intentional that the `spamassassin` cronjob is disabled by the psa-spamassassin package?
- If yes, how is Bayes supposed to train itself automatically, as advertised in the docs?
- Shouldn’t there be a default task like `ExecuteSpamtrain` enabled on installation?
5. Suggestion
Either Plesk should re-enable the daily training cron by default,
or at least clearly notify admins in the Panel that Bayes will not learn unless a manual cron is set up.
Otherwise, SpamAssassin in a fresh Plesk installation remains practically untrained → resulting in much more spam delivered to end users (which in my case already led to customer complaints).
Question to the Plesk team / community:
Is this a bug or intended behavior? Has anyone else experienced the same issue?
Thanks.