Gnus development mailing list
 help / color / mirror / Atom feed
From: Niklas Morberg <niklas.morberg@axis.com>
Subject: Re: Getting started with spam filtering
Date: Fri, 10 Jan 2003 13:51:00 +0100	[thread overview]
Message-ID: <u4r8hp3rf.fsf@axis.com> (raw)
In-Reply-To: <87u1ghi4ot.fsf@emacswiki.org> (Alex Schroeder's message of "Fri, 10 Jan 2003 13:12:50 +0100")

[-- Attachment #1: Type: text/plain, Size: 1640 bytes --]

Alex Schroeder <alex@emacswiki.org> writes:

> So -- if *you* have a working setup, I would be very happy
> if you could explain it to me, and then I will add it to
> the manual. ;)

Actually, it was quite simple to set up with the new changes
made to spam.el. See attached file for notes I took while
setting it up.

> At the moment, it seems that I can just write that the
> same applies for IMAP, just use nnmail-split-fancy and
> nnimap-split-fancy instead?

That would be just fine.

> I did not understand the cache part, however. Does the
> above work *only* with cached articles, or does the above
> without caching just limit itself to the headers (which
> might also work, of course, or it might not be enough,
> that remains to be seen).

I do the training on the cached articles and since I use
fancy splitting, I guess gnus uses all of the article when
splitting.

Doing the training without having the articles available
locally (via the agent or the cache) seems tricky.

>> 1. Copy this text to the *scratch* buffer
>> 2. edit the strings to reflect your settings
>> 3. go to the end of each statement and press C-x C-e to
>>    evaluate the function
>
> Hm.  Are there other parts of the Gnus manual at this level of detail?

Probably not, no. Maybe it's best to leave it as is.

Btw, it would be nice to be able to check the spam-stat score of
an article. Just as `S t' is bound to `(spam-bogofilter-score)'
I think it should be possible to run `(spam-stat-score-buffer)'
or something similar with a key combination.

Maybe `S t' could be used for that too since you are unlikely
to run multiple spam processors?

Niklas


[-- Attachment #2: getting_started_spam.txt --]
[-- Type: text/plain, Size: 1745 bytes --]

Using spam.el and spam-stat.el with an nnimap backend.

I previously had a group called "spam", which is the default
spam group for spam.el. Otherwise I guess you need to create
this.

All my mails start in INBOX, I then split mails with
nnimap-split-fancy to email list groups and to the "spam"
group based on a corporate spam filter. The emails that
are left are put in "incoming".

I did the following changes

in .emacs:

(load "spam")

in gnus.el add this rule to nnimap-split-fancy:
   (: spam-split)

Customize:
 '(spam-use-stat t)
 '(gnus-spam-process-destinations (quote (("incoming" "spam"))))

Train spam-stat:

Start from scratch: (spam-stat-reset)
Reset:(setq spam-stat (make-hash-table :test 'equal))
Learn spam: (spam-stat-process-spam-directory "~/News/agent/nnimap/mailse01.axis.se/spam")
Learn non-spam:
(spam-stat-process-non-spam-directory "~/News/agent/nnimap/mailse01.axis.se/incoming")
(spam-stat-process-non-spam-directory "~/News/agent/nnimap/mailse01.axis.se/INBOX_Archive")
(spam-stat-process-non-spam-directory "~/News/agent/nnimap/mailse01.axis.se/INBOX_Personal")
(spam-stat-process-non-spam-directory "~/News/agent/nnimap/mailse01.axis.se/lists_ding")

Reduce table size: (spam-stat-reduce-size)
Save table: (spam-stat-save)

Then I customized group parameters for the "incoming" group
containing ham mails as such:

 (spam-contents gnus-group-spam-classification-ham)
 (spam-process
  (gnus-group-ham-exit-processor-stat))

and for the spam group:

 (spam-contents gnus-group-spam-classification-spam)
 (spam-process
  (gnus-group-spam-exit-processor-stat))
 (ham-process-destination . "incoming")

and that's it.

When spam end up in ham groups I just press M-d and the
stats are updated when exiting the group.

  reply	other threads:[~2003-01-10 12:51 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-07 13:51 Niklas Morberg
2003-01-07 14:44 ` Ted Zlatanov
2003-01-07 16:43   ` Frank Schmitt
2003-01-07 17:30     ` Ifile vs. bogofilter (was: Getting started with spam filtering) Frank Schmitt
2003-01-08  6:04   ` Getting started with spam filtering Kai Großjohann
2003-01-08  9:18     ` Lars Magne Ingebrigtsen
2003-01-08 15:26     ` Ted Zlatanov
2003-01-08 23:36       ` Alex Schroeder
2003-01-09 14:23         ` Jorge Godoy
2003-01-09 15:11           ` Andreas Fuchs
2003-01-09 18:38           ` Alex Schroeder
2003-01-10  7:44             ` Niklas Morberg
2003-01-10 12:12               ` Alex Schroeder
2003-01-10 12:51                 ` Niklas Morberg [this message]
2003-01-10 13:10                   ` Ted Zlatanov
2003-01-10 13:43                     ` Niklas Morberg
2003-01-10 16:39                       ` Ted Zlatanov
2003-01-24 13:45                         ` Displaying spam score (Was: Re: Getting started with spam filtering) Niklas Morberg
2003-01-10 14:44                   ` Getting started with spam filtering Alex Schroeder
2003-01-15  1:32                   ` Danny Siu
2003-01-10 13:43                 ` Kai Großjohann
2003-01-11 15:41                   ` Simon Josefsson
2003-01-09  8:03       ` Niklas Morberg
2003-01-09 16:24         ` Ted Zlatanov
2003-01-09 23:23           ` Alex Schroeder
2003-01-10  2:07             ` Ted Zlatanov
2003-01-10  4:55               ` Alex Schroeder
2003-01-10  5:54                 ` Ted Zlatanov
2003-01-10 10:41                   ` Niklas Morberg
2003-01-10 11:01                     ` Niklas Morberg
2003-01-10 12:50                       ` Ted Zlatanov
2003-01-08 11:28   ` Niklas Morberg
2003-01-08 15:23     ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u4r8hp3rf.fsf@axis.com \
    --to=niklas.morberg@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).