blocking spam with foreign language or alphabet or characacter

October 24, 2008 by gregorgede · Leave a Comment
Filed under: spamassassin 

sometimes we get spam of foreign language that we don’t understand. we don’t even know the alphabet, very annoying. there are plenty of them, some from romania, china or greek. we can set spamassassin to give them higher score and then treat them as spam. here’s how to do it (tested on 3.1.4) :

1. $vi /etc/mail/spamassassin/init.pre
and add this line:

loadplugin Mail::SpamAssassin::Plugin::TextCat

save and exit

2. $vi /etc/mail/spamassassin/local.cf
and add these lines (the 2nd line adjust to your language) :

ok_locales en
ok_languages en id

save and exit
here’s some list of languages :

af - Afrikaans
am - Amharic
ar - Arabic
be - Byelorussian
bg - Bulgarian
bs - Bosnian
ca - Catalan
cs - Czech
cy - Welsh
da - Danish
de - German
el - Greek
en - English
eo - Esperanto
es - Spanish
et - Estonian
eu - Basque
fa - Persian
fi - Finnish
fr - French
fy - Frisian
ga - Irish Gaelic
gd - Scottish Gaelic
he - Hebrew
hi - Hindi
hr - Croatian
hu - Hungarian
hy - Armenian
id - Indonesian
is - Icelandic
it - Italian
ja - Japanese
ka - Georgian
ko - Korean
la - Latin
lt - Lithuanian
lv - Latvian
mr - Marathi
ms - Malay
ne - Nepali
nl - Dutch
no - Norwegian
pl - Polish
pt - Portuguese
qu - Quechua
rm - Rhaeto-Romance
ro - Romanian
ru - Russian
sa - Sanskrit
sco - Scots
sk - Slovak
sl - Slovenian
sq - Albanian
sr - Serbian
sv - Swedish
sw - Swahili
ta - Tamil
th - Thai
tl - Tagalog
tr - Turkish
uk - Ukrainian
vi - Vietnamese
yi - Yiddish
zh - Chinese (both Traditional and Simplified)
zh.big5 - Chinese (Traditional only)
zh.gb2312 - Chinese (Simplified only)

3. $spamassassin –lint
make sure there’s no error

4. restart spamassassin. for redhat and friends we do this:
$service spamassassin restart



Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!