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.

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

OL-25137-01<br />

Note The strip-headers and insert-header actions can be used in combination to rewrite any message<br />

headers in the original message. In some case, it is valid to have multiple instances of the same header<br />

(for example, Received:) where in other cases, multiple instances of the same header could confuse a<br />

MUA (for example, multiple Subject: headers.)<br />

Edit Header Text Action<br />

Edit Body Text Action<br />

When working with headers, remember that the current value of the header includes changes made<br />

during processing (such as with filter actions that add, remove, or modify message headings). See<br />

Message Header Rules and Evaluation, page 6-4 for more information.<br />

The edit-header-text action allows you to rewrite specified header text using the regular expression<br />

substitution function. The filter matches the regular expression within the header and replaces it with a<br />

regular expression you specify.<br />

For example, an email contains the following subject header:<br />

Subject: SCAN Marketing Messages<br />

The following filter removes the “SCAN” text, and leaves the text, “Marketing Messages”, in the header:<br />

Remove_SCAN: if true<br />

}<br />

{<br />

edit-header-text (‘Subject’, ‘^SCAN\\s*’,’’);<br />

After the filter processes the message, it returns the following header:<br />

Subject: Marketing Messages<br />

The edit-body-text() message filter is similar to the Edit-Header-Text() filter, but it operates across<br />

the body of the message instead of one of the headers.<br />

The edit-body-text() message filter uses the following syntax where the first parameter is the regular<br />

expression to search for and the second parameter is the replacement text:<br />

Example: if true {<br />

edit-body-text("parameter 1",<br />

"parameter 2");<br />

}<br />

The edit-body-text() message filter only works on the message body parts. For more information<br />

about whether a given MIME part is considered a message “body” or a message “attachment”, see<br />

Message Bodies vs. Message Attachments, page 6-5.<br />

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

6-61

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

Saved successfully!

Ooh no, something went wrong!