The <DIRECTION></DIRECTION> message attribute enables you to match messages based on the direction of the message, in relation to the organization, without needing to specify the author or recipient details in the rule. Message direction can be internal to the organization, outbound from the organization or inbound to the organization.
One or more of the following values can be specified in the <DIRECTION></DIRECTION> message attribute:
INTERNAL="Y" means match the message if it is from an internal address to an internal address. The message must not include any external addresses in the recipient list.
OUTBOUND="Y" means match the message if it is from an internal address to an external address. The message must include at least one external address in the recipient list.
INBOUND="Y" means match the message if it is from an external address to an internal address. The message must include at least one internal address in the recipient list.
If the value is not specified, it defaults to "N". For any messages to match, at least one value must be set to "Y".
The following example rule will archive and set the retention category "Internal", on messages from one internal address to another internal address only. Note that a message from one internal address to another internal address that also has an external address in the recipient list will be treated as external:
<RULE NAME="Internal only" RETENTION="Internal" > <DIRECTION INTERNAL="Y" OUTBOUND="N" INBOUND="N"/> </RULE>
The following example rule will archive and set the retention category "External", on messages sent to or received from addresses outside the organization:
<RULE NAME="External" RETENTION="External" > <DIRECTION OUTBOUND="Y" INBOUND="Y"/> </RULE>
If you want only items that match the rules to be archived, the following example rule can be added to the end of the file as a "catch-all" rule:
<RULE NAME="Do not archive anything else" ACTION="MARK_DO_NOT_ARCHIVE"> <DIRECTION INBOUND="Y" OUTBOUND="Y" INTERNAL="Y"/> </RULE>
For each item that is evaluated using this example rule, one of the direction attributes will always have the value "Y". Therefore items that do not match any other rule in the file will match this rule. The associated action means that the matching items are not archived.