OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: how to reject non-english mail (anti-spam maneuver)

From: Frog (frogrsf1.net)
Date: Thu Apr 24 2008 - 06:29:19 CDT


Juan Miscaro wrote:
> Hi,
>
> I'm getting some Russian and Asian spam. How can I reject this stuff
> with Postfix? Say I only want English and French mail (characters).
>
> Thank you to any responders,
>
> /juan
>
Hi,

I use Postfix's header checks to do exactly this. It can result in
losing some mails from mailing lists though.

My regex looks like this:

/^Subject:.*=\?(GB2312|big5|euc-kr|ks_c_5601-1987|koi8)\?/ DISCARD
NotReadable1
/^Content-Type:.*charset="?(GB2312|big5|euc-kr|ks_c_5601-1987|koi8)/
DISCARD NotReadable2

Hope this helps
Frog