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 />

In the following example, the attachment is scanned for a pattern in the binary data. The filter uses the<br />

attachment-binary-contains filter rule to search for a pattern that indicates that the PDF document is<br />

encrypted. If the pattern is present in the binary data, a custom header is inserted:<br />

match_PDF_Encrypt:<br />

if (attachment-filetype == 'pdf' AND<br />

Dropping Attachments by File Type<br />

attachment-binary-contains('/Encrypt')){<br />

strip-header (‘Subject’);<br />

insert-header (‘Subject’, ‘[Encrypted] $Subject’);<br />

}<br />

In the following example, the “executable” group of attachments (.exe, .dll, and .scr) is stripped from<br />

messages and text is added to the message, listing the filenames of the dropped files (via the<br />

$dropped_filename action variable). Note that the drop-attachments-by-filetype action examines<br />

attachments and strips them based on the fingerprint of the file, and not just the three-letter filename<br />

extension. Note also that you can specify a single filetype (“mpeg”) or you can refer to all of the<br />

members of the filetype (“Media”):<br />

strip_all_exes: if (true) {<br />

drop-attachments-by-filetype ('Executable', “Removed attachment:<br />

$dropped_filename”);<br />

}<br />

In the following example, the same “executable” group of attachments (.exe, .dll, and .scr) are<br />

stripped from messages whose Envelope Sender is not within the domain example.com.<br />

strip_inbound_exes: if (mail-from != "@example\\.com$") {<br />

}<br />

drop-attachments-by-filetype ('Executable');<br />

In the following example, a specific member of a file type (“wmf”) as well as a the same “executable”<br />

group of attachments (.exe, .dll, and .scr) are stripped from messages whose Envelope Sender is not<br />

within the domain example.com.<br />

strip_inbound_exes_and_wmf: if (mail-from != "@example\\.com$") {<br />

}<br />

drop-attachments-by-filetype ('Executable');<br />

drop-attachments-by-filetype ('x-wmf');<br />

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

6-73

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

Saved successfully!

Ooh no, something went wrong!