You can create more complex filters by specifying several values for AUTHOR or RECIPIENTS message attributes and using the operators, INCLUDES= and ALLOWOTHERS= to define how the attribute values are to be matched.
If the INCLUDES= operator is not specified, INCLUDES="ANY" is assumed.
If the ALLOWOTHERS= operator is not specified, ALLOWOTHERS="Y" is assumed.
In the following example, messages will match the rule if they have all three of the listed email addresses (INCLUDES="ALL"), and only these addresses (ALLOWOTHERS="N"), in the recipient list:
<RULE ... > <RECIPIENTS INCLUDES="ALL" ALLOWOTHERS="N"> <EA>john.doe@ourcompany.com</EA> <EA>ken.brookes@ourcompany.com</EA> <EA>len.scott@ourcompany.com</EA> </RECIPIENTS> </RULE>
In the next example, messages will match the rule if they have any of the listed email addresses (INCLUDES="ANY") but nothing else (ALLOWOTHERS="N"):
<RULE ... > <RECIPIENTS INCLUDES="ANY" ALLOWOTHERS="N"> <EA>john.doe@ourcompany.com</EA> <EA>ken.brookes@ourcompany.com</EA> <EA>len.scott@ourcompany.com</EA> </RECIPIENTS> </RULE>
In the next example, messages will match the rule if they do not include any of the listed email addresses in the recipient list (INCLUDES="NONE"). Matched messages can have other addresses in the recipient list (ALLOWOTHERS="Y"):
<RULE ... > <RECIPIENTS INCLUDES="NONE" ALLOWOTHERS="Y"> <EA>john.doe@ourcompany.com</EA> <EA>ken.brookes@ourcompany.com</EA> <EA>len.scott@ourcompany.com</EA> </RECIPIENTS> </RULE>
If you want to specify both positive and negative matches within a single rule, you can have multiple message attribute entries and use INCLUDES="NONE" or INCLUDES="ALL", as appropriate. For example:
<RULE ... > <RECIPIENTS INCLUDES="NONE"> <EA>john.doe@ourcompany.com</EA> <EA>len.scott@ourcompany.com</EA> </RECIPIENTS> <RECIPIENTS> INCLUDES="ALL"> <EA>Ken.Brookes@ourcompany.com</EA> <EA>robert.hill@ourcompany.com</EA> </RECIPIENTS> </RULE>
In the above example, messages will match if they do not include john.doe@ourcompany.com or len.scott@ourcompany.com in the recipient list:
<RECIPIENTS INCLUDES="NONE" ...</RECIPIENTS>
but do include both ken.brookes@ourcompany.com and robert.hill@ourcompany.com
<RECIPIENTS INCLUDES="ALL" ... </RECIPIENTS>
By using different combinations of INCLUDES= and ALLOWOTHERS= values, you can set fairly complex filters.
Table: Effect of using different operator value combinations shows filter results for different messages when different combinations of values are set for the operators, INCLUDES= and ALLOWOTHERS=, in the following example filter:
<RULE ... ACTION="ARCHIVE_ITEM"> <RECIPIENTS INCLUDES="NONE|ANY|ALL" ALLOWOTHERS="N|Y"> <EA>Ann@example.com</EA> <EA>Bill@example.com</EA> </RECIPIENTS> </RULE>
Ann@example.com and Bill@example.com are the recipient addresses to match.
Table: Effect of using different operator value combinations
In the table, the main column headings show the recipients in five different test messages. (For brevity, the recipients are called Ann, Bill, and Colin in the column headings.)
The first column shows different combinations of values set for the INCLUDES= and ALLOWOTHERS= operators.
"no match" means that, if the operator combination shown in the left column is set, a message sent to the recipients shown in the column heading would not satisfy the filter rule and would not be archived (that is, the rule action is not applied).
"match" means that, if the operator combination shown in the left column is set, a message sent to the recipients shown in the column heading would satisfy the filter rule and be archived.
Figure: Msg 1 with INCLUDES="NONE" and ALLOWOTHERS="N" and Figure: Msg 1 with INCLUDES="ANY" and ALLOWOTHERS="Y" illustrate what happens in two of the scenarios in Table: Effect of using different operator value combinations.