Can I quarantine a message based on the presence of a specific header line?
Mark Sapiro
mark at msapiro.net
Wed Oct 19 23:31:32 UTC 2016
On 10/19/2016 01:08 PM, Richard Bollinger wrote:
>
> We have a system that tags outbound emails that should be quarantined by
> added a special mail header. I'd like to use MailScanner to check for
> the presence that header and act accordingly, with the usual options
> specified by rules. Is there a way to do this?
Yes. First define a SpamAssassin rule like
header FOUND_SPECIAL_HEADER exists:Name-Of-Your-Header
describe FOUND_SPECIAL_HEADER Whatever you want to describe this
score FOUND_SPECIAL_HEADER 0.1
The score can be any non-zero value.
Then you can make a ruleset for SpamAssassin Rule Actions, e.g.
SpamAssassin Rule Actions = %rules-dir%/spam_rule_action.rules
and in that file put things like
To exempt at example.com FOUND_SPECIAL_HEADER=>deliver
>From other at example.com FOUND_SPECIAL_HEADER=>deliver
FromOrTo default FOUND_SPECIAL_HEADER=>store,discard
See
<https://www.mailscanner.info/MailScanner.conf.index.html#SpamAssassin%20Rule%20Actions>
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the MailScanner
mailing list