Syntax of SA Rule Actions ruleset?

Julian Field MailScanner at ecs.soton.ac.uk
Fri Nov 26 15:53:42 GMT 2010



On 26/11/2010 13:19, Peter Bonivart wrote:
> I have trouble understanding the required syntax for defining several
> rules in the ruleset.
>
> This is simple, if it's to foo.com and it hits PB_PDF then apply store-nonspam.
>
> To:    *@foo.com PB_PDF=>store-nonspam
>
> But how about if you have several rules that can possibly match, even
> if the actions should be same I have trouble defining it. Should I do
> like this:
>
> To:     *@foo.com PB_FOO2=>not-deliver,store-nonspam,forward
> mail.quarantine at foo.com
> To:     *@foo.com PB_FOO3=>not-deliver,store-nonspam,forward
> mail.quarantine at foo.com
> FromOrTo:       default
>
> Or like this:
>
> To:     *@foo.com PB_FOO2=>not-deliver,store-nonspam,forward
> mail.quarantine at foo.com,PB_FOO3=>not-deliver,store-nonspam,forward
> mail.quarantine at foo.com
> FromOrTo:       default
Create a meta-rule in SpamAssassin that is something like this:
meta PB_F002_OR_3 PB_F002 || PB_F003

Then use a rule in MailScanner that looks like

To: *@foo.com PB_F002_OR_3=>not-deliver,store-nonspam,forward 
mail.quarantine at foo.com

So in your SpamAssassin rules, combine every relevant rule into a 
meta-rule that is a logical expression using your original rule names. 
Then in MailScanner, just trigger actions off the meta-rule.
> I have tried a few variations and the last one works but with some
> side effects like it also tries to forward to an address
> "mail.quarantine at foo.com PB_FOO2=>not-deliver" so obviously it doesn't
> like that syntax either.
>
> /peter

Jules

-- 
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
Follow me at twitter.com/JulesFM and twitter.com/MailScanner


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the MailScanner mailing list