[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gnus and CRM spam filter?
From: |
Adam Sjøgren |
Subject: |
Re: Gnus and CRM spam filter? |
Date: |
Mon, 12 Dec 2005 00:26:51 +0100 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) XEmacs/21.4.18 (linux) |
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?"