Page 1 of 1
Custom SA rule per domain
Posted: 15 May 2017 15:39
by peter.munnelly
Hi,
Is it possible to have custom rules for a specific domain and not for all domains that have been setup?
Re: Custom SA rule per domain
Posted: 16 May 2017 03:04
by pdwalker
Probably.
What do you want to do exactly?
Re: Custom SA rule per domain
Posted: 16 May 2017 07:43
by peter.munnelly
I want to create a custom rule that blocks any email where the header contains .rsvg.net, I can do this via the following SA rule.
header CONTAINS_RSGSV Received =~ /rsgsv\.net/i
score CONTAINS_RSGSV 10.0
describe CONTAINS_RSGSV rsgsv.net
What I want to do then is only have this rule be applied to email for domain.com and be ignored for all other domains.
Re: Custom SA rule per domain
Posted: 17 May 2017 08:03
by pdwalker
Yes, simple enough. Off the top of my head, I forget the syntax, but if you peruse the existing rules in /var/lib/spamassassin/3.004001/updates_spamassassin_org you should be able to find an example of an "AND" rule that you can use as a template
Oh, shawniversion has just posted an example here:
viewtopic.php?f=14&t=2416 that you could adapt to your needs.