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

Reload spamassassin if you modified local.cf.

Reply via email to