OT Spam Assassin Prefs question
Julian Field
MailScanner at ecs.soton.ac.uk
Wed Feb 20 17:55:20 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mark Sapiro wrote:
> Scott B. Anderson wrote:
>
>
>> My users have been seeing a large amount of Russian charset email spam. How
>> would I set a SA rule to include all Cyrillic (sp) emails or would this be
>> better set at the MTA (sendmail in my case) ?
>>
>
>
> You could set a header rule something like
>
> header X_RULE_NAME Content-Type =~
> /charset="?(ibm-855|iso-8859-5|iso-ir-11|koi8-r|koi8-u|maccyrillic|macukranian|windows-1251|cp-866)/
>
There is already functionality built into SpamAssasin to do this for
you, probably more reliably than you could code yourself (no insult
intended!). Here's the relevant chunk of "man Mail::SpamAssassin::Conf" ...
ok_locales xx [ yy zz ... ] (default: all)
This option is used to specify which locales are
considered OK
for incoming mail. Mail using the character sets that are
allowed by this option will not be marked as possibly being
spam in a foreign language.
If you receive lots of spam in foreign languages, and never
get any non-spam in these languages, this may help. Note
that
all ISO-8859-* character sets, and Windows code page
character
sets, are always permitted by default.
Set this to "all" to allow all character sets. This is the
default.
The rules "CHARSET_FARAWAY", "CHARSET_FARAWAY_BODY", and
"CHARSET_FARAWAY_HEADERS" are triggered based on how this is
set.
Examples:
ok_locales all (allow all locales)
ok_locales en (only allow English)
ok_locales en ja zh (allow English, Japanese, and
Chinese)
Note: if there are multiple ok_locales lines, only the last
one is used.
Select the locales to allow from the list below:
en - Western character sets in general
ja - Japanese character sets
ko - Korean character sets
ru - Cyrillic character sets
th - Thai character sets
zh - Chinese (both simplified and traditional) character
sets
So if you set "ok_locales en" that will probably do what you want.
Jules
- --
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
PGP public key: http://www.jules.fm/julesfm.asc
-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.8.0 (Build 2158)
Comment: Use Thunderbird Enigmail to verify this message
Charset: ISO-8859-1
wj8DBQFHvGmKEfZZRxQVtlQRAn8KAKC2T5D9nWVBLajr9Sq2kMVt2CmCYQCcD/JJ
dybHN0CfAv6VdepL/qWZw/g=
=bkqd
-----END PGP SIGNATURE-----
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the MailScanner
mailing list