• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Issue Can't see X-Spam headers on clean messages

pmg

Basic Pleskian
Server operating system version
Linux
Plesk version and microupdate number
Plesk Obsidian 18.0.71 Update #2
I've added pretty basic cf to /etc/spamassassin:
Code:
add_header all spam_rules _TESTSSCORES_
`spamassassin --lint` completes without issues.
I've run `sa-update -D` and `systemctl restart spamassassin.service`.
But this header is still missing on incoming messages.
Please advise.

PS: Last time I've seen such behavior - amavisd (managing SpamAssasin) was to blame.
 
Do you use a setup in which amavis manages SpamAssasin (this is the case when you're using the Plesk Email Security extension for example)? If so, try restarting amavisd too.
 
Do you use a setup in which amavis manages SpamAssasin (this is the case when you're using the Plesk Email Security extension for example)? If so, try restarting amavisd too.
Hey @Kaspar , apologize for misleading remark regarding amavis. The host is pure Plesk Obsidian, no 3rd-party tools. Idea of that remark was to ask: perhaps Plesk is controlling what headers to add and where to add them?
 
I see, first try restarting SpamAssasin trough Plesk with /usr/local/psa/admin/bin/spammng --restart . However my guess would be that there is perhaps something not quite right right with the rule your created. If restarting SA does not change anything, try create a test message file to directly test your custom rule via command line. E.g spamassassin -d -t -L /root/dir/test-message.eml
 
Hey @Kaspar ,

Thanks for the suggestion. I've run the same email through the local test you've suggested and I can clearly see my custom header:
Code:
# spamassassin -d -t -L ./Test3.eml
Sep  9 19:59:09.041 [2503663] warn: config: created user preferences file: /root/.spamassassin/user_prefs
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
    plesk-001.ithesion.com
X-Spam-Level:
X-Spam-Status: No, score=0.0 required=7.0 tests=FREEMAIL_FROM,HTML_MESSAGE,
    SPOOFED_FREEMAIL autolearn=ham autolearn_force=no version=3.4.6
X-Spam-spam_rules: FREEMAIL_FROM=0.001,HTML_MESSAGE=0.001,
    SPOOFED_FREEMAIL=0.001
...

As you can see, my defined `spam_rules` header is in place when I run it through the CLI check.
 
Is the header missing on all messages regardless of the spam score? Or only when the message has certain spam score?
Test3.eml (used for CLI check) is the actual message in my RoundCube inbox. X-Spam headers are missing from ALL emails.
Actually, I'm afraid SpamAssasin is NOT invoked at all, as I can't see any messages marked as spam, despite it's enabled in Plesk server wide (see screenshot attached). Did I've missed some configuration step?
 

Attachments

  • Screenshot 2025-09-10 at 13.02.33.png
    Screenshot 2025-09-10 at 13.02.33.png
    151.9 KB · Views: 3
There you go :)
Without having the spam filter enabled for the mailbox SA won't filter/check any messages. Enabling it for the mailbox should your custom header to messages.
Is it possible to enable SA server-wide? My initial assumption was that "Turn on server-wide SpamAssassin spam filtering" was meant for that exactly purpose. It's quite counter-intuitive to enable critical email feature for each individual mailbox.
 
Is it possible to enable SA server-wide? My initial assumption was that "Turn on server-wide SpamAssassin spam filtering" was meant for that exactly purpose. It's quite counter-intuitive to enable critical email feature for each individual mailbox.
If I am not mistaken "Turn on server-wide SpamAssassin spam filtering" will enable spam filtering for any newly created mailbox, but not on existing mailboxes. For those spam filtering has to be enabled manually (either via GUI or CLI).
 
If I am not mistaken "Turn on server-wide SpamAssassin spam filtering" will enable spam filtering for any newly created mailbox, but not on existing mailboxes. For those spam filtering has to be enabled manually (either via GUI or CLI).
That might be explaining something. Will check on newly created mailboxes and get back to you. Thanks
 
Back
Top