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:39:16 GMT
To: users@spamassassin.apache.org

On Thu, 2010-10-21 at 13:27 -0230, Lawrence @ Rogers wrote:
> I recall reading somewhere that there is a way to prevent a rule from
> being considered for Bayes auto-learning. I am trying to create a rule
                       ^^^^^ ^^^^^^^^^^^^^
> that hits upon some obvious spam that I am seeing, yet I want to make
> sure (for now) that any scores it assigns are not used for anything
> Bayes-related. I cannot seem to find any documentation on how to do this
> (Google doesn't help). I think it is something to do with setting a
> tflag, but any guidance would be appreciated.
  ^^^^^

Yup, that's correct. Though your google-fu today... The three marked
strings from your own description leads to perfect documentation. :)

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.

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; }}}