[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to unregister message as spam/ham?

From: Adam Sjøgren
Subject: Re: How to unregister message as spam/ham?
Date: Sun, 06 Sep 2009 13:50:46 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) XEmacs/21.5-b29 (linux)

On Sun, 06 Sep 2009 12:42:51 +0200, Adam wrote:

> Looking in the code, unregistering seems to be handled for bogofilter:

Ah, it is - but an article isn't unregistered if it is going from ham to
spam, or spam to ham, because, in spam.el's spam-resolve-registrations-routine
this happens:

         ;; eliminate duplicates
         (dolist (article (copy-sequence ulist))
           (when (memq article rlist)
             (incf delcount)
             (setq rlist (delq article rlist))
             (setq ulist (delq article ulist))))

If you crank up gnus-verbose, your test will say something like:

 "1 messages were saved the trouble of unregistering and then registering"

If you comment out the eliminate duplicates-part quoted above, I think
it will do the unregistering as you expect/want.

                                 o o o

Oh, and I also said:

> Ah. When I set up crm114 it didn't have this functionality, I think, so
> I wasn't aware of it.

Looks like crm114 gained an '--unlearn' switch at some point.

I can't really figure out where the source code repository for crm114
lives, so exactly when is unclear to me (my guesses are either 20040407
og 16 Jan 2009:;a=commit;h=31f68a7f24c300cb3c2cbb09b245f348265eed19

But here is a patch that adds support for it to spam.el:

diff --git a/lisp/spam.el b/lisp/spam.el
index c315f2f..e2d34b6 100644
--- a/lisp/spam.el
+++ b/lisp/spam.el
@@ -659,12 +659,12 @@ order for SpamAssassin to recognize the new registered 
   :type 'string
   :group 'spam-crm114)
-(defcustom spam-crm114-spam-strong-switch "--UNKNOWN"
+(defcustom spam-crm114-spam-strong-switch "--unlearn"
   "The switch that CRM114 Mailfilter uses to unregister ham messages."
   :type 'string
   :group 'spam-crm114)
-(defcustom spam-crm114-ham-strong-switch "--UNKNOWN"
+(defcustom spam-crm114-ham-strong-switch "--unlearn"
   "The switch that CRM114 Mailfilter uses to unregister spam messages."
   :type 'string
   :group 'spam-crm114)
@@ -1151,10 +1151,8 @@ backends)."
-                                 ;; does CRM114 Mailfilter support 
-                                 nil
-                                 nil)
+                                 'spam-crm114-unregister-ham-routine
+                                 'spam-crm114-unregister-spam-routine)
 ;;{{{ scoring and summary formatting

 "I'm not a monster, well, technically I am"                  Adam Sjøgren

reply via email to

[Prev in Thread] Current Thread [Next in Thread]