Chapter 2 Mail Service Setup 37
Training the junk mail lter without user interaction:
You can also train the junk mail lter by giving it known junk and good mail messages.
Accurate training requires a large sample, so a minimum of 200 messages of each type
is advised.
1 Choose a mailbox of 200 messages made of only junk mail.
2 Use Terminal and the lter’s command-line training tool to analyze and remember junk
mail using the following command:
sa-learn --showdots --spam sample junk mail directory/*
3 Choose a mailbox of 200 messages made of only good mail.
4 Use Terminal and the lter’s command-line training tool to analyze and remember
good mail using the following command:
sa-learn --showdots --ham sample good mail directory/*
If the junk mail lter fails to identify a junk mail message, train it again so it can do
better next time. Use sa-learn again with the --spam argument on the mislabeled
message. Likewise, if you get a false positive (a good message marked as junk mail),
use sa-learn again with the --ham argument to further train the lter.
Filtering Mail by Language and Locale
You can lter incoming mail based on locales or languages. Mail messages composed
in foreign text encodings are often erroneously marked as junk mail. You can congure
your mail server to not mark messages from designated originating countries or
languages as junk mail.
To allow mail by language and locale:
1 In Server Admin, select a computer in the Servers list, then select Mail.
2 Click Settings.
3 Select the Filters tab.
4 Select Scan Email for Junk Mail.
5 Click the Edit (/) button next to Accepted Languages to change the list, select the
language encodings to allow as non-junk mail, and click OK.
6 Click the Edit (/) button next to Accepted Locales to change the list, select the country
codes to allow as non-junk mail, and click OK.
7 Click Save.