how to detect koi8-r characters

Hugo van der Kooij hvdkooij at vanderkooij.org
Mon Sep 15 21:48:31 IST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kevin Howard wrote:
> Hi,
>  
> We're receiving a lot of spam comprising Cyrillic characters in the
> subject line, example Subject: =?koi8-r?B?8sXLzGHNwSDXIOnObcXSzsVtxSA=?=

Here are some lines I put into the headercheck of postfix:

/^Subject: =\?koi8-r\?/                 REJECT  No one here reads this
language!
/^From: =\?koi8-r\?/                    REJECT  No one here reads this
language!
/^Content-Type: .+; charset=koi8-r/     REJECT  No one here reads this
language!
/^Subject:.+=\?windows-1251\?/          REJECT  No one here reads this
language!
/^From: =\?windows-1251\?/              REJECT  No one here reads this
language!
/^.*charset="windows-1251"$/            REJECT  No one here reads this
language!
/^Content-Type: .+; charset=windows-1251/       REJECT  No one here
reads this language!
/^Subject:.+=\?windows-1255\?/          REJECT  No one here reads this
language!
/^From: =\?windows-1255\?/              REJECT  No one here reads this
language!
/^Content-Type: .+; charset=windows-1255/       REJECT  No one here
reads this language!
/^Subject:.+=\?ISO-2022-JP\?/           REJECT  No one here reads this
language!
/^From: =\?ISO-2022-JP\?/               REJECT  No one here reads this
language!
/^Content-Type: .+; charset=ISO-2022-JP/        REJECT  No one here
reads this language!
/^Content-Type: .*GB2312/               REJECT  No one here reads this
language!


It cuts down a lot on the unreadable spam. At present I am trying to
convince XS4ALL to put a similar check into their spam checks. I
understand they can not put it in the MTA. But if I can not read Russian
there is no point in sending me email with a Russian characterset.


Hugo.

- --
hvdkooij at vanderkooij.org               http://hugo.vanderkooij.org/
PGP/GPG? Use: http://hugo.vanderkooij.org/0x58F19981.asc

	A: Yes.
	>Q: Are you sure?
	>>A: Because it reverses the logical flow of conversation.
	>>>Q: Why is top posting frowned upon?

Bored? Click on http://spamornot.org/ and rate those images.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIzsodBvzDRVjxmYERAkgfAJ0WvKZuJGlEuTBGrZeXcESBBtxS4wCdGulS
ruta2KWoJF7zqLK8+FCk9Rk=
=VJia
-----END PGP SIGNATURE-----


More information about the MailScanner mailing list