spamassassin-users October 2010 archive
Main Archive Page > Month Archives  > spamassassin-users archives
spamassassin-users: Re: prevent rule from being considered for B

Re: prevent rule from being considered for Bayes auto-learning

From: Karsten Bräckelmann <guenther_at_nospam>
Date: Thu Oct 21 2010 - 16:47:23 GMT
To: users@spamassassin.apache.org

On Thu, 2010-10-21 at 18:39 +0200, Karsten Bräckelmann wrote:
> See M::SA::Plugin::AutoLearnThreshold. In a nutshell, (a) there are a
> few tflags that will prevent a rule's score to be used for auto-learning
> and (b) the score used is picked from the respective non-bayes
> score-set.
>
> With (a) you can make a rule invisible to the auto-learning decision.
> And by setting the scores for score-set 0 and 1 both to 0 as per (b),
> you can effectively disable a rule unless Bayes is enabled.

... *and* have that rule "ignored" for the auto-learning decision, if
Bayes and auto-learn is enabled. (Actually not ignored, but adding zero
doesn't influence the result. ;)

The tflags way is much more straight forward, though.

> You cannot, however, create a rule to conditionally prevent auto-
> learning altogether (which, as I understand isn't what you had in mind
> anyway).

-- char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}