From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/55227 Path: main.gmane.org!not-for-mail From: Reiner Steib <4.uce.03.r.s@nurfuerspam.de> Newsgroups: gmane.emacs.gnus.general Subject: Re: Spam.el tutorial Date: Sun, 14 Dec 2003 13:28:10 +0100 Sender: ding-owner@lists.math.uh.edu Message-ID: References: Reply-To: reiner.steib@gmx.de NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1071411709 11122 80.91.224.253 (14 Dec 2003 14:21:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 14 Dec 2003 14:21:49 +0000 (UTC) Original-X-From: ding-owner+M3767@lists.math.uh.edu Sun Dec 14 15:21:44 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AVX7v-0004xn-00 for ; Sun, 14 Dec 2003 15:21:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1AVX75-0002MD-00; Sun, 14 Dec 2003 08:20:51 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AVX6v-0002M5-00 for ding@lists.math.uh.edu; Sun, 14 Dec 2003 08:20:41 -0600 Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by justine.libertine.org (Postfix) with ESMTP id 049B73A0026 for ; Sun, 14 Dec 2003 08:20:40 -0600 (CST) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AVX6s-0004Wc-00 for ; Sun, 14 Dec 2003 15:20:38 +0100 Mail-Followup-To: ding@gnus.org X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AVX6p-0004WT-00 for ; Sun, 14 Dec 2003 15:20:35 +0100 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AVX6p-0002s3-00 for ; Sun, 14 Dec 2003 15:20:35 +0100 Original-Lines: 104 Original-X-Complaints-To: usenet@sea.gmane.org X-Face: P05mdcZT&lL[-s2=mw~RsllZ0zZAb?vdE}.s So I think a tutorial is something useful to show people different way > to set all things up. The most important thing is to show people a > maximum of different setup according to way you, gnus users, read your > mails. [...] > So I think, if people can post here, in this thread, the portion of > their own spam.el setup, would be a good start to produce a final > document. Posting emacs lisp with comments explaining users choice is > higly recommended though. Here's my setup: --8<---------------cut here---------------start------------->8--- * Using `spam.el' on an IMAP server with a statistical filter on the server ** Background My provider has set up bogofilter (in combination with DCC) on the mail server (IMAP). Recognized spam goes to "spam.detected", the rest goes through the normal filter rules, i.e. to "some.folder" or to "INBOX". Training on false positives or negatives is done by copying or moving the article to "training.ham" or "training.spam" respectively. A cron job on the server feeds those to bogofilter with the suitable ham or spam options and deletes them from the "training.ham" and "training.spam" folders. ** Setup With the following entries in `gnus-parameters', `spam.el' does most of the job for me: ("nnimap:spam\\.detected" (gnus-article-sort-functions '(gnus-article-sort-by-chars)) (ham-process-destination "nnimap:INBOX" "nnimap:training.ham") (spam-contents gnus-group-spam-classification-spam)) ("nnimap:\\(INBOX\\|other-folders\\)" (spam-process-destination . "nnimap:training.spam") (spam-contents gnus-group-spam-classification-ham)) *** The Spam folder: In the folder "spam.detected", I have to check for false positives (i.e. legitimate mails, that were wrongly judged as spam by bogofilter or DCC). Because of the `gnus-group-spam-classification-spam' entry, all messages are marked as spam (with `$'). When I find a false positive, I mark the message with some other mark (see `ham-marks' in the manual: `C-h i d gnus RET i ham-mark RET'). On group exit, those messages are copied to both groups, "INBOX" (were I want to have the article) and "training.ham" (for training bogofilter) and deleted from the "spam.detected" folder. The sort-by-chars entry simplifies detection of false positives for me. I receive lots of worms [1] (sweN, ...), that all have a similar size. Grouping them by size (i.e. chars) makes finding other false positives easier. *** Ham folders: In my ham folders, I just hit `S x' (`gnus-summary-mark-as-spam') whenever I see an unrecognized spam mail (false negative). On group exit, those messages are moved to "training.ham". * Reporting spam articles in Gmane [2] groups with `spam-report.el' With following entry in `gnus-parameters', `S x' (`gnus-summary-mark-as-spam') marks articles in gmane.* groups as spam and reports the to Gmane at group exit: ("^gmane\\." (spam-process (gnus-group-spam-exit-processor-report-gmane))) Additionally, I use `(setq spam-report-gmane-use-article-number nil)' because I don't read the groups directly from news.gmane.org, but through my local news server (leafnode). I.e. the article numbers are not the same as on news.gmane.org, thus `spam-report.el' has to check the "X-Report-Spam" header to find the correct number. [1] Of course worms aren't "spam" (UCE, UBE) strictly speaking. Anyhow, bogofilter is an excellent tool for filtering those unwanted mails for me. [2] --8<---------------cut here---------------end--------------->8--- For people who prefer `gnus-parameters' instead of customize, it's probably best to use customize (`G c') first and look at the correct syntax with `G e'. Then, use this format in `gnus-parameters' and remove the customize entries with `G e' or `G c'. Ted, please correct me if I described something inaccurately, especially the copying/moving process (I didn't check the current code). Thanks for your work! :-) Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/