Annoyance Filter is an adaptive Bayesian junk email filter written by John Walker.
Training annoyance-filter on what is and what is not spam:
/usr/bin/annoyance-filter --mail ${MAIL} \
--junk ${HOME}/Mail/spam \
--prune \
--write ${HOME}/.annoyance.dict
Note: The same command retrains annoyance-filter.
To use annoyance-filter with procmail edit your ${HOME}/.procmailrc:
:0fw:
| ${HOME}/bin/annoyance-filter-run
:0:
* ^X-Annoyance-Filter-Classification: Junk
${MBOXDIR}/annoyance
The above recipe executes the script annoyance-run on incoming email.
#!/bin/sh
# annoyance-run - Script to run annoyance-filter from .procmailrc
exec /usr/bin/annoyance-filter \
--read ${HOME}/.annoyance.dict \
--transcript - \
--test -