Wildcard Characters
MailMarshal allows wildcard entries in the following contexts:- Local domains. See Running the Configuration Wizard.
- User and Group matching for policy groups and rules. See Understanding User Matching.
- Receiver HELO name matching. See Where sender’s HELO name is/is not criteria.
- The Console search and filtering options. See Using the MailMarshal Console for Email Management.
- BTM exclusions. See MailMarshal Properties – Advanced.
- Outbound TLS domains. See Securing Outbound Communications.
The table below gives some examples of results of the wildcard syntax.
Table 29: Wildcard example results
Note: The !, -, and ^ are special characters only if they are inside [ ] brackets. To be a negation operator, ! or ^ must be the first character within [ ].
Regular Expressions
MailMarshal uses regular expressions in header matching and rewriting rules. For more information about these rules, see Content Analysis Policy. MailMarshal also uses regular expressions in category scripts. For more information about category scripts, see the technical references “MailMarshal Anti-Spam Configuration” and “MailMarshal Advanced Anti-Spam Configuration,” available from the MailMarshal support page at LevelBlue.com. MailMarshal implements a full-featured regular expression syntax. Full documentation of this syntax is beyond the scope of this manual. For additional documentation and links to further information, see Knowledgebase article Q10520. This appendix provides limited information about some commonly used features and some extensions specific to MailMarshal.Note: MailMarshal also uses Regular Expressions in TextCensor scripts. This feature uses a different Regular Expression engine with very similar syntax to that described in this section. For more information and a link to detailed documentation, see Anchored Regular Expressions.
Shortcuts
The arrow to the right of each field on the Expressions tab of the header rule panel provides access to some commonly used Regular Expression features. Table 30: Regular Expression shortcutsReserved Characters
Some characters have special meanings within regular expressions.Operators
The following characters are reserved as regular expression operators:\
For example, to match marshal.com enter Marshal\.com
Wildcard Character .
The dot character (.) matches any single character.
Repeat Operators
A repeat is an expression that occurs an arbitrary number of times. The repeat operators are*, +, ?, and {}.
An expression followed by * can be present any number of times, including zero. An expression followed by + can be present any number of times, but must occur at least once. An expression followed by ? may occur zero times or once only. You can specify a precise range of repeated occurrences as a comma-separated pair of numbers within {}. For instance,
ba*will match b, ba, baaa, etc.ba+will match ba or baaaa for example but not b.ba?will match b or ba.ba{2,4}will match baa, baaa and baaaa.
Parentheses ( )
Parentheses serve two purposes:- To group items together into a sub-expression. You can apply repeat operators to sub-expressions in order to search for repeated text.
- To mark a sub-expression that generated a match, so it can be used later for substitution.
(ab)* would match all of the string
Alternatives
Alternatives occur when the expression can match either one sub-expression or another. In this case, each alternative is separated by a|. Each alternative is the largest possible previous sub-expression (this is the opposite to repetition operator behavior).
a(b|c)could match ab or acabc|defcould match abc or def
Examples
The following sections show examples of matching and substitution strings.Matching
The expression.ourcompany.com at the end of the field.
That is, it will match john@host.ourcompany.com and john.smith@host.subdomain.ourcompany.com but not peter@host.ourcompany.com.au