Using spamassassin with procmail |
emerge Mail-SpamAssassin
${HOME}/.procmailrc
, after editing the
first two lines to refer to your username/home directory.
Now all mail will be checked by spamassassin. Mail that is
almost certainly spam will never reach your mailbox but it
will be stored in ${HOME}/almost-certainly-spam
.
Similarly, messages that are probably spam end up in
${HOME}/probably-spam
.
To handle messages that have not been properly handled by spamassassin, you can
${HOME}/missed-spam
.
${HOME}/probably-spam
or
${HOME}/almost-certainly-spam
to
${HOME}/missed-ham
.
#!/bin/sh sa-learn --spam --mbox ${HOME}/almost-certainly-spam sa-learn --spam --mbox ${HOME}/probably-spam sa-learn --spam --mbox ${HOME}/missed-spam sa-learn --ham --mbox ${HOME}/missed-ham sa-learn --ham --mbox /var/mail/usename