• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Bounce/block spam based on keyword in subject?

Pleskie

Regular Pleskian
Lately I have been receiving quite a lot of spam on a daily basis. I think the spam comes from one and the same sender / 'company'.

I use the blacklist in the (server wide) mail settings to block the sender domains, but they seem to have bought a lot of different domains (mainly ending on .cam or .work) so each day I keep receiving 1 or 2 spam mails send from a domain which I have not yet blacklisted.

I would like to know if it is possible to block spam mails based on their subject. For example: block a mail if the subject contains 'bitcoin'.

I know spam-software is available where you can set a spam-score of 100 if the subject contains a specific word. Based on the spam-score you can choose if an email should be deleted or moved to a spam folder. If I use a solution like this and choose to delete mails based on their spam-score it might result in deleting mails that look like spam but are actually valid. Of course I could choose instead to move the mail to the spam folder, but then I would still have to check and empty my spam folder each day. I do not like this way of working.

What I would like is to not work with a spam-score, but simply block/bounce/remove an email from the server if the subject contains a specific word. Is there a (preferably free) plesk extension or other tool that does exactly that?
 
You could either create (a) custom SpamAssassin rule(s) to move emails that match your rules criteria to the spam folder of an email account. Setting a spam score thats higher than your spamfilter tresshold. Something like:
Code:
header      SPAM_BITCOIN Subject=~ /Bitcoin/i
score       SPAM_BITCOIN 15.0
describe    SPAM_BITCOIN Move to spam folder

Or if you only want to filter out emails from send from domains with certain TLD's and the bitcoin in the subject.
Code:
header        __SPAM_BITCOIN_TLD From:addr =~ /@[a-z0-9\-\.]+\.(cam|work)/i
header        __SPAM_BITCOIN_SUBJECT Subject=~ /Bitcoin/i

meta         ( __SPAM_BITCOIN_TLD && __SPAM_BITCOIN_SUBJECT )
score        SPAM_BITCOIN 15.0
describe     SPAM_BITCOIN Move to spam folder

Or you try to configure Postfix to reject certain emails that match certain patterns. You could use the header_checks methode to set a pattern for a subject. See Postfix manual - header_checks(5). Something like
Code:
/^Subject:(.*) bitcoin /     REJECT No bitcoin spam please!
 
Last edited:
Thanks for your reply.

I was hoping for an easier solution like an extension so I can configure it easily through Plesk Panel.

Is this the only way to go?
 
Grateful for your response.

I sought a simpler fix, such as a Plesk Panel extension for easy configuration. Is this the sole path?
 
Back
Top