Question How to get Plesk to delete / kill emails containing Big5 character set?

MHC_1

Regular Pleskian
Server operating system version
Alma Linux 9.7
Plesk version and microupdate number
Plesk Obsidian 18.0.77 Update #3
Sounds simple, but is - as ever with Plesk - bizarrely hard to find out how to do it --

- We have Plesk Email Security.
- We have SpamAssassin and/or Amavis
- We have some clients with Chinese characters in their incoming spam emails.

We wish to tell Plesk to delete any emails coming in to the clients account which contains Big5 Character Set (Chinese characters)

I have looked all over the internet and find various manual coding for SpamAssassin, and Plesk guidance that is out of date (by like, years) and things that refer to Plesk objects that do not exist (such as Tools and Settings --> Spam ) .


How can we do this on Plesk Obsidian 18.0.77? Can anyone point me to relevant Plesk documentation that is relevant, for Obsidian, for Linux, and is relevant? This is hard to find ,.

Thank you.
 
Hi, @MHC_1 . as far as I am aware, there's a way to achieve that through Plesk itself, but you might be able to do so via SpamAssassin. There's an option ok_languages through which you can configure the desired allowed languages only. It is defined in /usr/share/spamassassin/10_default_prefs.cf and you can configure it as the following example:

Code:
ok_languages en ja

(allow English and Japanese)
I believe that's the closest alternative there is to blocking specific language for incoming mail.
 
Last edited:
As Sebahat already pointed out, customizing the spam filtering process based on specific message characteristics is outside the scope of the Plesk (even with Plesk Email Security). It's worth keeping in mind (for your own sanity) that Plesk ins't an all encompassing software suite, but rather just a control panel that ties in many different, already existing tools, services and applications. With most of those being open source and well documented themself. Some tools and services are well intergraded into Plesk, others just with very basic functionality. Spam filtering falls into the latter category.

That doesn't mean your options regarding spam filtering (or email message filtering in general) are limited, far from it in fact. You have complete flexibility in tweaking or customizing your SpamAssassin (or Postfix) configuration the way you like, without much restrictions from Plesk. Much more than you would probably ever have if SpamAssassin was much more integrated into Plesk. That does mean you'll need to familiarize yourself with SpamAssassin, as you would for any other server tool as a system admin of course.

In addition to Sebahat's suggestion for TextCat (which is an excellent SpamAssassin plugin) and to get you on the right track, other options to consider are:

1) Create a specific SpamAssassin rule to filter messages based on the Big5 character set. Which would look like something like this (not tested):
Code:
rawbody       __BIG5_CHARSET_MIME        /charset\s*=\s*["']?big5["']?/i
header        __BIG5_CHARSET_HEADER    Content-Type =~ /charset\s*=\s*["']?big5["']?/i
meta        BIG5_ENCODING (__BIG5_CHARSET_MIME || __BIG5_CHARSET_HEADER)
score       BIG5_ENCODING 15.0
describe    BIG5_ENCODING Messages uses big5 character set

2) Or even create a header_checks rule in Postfix to reject messages if they use the Big5 character set. See postfix documentation for more info on this.
 
Last edited:
@Sebahat.hadzhi sorry for the delay in getting back to this, thank you very much for your prompt reply post, I was seeing if there was any established Plesk-level mechanism but will continue with working through a SpamAssassin ruleset.

Thanks.
 
Back
Top