![]() |
|
|
Next Previous Contents 3. Training the Bayesian FilterThe latest version of SpamAssassin has a Bayesian filter that can improve SpamAssassin's ability to distinguish the spam from the ham. SpamAssassin will sometimes mark spam as ham or vice versa. When this happens, you can tell SpamAssassin's Bayesian filter to "relearn" a mail as spam or ham. On netra, use the sa-learn command to train the Bayesian filter. Here are some examples:
sa-learn --forget --ham --mbox /var/spool/mail/netid This will tell SpamAssassin that all messages in your inbox are not spam. The --forget flag tells it to forget the message if it has learned it before. Without this flag it will ignore messages that it has already marked as spam or ham.
sa-learn --forget --spam --mbox /home/netid/mail/NewSpam This tells SpamAssassin that all messages in the NewSpam folder should be relearned as Spam messages. If you moved messages from your inbox to this directory because SpamAssassin didn't catch the message as Spam, this command will train the Bayesian filter accordingly. From the sa-learn manpage:
NAME
sa-learn - train SpamAssassin's Bayesian classifier
SYNOPSIS
sa-learn [options] --file message
sa-learn [options] --mbox mailbox
sa-learn [options] --dir directory
sa-learn [options] --single < message
Options:
--ham Learn messages as ham (non-spam)
--spam Learn messages as spam
--forget Forget a message
--rebuild Rebuild the database if needed
--force-expire Force an expiry run, rebuild every time
-f file, --folders=file Read list of files/directories from file
--dir Learn a directory of RFC 822 files
--file Learn a file in RFC 822 format
--mbox Learn a file in mbox format
--showdots Show progress using dots
--no-rebuild Skip building databases after scan
-L, --local Operate locally, no network accesses
-C file, --config-file=file Path to standard configuration dir
-p prefs, --prefs-file=file Set user preferences file
-D, --debug-level Print debugging messages
-V, --version Print version
-h, --help Print usage message
See the sa-learn manpage on netra for more information.
Next Previous Contents |
|
Certifying authority: Paul Gluhosky
Manager, AM&T Workstation Support Services URL: http://wss.yale.edu/doco/SpamAssassin Last update: 08.18.04 |