Block foreign characters

Well, it's up and running, but I'm not sure if it's doing what it should.
Daprex
Rattled Rabbit
Posts: 2
Joined: Tue Jan 03, 2017 9:36 pm

Block foreign characters

Tue Jan 03, 2017 9:49 pm

Hi is there a way to block for example all mail that contain chineese characters ?
About half of the mail that gets trough seems to be chineese ads for printcartridges and camera parts with my buisness i cant treally block them on any english keywords.

// Johan
User avatar
nick.bolton
The Big Cheese
Posts: 2468
Joined: Thu Aug 28, 2008 4:02 pm

Re: Block foreign characters

Wed Jan 04, 2017 7:26 am

Sure, you can write a custom filter which looks in the header of the email using 'regexp' looking for these character sets.

Chinese
charset="BIG5|BIG5-HKSCS|GB18030|GB2312|GBK|X-GBK|HZ-GB-2312|X-EUC-TW"

Korean
charset="EUC-KR|ISO-2022-KR|KS_C_5601-1987|X-JOHAB|X-WINDOWS-949"

Japanese
charset="SHIFT-JIS|ISO-2022-KR|ISO-2022-JP-2004|UTF-EDBCDIC|EUC-JP"

It won't get all of the emails as some will be written in UTF-8 which is a universal character set, for those you'll just need to find common occuring characters in the email body to match these. Or you could train the bayesian filters to recognize these emails.

I found this post on Google which offers some more insights https://drjohnstechtalk.com/blog/2011/0 ... nese-spam/
Daprex
Rattled Rabbit
Posts: 2
Joined: Tue Jan 03, 2017 9:36 pm

Re: Block foreign characters

Wed Jan 04, 2017 8:34 pm

ooh thanks ill try that :)

// Johan

Return to “Post Installation”