Cisco Cisco Email Security Appliance C160 Mode D'Emploi

Page de 1185
 
9-70
Cisco AsyncOS 8.5.6 for Email User Guide
 
Chapter 9      Using Message Filters to Enforce Email Policies
  Message Filter Actions
The following example shows a social security number removed from the body of a message and 
replaced with the text, “XXX-XX-XXXX’:
Note
You cannot use smart identifiers with the 
edit-body-text()
 filter at this time.
HTML Convert Action
While RFC 2822 defines a text format for email messages, there are extensions (such as MIME) to 
provide the transport of other content within an RFC 2822 message. AsyncOS can now use the 
html-convert()
 message filter to convert HTML to plain text using the following syntax:
The Cisco message filters make a determination on whether a given MIME part is considered a message 
“body” or a message “attachment”. The 
html-convert()
 filter only works on the message body parts. 
For more information about message bodies and attachments, see 
.
Depending on the format, the
 html-convert()
 filter uses different methods to strip the HTML from 
within the documents.
If the message is plain text (text/plain), the message passes through the filter unchanged. If the message 
is a simple HTML message (text/html), all the HTML tags are stripped out of the message and the 
resulting body replaces the HTML message. The lines are not reformatted, and the HTML is not rendered 
in plain text. If the structure is MIME (with a multipart/alternative structure) and it contains both a 
text/plain part and text/html part with the same content, the filter removes the text/html part of the 
message and leaves the text/plain part of the message. For all other MIME types (such as 
multipart/mixed), all HTML body parts are stripped of their tags and reinserted into the message. 
 edit-body-text("(?i)(?:https?|ftp)://[^\\s\">]+", "URL REMOVED");
       }
ssn: if true { 
  edit-body-text("(?!000)(?:[0-6]\\d{2}|7(?:[0-6]\\d|7[012]))([ 
-]?)(?!00)\\d\\d\\1(?!0000)\\d{4}",
"XXX-XX-XXXX"); 
}
Convert_HTML_Filter:
if (true)
{
html-convert();
}