MessageFilter Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2013 04:33 PM
Hello,
Am trying to setup a message rule which will allow emails to perticular domains and drop anything going outside from perticular IPs. Here is what I have and its not working. Please help...
CDW_Filter:
if(((remote-ip == '10.17.239.11') OR (remote-ip == '10.17.239.254')) AND ((rcpt-to != 'internal1.local') OR (rcpt-to != 'internal2.local')))
{
drop();
}
It drops anything coming from those IPs.
- Labels:
-
Email Security
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2013 03:15 AM
Hello Sameer,
the error is your second statement, if you think for a moment, this is always true:
((rcpt-to != 'internal1.local') OR (rcpt-to != 'internal2.local'))
You need to use AND to make it working
((rcpt-to != 'internal1.local') AND (rcpt-to != 'internal2.local'))
BTW, another way to check for IPs is to create a sendergroup with the servers you want to enforce this filter with, and then match on the sendergroup rule rather than a list of IPs. This way the filter becomes easier to mantain, as you can add and remove IPs in the sendergroup on the GUI without changing the filter.
Hope that helps,
Andreas
