Gnus development mailing list
 help / color / mirror / Atom feed
From: "Ted Zlatanov" <tzz@lifelogs.com>
Cc: ding@gnus.org
Subject: Re: bogofilter setup examples
Date: 29 Apr 2005 11:26:49 -0400	[thread overview]
Message-ID: <4n8y31li2u.fsf@lifelogs.com> (raw)
In-Reply-To: <878y34koop.fsf@mun.ca> (Sebastian Luque's message of "Wed, 27 Apr 2005 14:24:54 -0500")

On Wed, 27 Apr 2005, sluque@mun.ca wrote:

> Thanks Jonas and Ted for your advise, I did make some progress by putting
> the following in my ~/.gnus.el:
> 
> (require 'spam)
> 
> (setq spam-split-group "Spam" spam-use-bogofilter t nnmail-split-methods
> 	'nnmail-split-fancy nnmail-split-fancy '(| (: spam-split) ("from"
> 	"someregexp" "somegroup") (any
> 	".*video4linux.*\\|.*Sympa\\|.*helixcommunity.*\\|.*aircanada.com.*\\|.*ostg.*"
> 	"Various") ("to" ".*ecolog-l.*" "Ecolog-L") ("to" ".*marmam.*"
> 	"Marmam") ("to" ".*mammal-l.*" "Mammal-L") ("from"
> 	".*nature\\.com\\|.*source\\.cisti@.*\\|.*blackwell\\.synergy.*\\|.*CSIRO.*\\|.*@elsevier.*\\|.*oupjournals.*\\|.*cambridge\\.org\||.*cobjnls.*\\|.*springerlink.de"
> 	"Literature") "mail.misc"))
> 
> (spam-initialize)
> 
> 
> For some unknown (to me) reason, using Ted's suggestion:
> 
> (require 'spam)
> (spam-initialize 'spam-use-bogofilter)
> ...
> 
> returned a "wrong number of arguments..." error for spam-initialize as
> gnus was starting up. 

You are using an older version of Gnus - I would use CVS if possible,
5.10.8 otherwise.  spam.el has changed a bit since 5.10.7, including
some bug fixes.  If you don't want to upgrade, things will work but it
will be harder for me to figure out what went wrong if there's a
problem.

> Anyway, the setup above seems to be working somewhat fine for me. I
> don't understand, however, where (: spamp-split) needs to go in the
> nnmail-split-fancy list. I guess putting it at the beginning as I
> did splits the spam into my Spam group before doing the rest of my
> splitting rules, but perhaps it's better to put it right before
> "mail.misc". 

This is why I allow for a symbol parameter to spam-split.  You can
say, for example:

(: spam-split 'spam-use-blacklist)

at the beginning, which will catch only known spammers, and then

(: spam-split 'spam-use-bogofilter)

towards the end to catch more generic spam.  You can even give a group
name as a parameter, instead of the default ("spam" usually).

If you just use the default (: spam-split), I'd put it towards the end.

> Another thing I had to do, although I would have
> preferred to put my own expressions in my ~/.gnus.el, was to 'G c'
> on the "mail.misc" group and set:
> 
> - Group contents spam/ham classification:
>   gnus-group-spam-classification-ham
> 
> - Spam summary exit processor:
>   Spam: Bogofilter
>   Ham: Bogofilter
> 
> - Destination for spam-processed articles at summary exit:
>   nnmaildir:Spam
> 
> - Spam-mark choices:
>   gnus-spam-mark
> 
> My intention was to declare "mail.misc" as containing ham, but that whenever
> I mark a message as spam ('S x'), it will be put in "Spam" and recorded by
> bogofilter for the future.

Is "nnmaildir:Spam" correct?  I would use the full group name as it
appears in the Group buffer.

The rest is OK.

> Now, on the "Spam" group I did 'G c' and:
> 
> - Group contents spam/ham classification:
>   gnus-group-spam-classification-spam
> 
> - Spam summary exit processor:
>   Ham: Bogofilter
> 
> - Destination for spam-processed articles at summary exit:
>   nnmaildir:mail.misc
> 
> - Spam-mark choices:
>   gnus-spam-mark
> 
> and my intention here was to be able to mark as ham any ham that may have
> been missclassified, send it to "mail.misc", and record it by bogofilter
> for the future.

You want to set the ham-process-destination to "nnmaildir:mail.misc"
while leaving the spam-process-destination nil (so the spam will be
deleted in place).

You need to add the Spam: Bogofilter exit processor as well, or spam
messages will not be processed.  Right now you're just teaching what's
ham.

> It seems to work fine, but some messages (particularly from ecolog-l) are
> sent to "Spam". Marking them as ham does send them back "mail.misc"
> (where I later redirect them by hand to "Ecolog-L"), but they don't seem
> to be recorded by bogofilter, as (some) future messages from this address
> still get put in "Spam".

If you could update to CVS, that would make the job much easier.  Let
me know when you decide, and we'll go from there.

Ted



  reply	other threads:[~2005-04-29 15:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-19 22:16 Sebastian Luque
2005-04-20  7:54 ` Jonas Steverud
2005-04-22 17:49 ` Ted Zlatanov
2005-04-27 19:24   ` Sebastian Luque
2005-04-29 15:26     ` Ted Zlatanov [this message]
2005-04-29 16:17       ` Reiner Steib
2005-04-29 16:48         ` Ted Zlatanov
2005-04-29 18:09         ` Sebastian Luque
2005-04-29 18:20           ` Arne Jørgensen

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=4n8y31li2u.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    /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).