Fighting Spam: bogofilter in Mew


Install a recent version of Mew and bogofilter. Then create a script called bogo containing the following lines:

bogofilter -v -T -B $* | grep -e ' S ' -e ' U '
(Leave out -e ' U ' if you don't want to mark messages classified by bogofilter as unsure.) Add to your .emacs (or .emacs.mew or similar Emacs' init file):
(setq mew-prog-grep "bogo")

Training the classifier

Type ls on spam message (in Mew's summary mode). (ls stands for learn spam.) Type lh on ham message (in Mew's summary mode). (ls stands for learn ham.)

Using the spam classifier

In Mew, press ". bogo will be presented as the default program, so just press return when shown. This will mark spam (and unsure, see above) messages. Then put delete mark on all marked messages: md Later: press x (to delete really). Sven Hartrumpf, 2005-06-06