SpamAssassin and Foreign Spam

A great deal of spam comes in languages that don't even use the standard ("Latin") alphabet. SpamAssassin has rules that check for some foreign languages and matches them against a list of acceptable regions that you select.

Using SquirrelMail's SpamAssassin to filter foreign mail
  1. Log into the SquirrelMail version of webmail (i.e. the default login box at the top of the page at mail.panix.com.
  2. Go to Options ->SpamAssassin.
  3. In the "Allowables Locales" area (on the left, beneath the "General Settings" area), select any of the languages you want to receive. (By default all are checked so you should uncheck those that you do not want.
  4. In the "Manage Spam Rules" area at the upper right, locate the rules for "CHARSET_FARAWAY" and "CHARSET_FARAWAY_HEADER". They have a default score of 3.2. You can leave that, or you can raise (or lower!) it. If you make those scores higher than your "Required hits" number, messages that do not match the character sets you've selected will be considered spam.
Using Procmail-based SpamAssassin to filter foreign mail
If you're using procmail, you control SpamAssassin with your $HOME/.spamassassin/user_prefs file:
  1. Add the locales (from the list below that represent languages you want to receive. For instance, to receive mail only in English and Spanish you would enter this:
    ok_locales en es
    Mail composed with other character sets woul be treated as spam.
  2. Raise the score of the following rules:
    CHARSET_FARAWAY
    CHARSET_FARAWAY_HEADERS
    The default is 3.2. If you raise it higher than your rquired_hits score, messages that aren't from an acceptable locale will automatically be rejected.
List of Character Set Locales
af Afrikaans
ar Arabic
ar Arabic
be Belarussian
bg Bulgarian
ca Catalan
cs Czech
da Danish
de German
el Greek
en English
eo Esperanto
es Spanish
et Estonian
eu Basque
fi Finnish
fr French
gl Galician
he Hebrew
hr Croatian
hu Hungarian
hy Armenian
id Indonesian
is Icelandic
it Italian
ja Japanese
kk Kazakh
ko Korean
lt Lithuanian
mn Mongolian
nb Norwegian (Bokmål)
nl Dutch
no Norwegian (Nynorsk)
pl Polish
pt Portugese
ro Romanian
ru Russian
sk Slovak
sl Slovene
sr Serbian
sv Swedish
tr Turkish
uk Ukranian
zh Chinese


Last Modified:Tuesday, 31-Jan-2023 23:24:50 EST
© Copyright 2006-2021 Public Access Networks Corporation