Cisco Cisco Email Security Appliance C160 Mode D'Emploi

Page de 1185
 
9-24
Cisco AsyncOS 8.5.6 for Email User Guide
 
Chapter 9      Using Message Filters to Enforce Email Policies
  Message Filter Rules
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 
 for more information.
The following filter returns true if the headers are empty or if the headers are missing from the message:
Note
This filter returns true for empty Subject and To headers, but it also returns true for missing headers. If 
the message does not contain the specified headers, the filter still returns true. 
Envelope Recipient Rule
The 
rcpt-to
 rule selects those messages where any Envelope Recipient matches the given regular 
expression. For example, the following filter drops all messages sent with an email address containing 
the string “scarface.”
Note
The regular expression for the 
rcpt-to
 rule is case insensitive.
Note
The 
rcpt-to
 rule is message-based. If a message has multiple recipients, only one recipient has to match 
the rule for the specified action to affect the message to all recipients. 
EmptySubject_To_filter:
if (header('Subject') != ".") OR
   (header('To') != ".") {
   drop();
}
scarfaceFilter:
   if (rcpt-to == 'scarface')
   {
        drop();
   }