27.11.2012 Views

IronPort - advanced configuration guide

IronPort - advanced configuration guide

IronPort - advanced configuration guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

6-8<br />

Cisco <strong>IronPort</strong> AsyncOS 7.6 for Email Advanced Configuration Guide<br />

Chapter 6 Using Message Filters to Enforce Email Policies<br />

routing number, you may want to trigger a filter action. To accomplish this, you can use a weighted<br />

dictionary to give increased importance to certain terms or a combination of terms. When a message<br />

filter that uses a content dictionary scores the matches for filter rule, it uses these weights to determine<br />

the final score. For example, suppose you create a content dictionary with the following contents and<br />

weights:<br />

Table 6-1 Sample Content Dictionary<br />

Term/Smart Identifier Weight<br />

ABA Routing Number 3<br />

Account 2<br />

Bank 1<br />

When you associate this content dictionary with a dictionary-match or<br />

attachment-dictionary-match message filter rule, AsyncOS would add the weight for the term to the<br />

total “score” for each instance of the matching term found in the message. For example, if the message<br />

contains three instances of the term, “account” in the message body, AsyncOS would add a value of 6 to<br />

the total score. If you set the threshold value for the message filter to 6, AsyncOS would determine that<br />

the threshold score has been met. Or, if the message contained one instance of each term, the total value<br />

would be 6, and this score would trigger the filter action.<br />

AND Test and OR Tests in Message Filters<br />

When evaluating AND or OR tests within message filters, AsyncOS does not evaluate unneeded tests.<br />

So, for example, if one side of an AND test is false, the system will not evaluate the other side. It is<br />

important to note that the system does not evaluate the tests from left to right. Instead, when AND and<br />

OR tests are evaluated, the least expensive test is evaluated first. For example, in the following filter, the<br />

remote-ip test will always be processed first because it has a lower cost than the rcpt-to-group test<br />

(generally LDAP tests are more expensive):<br />

andTestFilter:<br />

if (remote-ip == "192.168.100.100" AND rcpt-to-group == "GROUP")<br />

{ ... }<br />

Because the least expensive test is performed first, switching the order of the items in the test will have<br />

no effect. If you want to guarantee the order in which tests are performed, use nested if statements. This<br />

is also the best way to ensure that an expensive test is avoided whenever possible:<br />

expensiveAvoid:<br />

if ()<br />

{ if ()<br />

}<br />

{ }<br />

OL-25137-01

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!