On Wed, 11 Jan 2017 14:18:58 -0800
Alan Hodgson wrote:

> On Wednesday 11 January 2017 16:58:39 Michael B Allen wrote:
> > Is there a way to add a rule that simply matches specific key words?
> > 
> > For example, if someone actually names my product it's basically
> > guaranteed not to be spam. In this case, I want to just whitelist it
> > (or maybe apply -10 to the score).
> > 
> > Any pointers would be appreciated.
> > 
> > Mike  
> 
> https://wiki.apache.org/spamassassin/WritingRules
> 
> Add to /etc/spamassassin/local.cf (or your .spamassassin/user_prefs
> if allow_user_rules 1)
> 
> Something like:
> 
> header __LOCAL_SUBJECT_PRODUCTS Subject
> =~ /(product1|product2|product3)/i body
> __LOCAL_BODY_PRODUCTS /(product1|product2|product3)/i
> 
> meta LOCAL_WHITELIST_PRODUCTS ( __LOCAL_SUBJECT_PRODUCTS ||
> __LOCAL_BODY_PRODUCTS)
> score LOCAL_WHITELIST_PRODUCTS -10
> describe LOCAL_WHITELIST_PRODUCTS Message names one of my products

You don't need a separate header rule as the subject is treated as part
of the body, so:

body  LOCAL_WHITELIST_PRODUCTS    /product1|product2|product3/i
score LOCAL_WHITELIST_PRODUCTS    -10


in theory, since it has a negative score, you should also set 

tflags LOCAL_WHITELIST_PRODUCTS   nice

Reply via email to