Postfix block email with asian characters
Hello,
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 ? Code:
Server [/etc/postfix] # cat body_checks |
Quote:
|
ok, how can I do this ?
This seems so nice in theory, but what must I physically do ? :-)) |
Quote:
https://www.postfix.org/CONTENT_INSPECTION_README.html May want to check your thread on the Ubuntu forums (which came up from a Google search for your question), where you were provided a filter. https://askubuntu.com/questions/1411...ian-characters |
Also, I have discovered that some emails are encoded in Base64. This, effectively, bypasses the checks. How can I check for base64 encoded strings of asian characters ?
|
Quote:
|
In esence, I'm back to square one...
1. The Postfix documentation is so hard to understand, I need a practical solution - I thought there is a quick fix since I believe I'm not the only one experiencing problems with asian characters... OK, i'll read the docs... I was hoping for a quick fix... 2. If you look closely to my reply on Ubuntu Forums, I have specifically written the fact that a specific line from the given solution does not work... 3. Regarding decoding of base64, I didn't find anything... |
Quote:
|
With all due respect, it seems that the Forum is not much help for "read read read".
I came to the forums seeking a proven solution, in case anyone already dealt with this issue. I do not ask others to read for me ! This is called misjudging. I learned to read when I was 4 :-) The ideea was to obtain a quick fix IF someone else already encountered the problem - I assume that is also the role of a Forum - to ask quick help, if available :-) I assume anyone can read :-) OK, back to reading manuals. Thank you. |
Quote:
You were given a filter on your other thread, in another forum...all you've said is it "doesn't work". Nothing about WHAT isn't working/how/why, or what you've actually tried to MAKE IT WORK. Again, if it's not filtering everything, then expand the character sets. This is all information you can look up for yourself, and (since you don't actually give us details about what's not working), that's all we can tell you isn't it??? Should we guess as to what it's not doing?? You asked about content filtering; again, that's covered in the postfix docs...can you show us what YOU have done to try to accomplish this?? Have you looked at the things you were given/had looked up for you regarding amavis/spamassassin, to do exactly what you're after??? Forums are here to help people help themselves. This is like asking someone to help you paint your house, only for you to sit in a chair and watch them...that's not help...that's having it done for you. |
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: Code:
/free mortgage quote/ DISCARD 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: Code:
/^Subject:.*=\?(?:GB2312|big5)\?/ DISCARD Code:
postmap: warning: header_checks, line 5: unbalanced '"' in '/^Content-Type:.*\bcharset="?(?:GB2312|big5)\b/ DISCARD' -- ignoring this line |
Quote:
Quote:
Quote:
Quote:
|
I've corrected that syntax problem, however, it still doesn't filters asian chars.
I will try with SpamAssassin. |
Quote:
Again: you have been using spamassassin for years, which does attachment filtering/inspection...you were given a link to another program as well. |
Thank you for pointing it out.
I mean it filters asian chars if the email is plain email. If the content is Base64 encoded and the email client decodes the Base64 content, then the filtering has no effect. |
All times are GMT -5. The time now is 05:00 PM. |