Peter West writes:
 > From: Peter West <p...@pbw.id.au>
 > Date: Sun, 14 Mar 2021 23:30:03 +1000
 > 
 > I m running spamassassin 3.4.2-0 in ubuntu 18.04.4.
 > 
 > Controlling process is
 > /usr/bin/perl -T -w /usr/sbin/spamd -d --pidfile=/var/run/spamd.pid 
 > --create-prefs --max-children 5 --helper-home-dir
 > 
 > 
 > My local.cf has local rules enabled, and contains, inter alia, these rules
 > =========
 > 
 > header CASINO From =~ /\bcasino\b/i
 > score 100.0
 > 
 > header CASINOS From =~ /\bcasinos\b/i
 > score 100.0

These two rules can be combined by making the 's' optional eg 's?'

 > The casinao stuff is still getting through. Here s the X-Spam-Status on a 
 > typical message.
 > 
 > X-Spam-Status: No, score=4.1 required=5.0 
 > tests=CASINO,DKIM_SIGNED,DKIM_VALID,
 >      DKIM_VALID_AU,HTML_MESSAGE,MAILING_LIST_MULTI,RAZOR2_CF_RANGE_51_100,
 >      RAZOR2_CHECK,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED shortcircuit=no
 >      autolearn=no autolearn_force=no version=3.4.2
 > 
 > It s hitting the CASINO rule, but no matter what valoue I assign to the 
 > casino rules - 5, 20 , 100, these messages always come through with a value 
 > of 4.1. It s as though some toerh rule is resetting the score to 0 before 
 > proceeding.
 > 
 > My other query concerns the AUSPOST rules. What I want to do is elminate 
 > mail that has a name of  AUSTRALIA POST  and does NOT have an address 
 > containing <auspost.com.au>. Hence I m trying the -20.0 +20.0 pair of rules. 
 > Is there a more direct way of achieving this? Will a pcre  not followed by  
 > style of rule do the trick?
 > 
 > Is there a finer subdivision of the From header; into name and address, for 
 > example.
 > 
 > peter
 > 
 >  
 > p...@ehealth.id.au
 >  Two men went up into the temple to pray, one a Pharisee and the other a tax 
 > collector. 


Change the Status header to show the scores for each rule, by changing
tests=_TESTS_ to tests=_TESTSSCORES_
Something like: 
   add_header all Status _YESNO_, score=_SCORE_ required=_REQD_ 
tests=_TESTSSCORES_ version=_VERSION_ autolearn=_AUTOLEARN_

This will show the score that you are getting for CASINO, which is
probably 1, because of the syntax error in your scores (already
pointed out).


And You might want to fix the URIBL_BLOCKED issue.  Fixing the
URIBL_BLOCKED issue will do far more to fix your issues than adding
rules.


-jeff

Reply via email to