This article applies to:
- Trustwave ECM/MailMarshal Exchange
- This article does not apply to supported versions of Trustwave MailMarshal (SEG).
Question:
- How do I use Special Characters in Text Censor Scripts?
Procedure:
Basic scripts can handle alphanumeric characters only, but we can add other characters to our script, such as $:!-%@. However these have to be explicitly declared in each specific script in which they are to be used.
Suppose we want to scan for the following string, an email address: user@mydomain.com
- Declare the special characters @ and.
Edit your Text Censor Script. Check "Enable matching of Special Characters". Add the two special characters: @.
- Step 2 Create your new Text Censor item.
Edit your Text Censor Script. Click "New" and in the "Words and Phrases" field add: user@mydomain.com
Some characters have special meaning in Text Censor Scripts
* is a wildcard
() are used in building more complex censor statements such as cat AND (dog OR mouse).
= The equals sign can also be used with some operators such as INSTANCES=7.
What if we want to simply search for these characters, rather than use them in the above manner? In that case we need first to declare the special character, and then use that character within quotation marks in our script.
Suppose we want the Text Censor to detect the string "subject=unsubscribe"
- First we declare = as a special character.
- Second we create a Text Censor item as follows - note the use of the quotes: subject"="unsubscribe
Note:
Trustwave MailMarshal (SEG) TextCensor Scripts use an updated engine that does not require entry of "special characters". For information about reserved characters in SEG, see the User Guide.
- This article was previously published as:
- NETIQKB29179
- Marshal KB130