On Tue, 26 Jun 2018, J Doe wrote:

On Jun 26, 2018, at 12:13 AM, John Hardin <jhar...@impsec.org 
<mailto:jhar...@impsec.org>> wrote:

My thinking here is that if this rule ever passes, it should not add a small 
value to the score but push the score up to the value
that required_score is set to.  This way, if the custom rule ever matches, it 
automatically scores the amount required to flag
the message as spam because the score applied is the value of required_score.

That's called a "poison pill rule", and generally you don't worry about hitting 
the required score exactly, you just set it to something large - like 10 or 100.

Is it possible with the SA grammar to have variables ?  I was thinking I’d have 
something like the following in my: /etc/spamassassin/local.cf

   POISON_PILL = 100

…and then all the poison pill rules would reference that:

   score CUSTOM_RULE1 %POISON_PILL

…with the advantage being that if I did want to vary the score assigned to all 
these rules, I could change it in one place ?

Not at this time. As we say, "Patches are welcome!"

You'd have to do that in a preprocessing stage if you wanted to do that: have a set of "source" rule files with tokens like that which you edit, and run that through a substitution tool to get the local rules files for SA to use.


--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 jhar...@impsec.org    FALaholic #11174     pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  The world has enough Mouse Clicking System Engineers.
                                                       -- Dave Pooser
-----------------------------------------------------------------------
 8 days until the 242nd anniversary of the Declaration of Independence

Reply via email to