How does a TextCensor Script trigger?


This article applies to:

  • Trustwave MailMarshal (SEG)
  • Trustwave ECM/MailMarshal Exchange

Question:

How does a TextCensor Script trigger?

Information:

TextCensor Scripts in MailMarshal have the following functionality:
  • Words or phrases can be weighted and the script will not trigger until the weighting trigger level is exceeded.
  • The script can be defined to scan specific parts of a message - the message header, body, subject or attachments, or any combination of these.
  • Escaping or special handling is required for certain characters. See Help for each product version. In MailMarshal Exchange, "special characters" must be declared.
  • For most product versions, rules that contain more than one text censor script will only trigger if all TextCensor scripts in the rule are triggered.
    • Optional triggering on "any" of the selected scripts is introduced in MailMarshal (SEG) 10.X
  • Text censor script items and their associated properties can be exported to a file in XML format. They can also be imported into MailMarshal from an XML file, assuming the correct syntax has been followed.  

Weighting

When using a weighted text censor script, there are three things you need to consider, the weighting level, the weighting type and the weighting trigger level or threshold.

Trustwave MailMarshal (SEG)

  • Score - each text censor item (i.e. each line) within a text censor script is assigned a weighting level (from -100 to 100, the default is 5).
  • Weighting Type - each text censor item (i.e. each line) within a text censor script is assigned a weighting type.
    • Every Time- for each match of the text censor item, the assigned weighting level will be added to the total.
    • First Match - only the first match of the text censor item will add the assigned weighting level to the total.
    • First N Matches- only the first number (selectable) of matches of the text censor item will add the assigned weighting level to the total.
  • Trigger Threshold - each text censor script is assigned a threshhold.  When the total of item scores exceeds the threshold, the script will trigger.

Trustwave ECM/MailMarshal Exchange

  • Weighting Level or Score - each text censor item (i.e. each line) within a text censor script is assigned a weighting level (from -100 to 100, the default is 5).

  • Weighting Type - each text censor item (i.e. each line) within a text censor script is assigned a weighting type, either standard (the default), decreasing, increasing or once only.
    • Standard - for each match of the text censor item, the assigned weighting level will be added to the total.
    • Decreasing - for the first match of the text censor item the assigned weighting level will be added to the total.  For each occurrence thereafter, a logarithmically decreasing proportion of the weighting level will be added to the total.
    • Increasing - for the first match of the text censor item the assigned weighting level will be added to the total.  For each occurrence thereafter, an exponentially increasing proportion of the weighting level will be added to the total.
    • Once Only - only the first match of the text censor item will add the assigned weighting level to the total.
  • Weighting Trigger Level - each text censor script is assigned a weighting trigger level.  Occurrences of the text censor items (depending on the weighting types used) will add the weighting level (or part of) to the weighting total.  When the weighting total exceeds the weighting trigger level, the script will trigger.
If you include more than one text censor script in a single rule, the rule will only trigger if all text censor scripts in the rule are triggered (note new options in MailMarshal (SEG) 10.X). This allows you to create more accurate text censor script rules because, for example, you can specify one text censor script to search the message subject line and another text censor script to search the message body. The rule will only trigger if both text censor scripts are triggered.

Notes:

With new installations of MailMarshal, you will notice that a number of TextCensor scripts already exist, some of which are used by the default rules. You can use the existing scripts, modify them to suit your requirements, or create new ones.

This article was previously published as:
NETIQKB29161
Marshal KB109

Last Modified 3/1/2020.
https://support.trustwave.com/kb/KnowledgebaseArticle10542.aspx