spam.el is part of Oort Gnus, and documented in the manual.
You can configure GnusSpam either using ‘customize’ or the normal way.
To configure it using the customize interface, M-x customize-group RET spam RET.
I personnaly do not use customize at all so here is how I have set up my own GnusSpam. It may be of interest to new GnusSpam user. Feel free to comment it (I just have done it :)) and give other solutions to enhance a little bit my current settings.
(Note, XEmacs users may encounter trouble, so it is recommended to them to use customize instead).
Add these lines in your configuration file :
(setq spam-use-bogofilter t) ; I am using bogofilter but there are others
(setq gnus-install-group-spam-parameters nil)
;; Here I define general anti-spam things ;; it only say that on exiting all groups matching nnml:private.*, ;; we launch the spam processor and ham processor (using bogofilter) (setq gnus-spam-process-newsgroups '(("nnml:.*" (gnus-group-spam-exit-processor-bogofilter gnus-group-ham-exit-processor-bogofilter)))
;; All messages marked as spam in these groups should go to spambox
gnus-spam-process-destinations '(("nnml:.*" "nnml:spambox"))
;; and ham found into the spambox should be moved to reclassify group
gnus-ham-process-destinations '(("nnml:spambox" "nnml:reclassify")) spam-junk-mailgroups '("nnml:spambox") spam-split-group "nnml:spambox")
Then you can say to your favorite split function to use the spam-split as well. This is done that way :
(setq nnmail-split-fancy '(| (: spam-split) ... other rules )
You can also use ‘St’ to score spam.
Note that all unread messages from a spam group is automatically marked as spam when you exit the group.
Spam’s mark in the SummaryBuffer is ‘$’ for $pam but it should be configurable (?).
Also note that you have to train intensively Bogofilter to have it more reliable.
Above manual configurations didn’t work for me. (Using GNU Emacs 22.2.1 (i486-pc-linux-gnu) of 2008-11-09 on raven, modified by Debian GNU/Linux (stable) Lenny.) Below are the steps I used to setup my spam configuration via bogofilter.
.gnus.el: Added below lines to my ~/.gnus.el file.
(set spam-use-bogofilter t spam-split-group "spam")
(require 'spam) (spam-initialize)
(setq nnmail-split-fancy '(| (: spam-split) ...))
Creating Spam Split Groups: Created
reclassify groups in the
Enabling Spam Processing: You can either customize (
G c) a specific group/topic in the
*Group* buffer, or customize
Gnus topic to cover all available groups — which is what I prefered actually. In the
Spam section of customization buffer, selected and configured options as below.
[X] Spam Summary Exit Processor: [Value Menu] Spam Summary Exit Processor Choices: ... [X] Spam: Bogofilter ... [X] Ham: Bogofilter [X] Spam autodetection: [Toggle] on (non-nil) [X] Spam autodetection-specific methods: [Value Menu] Use specific methods: ... [X] spam-use-bogofilter-headers [X] spam-use-bogofilter [X] Destination for spam-processed articles at summary exit: [Value Menu] Move to a group: spam [X] Destination for ham articles at summary exit from a spam group: [Value Menu] Move to a group: reclassify [X] Ham mark choices: ... [X] gnus-ticked-mark [X] Spam mark choices: ... [X] gnus-spam-mark
Feeding Spams into Bogofilter: I marked some 300-500 spams I previously received via
S x to train bogofilter.
Feeding Hams into Bogofilter: In the last step, I feed some ham messages to bogofilter using mail groups that don’t have any spams. (You must train bogofilter with both spams and hams, otherwise it always returns 0.52 (not-sure value) for any message you give it to test.
find ~/Mail/gmail -not -name '.*' | while read FILE; do bogofilter -n <"$FILE"; done
WARNING! Such mail hooks significantly slows down the opening and closing of the summary buffer. If you have hundreds of mails – like me – gnus becomes totally unuseable. Use with caution! (I myself ended up hooking bogofilter into procmail.)
— Volkan YAZICI