27.11.2012 Views

IronPort - advanced configuration guide

IronPort - advanced configuration guide

IronPort - advanced configuration guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

OL-25137-01<br />

Note When matching an empty string, do not use “” as that actually matches all strings. Instead use “^$”. For<br />

an example, see the second example in Subject Rule, page 6-21.<br />

It is also important to remember that if you want to match a literal period, you must use an escaped period<br />

in the regular expression. For example, the regular expression sun.com matches the string<br />

thegodsunocommando, but the regular expression ^sun\.com$ only matched the string sun.com.<br />

Technically, the style of regular expressions used are Python re Module style regular expressions. For<br />

a more detailed discussion of Python style regular expressions, consult the Python Regular Expression<br />

HOWTO, accessible from:<br />

http://www.python.org/doc/howto/<br />

Regular Expression and Non-ASCII Character Sets<br />

n Tests<br />

Case-sensitivity<br />

In some languages, the concepts of a word or word boundary, or case do not exist.<br />

Complex regular expressions that depend on concepts like what is or is not a character that would<br />

compose a word (represented as “\w” in regex syntax) cause problems when the locale is unknown or if<br />

the encoding is not known for certain.<br />

Regular expressions can be tested for matching using the sequence == and for non-matching using the<br />

sequence !=. For example:<br />

rcpt-to == "^goober@dev\\.null\\....$" (matching)<br />

rcpt-to != "^goober@dev\\.null\\....$" (non-matching)<br />

Unless otherwise noted, regular expressions are case-sensitive. Thus, if your regular expression is<br />

searching for foo, it does not match the pattern FOO or even Foo.<br />

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

6-17

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

Saved successfully!

Ooh no, something went wrong!