pearl regex OR in rules files.
awm2 at st-andrews.ac.uk
Mon Nov 12 20:00:19 UTC 2018
I'm trying to set a rule that says if the domain is x and the IP is not a or b or c then do y
Its possible to get the behaviour I want using perl regex, but I'm struggling to get an or that will work. For example
From: /\@domain\.com/ and From: /^(?!10\.0\.0\.1$)/ store /path/to/dir/
This will take any email from domain.com that has NOT come from 10.0.0.1 and store it. Store being a test action, the final intention is to drop it once testing successfully. Where I'm falling short is getting some 'or' in that second expression. With a pipe or operator | it drops the functionality altogether, I've tried /^(?!10\.0\.0\.1|10\.0\.0\.2$)/ but no joy. I've played about a bit and can't get what I'm after. I tried a list of rules, one for each IP but they appear to cancel each other out, so I guess the question is 'Is Or supported in the perl regex in mailscanner rules' if so, any advice on how I can implement it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the MailScanner