Cisco Cisco Email Security Appliance X1050 Guía Del Usuario
6-403
Cisco IronPort AsyncOS 7.3 for Email Advanced Configuration Guide
OL-23081-01
Chapter 6 Using Message Filters to Enforce Email Policies
Inserting Headers
In these examples, AsyncOS inserts headers when the attachments contain
specified content.
specified content.
In the following example, all of the attachments on the message are scanned for a
keyword. If the keyword is present in all of the attachments, a custom X-Header
is inserted:
keyword. If the keyword is present in all of the attachments, a custom X-Header
is inserted:
attach_disclaim:
if (every-attachment-contains('[dD]isclaimer') ) {
insert-header("X-Example-Approval", "AttachOK");
}
In the following example, the attachment is scanned for a pattern in the binary
data. The filter uses the
data. The filter uses the
attachment-binary-contains
filter rule to search for a
pattern that indicates that the PDF document is encrypted. If the pattern is present
in the binary data, a custom header is inserted:
in the binary data, a custom header is inserted:
match_PDF_Encrypt:
if (attachment-filetype == 'pdf' AND
attachment-binary-contains('/Encrypt')){
strip-header (‘Subject’);
insert-header (‘Subject’, ‘[Encrypted] $Subject’);
}
Dropping Attachments by File Type
In the following example, the “executable” group of attachments (
.exe
,
.dll
, and
.scr
) is stripped from messages and text is added to the message, listing the
filenames of the dropped files (via the
$dropped_filename
action variable). Note
that the
drop-attachments-by-filetype
action examines attachments and strips