Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Gnus and CRM spam filter?
@ 2005-12-10 21:03 vedm
  2005-12-11 23:26 ` Adam Sjøgren
  0 siblings, 1 reply; 3+ messages in thread
From: vedm @ 2005-12-10 21:03 UTC (permalink / raw)



How can I setup Gnus with the CRM filter?

My email is split by procmail, so I do not need Gnus to split. I only
want to be able to do the following two things: 

1. when I find a non-spam message in my spam group I want to send it to CRM
   to learn it as non-spam, and then Gnus should move the message to
   another group

2. when I find a spam message in a nonspam group I want to send it to
   CRM to learn it as spam, and then Gnus should move it to the spam
   group.

Thanks in advance for any help.

-- 
vedm


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Gnus and CRM spam filter?
  2005-12-10 21:03 Gnus and CRM spam filter? vedm
@ 2005-12-11 23:26 ` Adam Sjøgren
  2005-12-12  3:31   ` vedm
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Sjøgren @ 2005-12-11 23:26 UTC (permalink / raw)


On Sat, 10 Dec 2005 16:03:16 -0500, vedm wrote:

> How can I setup Gnus with the CRM filter?

I've set my Gnus up like this:

 (gnus-registry-initialize)
 (spam-initialize)
 (setq
  spam-log-to-registry t
  spam-junk-mailgroups nil ; Everything must be unclassified.
  spam-move-spam-nonspam-groups-only t ; Only process spam in nonspam groups.
  spam-process-ham-in-spam-groups t
  spam-process-ham-in-nonham-groups t
  spam-mark-ham-unread-before-move-from-spam-group t
  spam-summary-exit-behavior 'move-all
  spam-use-hashcash t
  spam-use-crm114 t
  spam-crm114-program "/home/asjo/bin/crm114.pl"
  spam-crm114-database-directory "/home/asjo/.crm114/") ; --fileprefix=
 (setq gnus-ham-process-destinations  '(("nnml:spam" respool))      ; Respool ham
       gnus-spam-process-destinations '((".*" "nnml:spam"))) ; Spam to nnml:spam
 ; On the email-topic, set these parameters:
 ;  ((spam-process '(spam spam-use-crm114)))
 ; On the spam-topic, set these parameters:
 ;  ((ham-marks (gnus-ticked-mark))
 ;   (spam-process '(ham spam-use-crm114)))
 ; On the spam-group, set these parameters:
 ;  ((ham-process-destination 'respool)
 ;   (spam-process-destination . "nnml:spam")
 ;   (gnus-show-threads nil)
 ;   (gnus-extra-headers '(X-Spam-Status To Newsgroups))
 ;   (gnus-article-sort-functions '(gnus-article-sort-by-spam-status)))

Notice that you most certainly want different values for
spam-crm114-program (I use a wrapper, leftover from debugging) and
spam-crm114-database-directory.

You probably want to have the Gnus registry automatically keep it's
size down, by something like:

 (setq gnus-registry-max-entries 5000)

My nnml:spam-group is sorted by SA's X-Spam-Status value, by adding
this:

 ; Sort by X-Spam-Status:
 ; (by Michael Shields <shields@msrl.com> in <87brssb9cg.fsf@mulligatwani.msrl.com>
 ;; Set gnus-extra-headers instead^WALSO:
 ;; SpamAssasin 3.0.0 changed "hits" to "score":
 (add-to-list 'nnmail-extra-headers 'X-Spam-Status)
 (defun gnus-article-sort-by-spam-status (h1 h2)
   "Sort articles by score from the X-Spam-Status: header."
   (< (string-to-number (gnus-replace-in-string
                         (gnus-extra-header 'X-Spam-Status h1)
                         ".*score=" ""))
      (string-to-number (gnus-replace-in-string
                         (gnus-extra-header 'X-Spam-Status h2)
                         ".*score=" ""))))

Which is very nice.

Since I started using greylisting, I have - on average - receieved
less than two spams per day, so the sorting is less necessary now.

You don't want splitting in Gnus, so this part(/start) of my
nnmail-split-fancy is not relevant:

 (setq nnmail-split-fancy
       '(|
           (: spam-split)
           [...]

> 1. when I find a non-spam message in my spam group I want to send it to CRM
>    to learn it as non-spam, and then Gnus should move the message to
>    another group

I do this by ticking it - by pressing !

> 2. when I find a spam message in a nonspam group I want to send it to
>    CRM to learn it as spam, and then Gnus should move it to the spam
>    group.

I do this by marking it as spam, by pressing M-d (which marks the
article in the summary with a $-sign).


It has been a while since I set it up, so my configuration may have
unwanted cruft or such, so don't use it without reading what the
various variables and parameters do :-)


  Best regards,

-- 
 "If you cannot accept that other people have other           Adam Sjøgren
  aims and needs than than you, then why are you talking  asjo@koldfront.dk
  to other people in the first place?"


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Gnus and CRM spam filter?
  2005-12-11 23:26 ` Adam Sjøgren
@ 2005-12-12  3:31   ` vedm
  0 siblings, 0 replies; 3+ messages in thread
From: vedm @ 2005-12-12  3:31 UTC (permalink / raw)


asjo@koldfront.dk (Adam Sjøgren) writes:

> On Sat, 10 Dec 2005 16:03:16 -0500, vedm wrote:
>
>> How can I setup Gnus with the CRM filter?
>
> I've set my Gnus up like this:
>
>  (gnus-registry-initialize)
>  (spam-initialize)
>  (setq

[..]

Thanks a lot, that's very helpful.

-- 
vedm


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-12-12  3:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-10 21:03 Gnus and CRM spam filter? vedm
2005-12-11 23:26 ` Adam Sjøgren
2005-12-12  3:31   ` vedm

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).