The INCLUDES and ALLOWOTHERS operators

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.

INCLUDES= can have the following values:

If the INCLUDES= operator is not specified, INCLUDES="ANY" is assumed.

ALLOWOTHERS= can have the following values:

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

Operator values set

Msg 1: recipient is Ann

Msg 2: recipients are Ann & Bill

Msg 3: recipients are Ann, Bill & Colin

Msg 4: recipients are Bill & Colin

Msg 5: recipient is Colin

INCLUDES="NONE" + ALLOWOTHERS="Y"

no match

no match

no match

no match

match

INCLUDES="NONE "+ ALLOWOTHERS="N"

no match

no match

no match

no match

no match

INCLUDES="ANY "+ ALLOWOTHERS="Y"

match

match

match

match

no match

INCLUDES="ANY" + ALLOWOTHERS="N"

match

match

no match

no match

no match

INCLUDES="ALL" + ALLOWOTHERS="Y"

no match

match

match

no match

no match

INCLUDES="ALL" + ALLOWOTHERS="N"

no match

match

no match

no match

no match

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.

Figure: Msg 1 with INCLUDES="NONE" and ALLOWOTHERS="N"

Msg 1 with INCLUDES="NONE" and ALLOWOTHERS="N"

Figure: Msg 1 with INCLUDES="ANY" and ALLOWOTHERS="Y"

Msg 1 with INCLUDES="ANY" and ALLOWOTHERS="Y"