Using Eric Raymond's bogofilter tool within Gnus
François Pinard <pinard <at> iro.umontreal.ca>
2002-09-01 03:16:35 GMT
Hello, my friends.
Some of you might be aware of the speedy Graham filter written by Eric Raymond
last week. Here is the recipe I cooked for using it from within Gnus.
Despite a bit rough, a bit raw, it might be usable. Of course, if you improve
on it, please tell me, so I can take advantage of your ideas as well!
---------------------------------------------------------------------->
;;; Gnus against SPAM, training a Graham filter via Bogofilter.
;;; François Pinard, 2002-08.
;;; This Emacs Lisp code add a few hooks so Oort Gnus could control spam with
;;; the help of Eric Raymond's Bogofilter. I use Oort Gnus version 0.8 in
;;; development from CVS, see http://quimby.gnus.org/gnus, and Bogofilter 0.4,
;;; see http://www.tuxedo.org/~esr/bogofilter, slightly patched.
;;; The `M-d' command gets added Gnus summary mode to mark current message as
;;; spam, this is indicated by the letter `H'. Whenever you see a spam
;;; message, make sure to mark its summary line with `M-d' before leaving the
;;; group. Some groups, as per variable `fp-junk-mailgroups' below,
;;; automatically get an `H' mark for all summary lines which would otherwise
;;; have no other mark. These groups are normally receiving spam resulting
;;; from splitting on clues added by spam recognisers. Make sure to _remove_
;;; `H' marks for any message which is _not_ genuine spam, before leaving the
;;; group (through `M-u' to "unread" the message, or `d' for declaring it read
;;; the non-spam way). When you leave a group, all `H' marked messages are
;;; sent to Bogofilter which will study them as spam samples.
;;; Messages may also be deleted in various other ways, and unless
;;; `fp-ham-marks-form' gets overridden below, marks `R' and `r' for default
(Continue reading)