Cisco Cisco Email Security Appliance X1050 Guía Del Usuario
9-29
Cisco AsyncOS 9.5 for Email User Guide
Chapter 9 Using Message Filters to Enforce Email Policies
Message Filter Rules
Note
Do not confuse the
date
rule with the
$Date
message filter action variable.
Header Rule
The
header()
rule checks the message headers for a specific header, which must be specified quoted in
parentheses (“header name”). This rule may be compared to a regular expression, much like the
subject
rule, or may be used without any comparison, in which case it will be “true” if the header is found in the
message, and “false” if it is not found. For example, the following example checks to see if the header
message, and “false” if it is not found. For example, the following example checks to see if the header
X-Sample
is found, and if its value contains the string “
sample text
”. If a match is made, the message
is bounced.
You can specify non-ASCII characters to search for in the value of the header.
The following example demonstrates the header rule without a comparison. In this case, if the header
X-DeleteMe
is found, it is removed from the message.
When working with headers, remember that the current value of the header includes changes made
during processing (such as with filter actions that add, remove, or modify message headings). See
during processing (such as with filter actions that add, remove, or modify message headings). See
for more information.
{
bounce();
}
FooHeaderFilter:
if (header('X-Sample') == 'sample text')
{
bounce();
}
DeleteMeHeaderFilter:
if header('X-DeleteMe')
{
strip-header('X-DeleteMe');
}