On Fri, Jul 23, 2021 at 08:16:56AM +0300, Henrik K wrote:
> 
> > 2C) The initial release of CHAOS.pm did all kinds of scoring.  One of the
> > knocks I have about SpamAssassin is that is does not maintain counts of 
> > hits. 
> > My complaints about this go all the way back to 2010.  Counts and Amounts.  
> > SA
> > is great with Amounts.  It sucks with Counts.  To the SA Development crew's
> > credit, somewhere along the way, tflags were added to allow that 
> > functionality
> > in a very primitive fashion.  Many people are happy with that.  I'm just not
> > one of them.
> > ...
> > I read somewhere, while looking at META rules that SA internally builds an
> > array of the rules hit.  That way, as rules hit, METAs are then 
> > appropriately
> > updated.  Gee, an array.  Maybe we could add a count to that array if the 
> > user
> > wishes to?  I think that it is a lot of development; not so much the actual
> > process of doing it, but updating all the User handling thereof.  Alas, It 
> > is
> > what it is *SIGH*
> 
> There's zero actual information here.  What exactly are you finding hard to
> "count"?

Looking at the emoji code for example, you are doing all sorts of funny
stuff like creating dynamic rules with count names

"The rulename, JR_SUBJ_EMOJIS or <YOUR_RULENAME> is appended with an
"_$count" whose score is 0.01.  Example: YOUR_RULENAME_3.  The rule's
description will reflect the number of Emojis found."

This is not really how SA is supposed to be used (even though it's
possible).  It's just complex and confusing.

Normal way is calling the eval function multiple times with the parameters
you want to check, there's many examples in the stock rules:

body HTML_OBFUSCATE_05_10      eval:html_range('obfuscation_ratio','.05','.1')
body HTML_OBFUSCATE_10_20      eval:html_range('obfuscation_ratio','.1','.2')

Reply via email to