• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Is it possible to create a manual spam filter?

carlsson

Basic Pleskian
Server operating system version
Ubuntu 20.04.6 LTS
Plesk version and microupdate number
Plesk Obsidian v18.0.65_build1800241122.08 os_Ubuntu 20.04
OMG what I hate emails from "BOOM OF SALES". They never seem to end, even with the best antispam software.
I'd like to create a manual rule on the mail server that deletes all mail from "BOOM OF SALES". How can I do that? (I realize I can do it on my email client, but I want to delete it for all my users from the source.)

1733147647761.png
 
Do you have SpamAssassin installed on the sever already? If so, you can create custom spam rules for SpamAssassin. To get started, you can create a file called custom_rules.cf (you can name the file whatever you like, as long as it has the .cf extension) to the /etc/spamassassin directory and add the following rule to it:
Code:
header     BOOM_OF_SALSES    From:name =~  /boom of sales/i
describe   BOOM_OF_SALSES    Boom of sales Spam
score      BOOM_OF_SALSES    10.0
This rule will add a spam score of 10 to any message of which the sender name matches boom of sales. I assume your spam score threshold is lower then 10, if it's not, increase the score in the rule. Afterwards restart SpamAssassin. If you use the native Plesk SpamAssasin component you can use sudo /usr/local/psa/admin/bin/spammng --restart, if you use Plesk Email Security I think restarting Amavis systemctl restart amavisd suffices (but I am not completely sure).

SpamAssassin has many elaborate options for plugins and to create your own rules, which can be overwhelming to get started with. However there are many tutorials online if your interested going down that road. If you don't like to manually configure SpamAssassin I can really recommend the paid Warden Anti-spam and Virus Protection extension, which provides all SpamAssassin options in Plesk.
 
Last edited:
Back
Top