We have an email server running Dovecot and Postfix.
I recieve a lot of spam email containing wierd chinese/japanese or other asian characters.
We don't need these emails in our organization and we do not communicate with people using asian characters.
How can we instruct Postfix to block out all emails containing asian characters ?
We already use "body_checks" to discard email containing some regex strings... but how can we do it for asian characters ?
Server [/etc/postfix] # cat body_checks
/free mortgage quote/ DISCARD
/repair your credit/ DISCARD
/From:.*<>/ DISCARD
Server [/etc/postfix] # cat main.cf |grep body
body_checks = pcre:/etc/postfix/body_checks
Server [/etc/postfix] #
Try adding these lines:
They will discard email containing the most common chinese encodings, such as big5 and GB2312
I have tried - with no result. I always try to solve my problems before posting in the forums. Usually, the forums are the last place to try to ask help, and after all other attempts failed.
The problem is simple: I want to filter asian characters.
Here is my header_checks file:
Here is my body_checks file: https://pastebin.com/mF0VLCzY
The filtering works great if I test any asian character from the list in the body_checks file.
The problem is that I receive emails which ENCODE with Base64 (the Email client displays the asian character but the Message Source is Encoded in Base64). For example: 連 in Base64 is "6YCj" And my message source is full of Base64 encoded text.
I have also tried these:
It gives me the following problem:
Also, if I leave these in header_checks, it still doesn't filter the base64-encoded characters...