Return Home
Overview
<attach>
<body>
<body>
<clientip>
<comment>
<configuration>
<copy>
<delay>
<dnslookup>
<domainquery>
<email>
<expression>
<expressions>
<file>
<filter>
<filters>
<header>
<header>
<helo>
<http>
<imap>
<index>
<inputpath>
<ipquery>
<log>
<mailfrom>
<maxbuffer>
<maxlines>
<message>
<modifysource>
<multiplerecipients>
<option>
<parser>
<path>
<quickresult>
<rcptto>
<result>
<results>
<return>
<rule>
<rules>
<scope>
<select>
<smtpextendedstatuscode>
<smtpstatuscode>
<target_filter>
<target_index>
<test>
<title>
Boolean type
Macros
Regular Expressions
Node: expressions
<expressions collection="original" logic="or" oninit="[script]">
[expression1]
[expression2]
.
.
.
[expressionN]
</expressions>
Declares a group of expressions that will be tested against each line of the email. The testing that occurs will ultimately create a true or false condition where a true condition will cause the result declared in this rule to be performed.
Different variations of the email text are available for testing. Use the collection attribute to specify the default variations the expressions defined within this node will use. If none is specified, original is used.
The group is evaluated according to the logic attribute specified. or, and and min refer to the collection as a whole: or will cause the return of a true condition if any one or more expressions are evaluated as true; and will cause the return of a true condition if all of the expressions are evaluated as true. min defines a specific minimum number of expressions that must evaluate as true.
Alternately, a more complex and flexible method can be used. The [expression] option defines a script that utilizes the results of similar defined scripts associated with each individual expression in this group. You are able to create and manipulate variables with a persistent value in an expression script and modify the value on each occurrence of a match with an expression. For example, you could define expressions that increment a variable by different amounts. The logic script expression would be a simple test to see if that variable has exceeded a threshold, such as "return score > 20.5" The script defined in the logic attribute is evaluate as true (non-zero) or false (zero).
The oninit script is executed to initialize any variables you use in scripts defined with expressions.
See the scripting functions for more information.
The or, and and min options exist only for backward compatibility with earlier versions of the filter. Internally, or becomes "return _match_count >= 1", and becomes "return _unique_match_count == _expression_count", and min becomes "return (_match_count >= minvalue) && (_unique_match_count >= minuniquevalue)"
Attributes:
collection
original base64 is decoded, all entity codes (like """) are decoded
text original, and all <html> tags are removed
text_stripped text, and all punctuation is removed
text_packed text, and all punctuation and whitespace is removed
packed original, and all punctuation and whitespace is removed
htmltags only <html> tags, everything else removed
stripped original, and all punctuation is removed
logic
or
and
min
minunique
[script]
oninit
[script]
Future Enhancements:
- Add filter-defined variables _match_count, _unique_match_count, _expression_count, _line, _level, _line_type, _line_cr_count, _line_lf_count
- Allow reference to variables from other rules.
Revision History:
- collection attribute requires v2.3.0 or higher