Conditions

CodeTwo Exchange Rules processes messages based on the specified conditions. Conditions are criteria specified by the user that must be met by a message in order for this message to be processed by a given rule and for the rule action to be triggered. If the message does not meet the conditions, it will be rejected, and the rule's actions will not be initiated.

Info

Please note that each condition may be also defined to exclude messages by using exceptions.

The conditions are specified by the user in the Conditions tab separately for each rule (Fig. 1.).

Conditions tab with all available conditions.
Fig. 1. Conditions tab with all available conditions.

The conditions are defined using four factors:

  • And / Or - enables definition of a logical relationship between conditions.
  • Field - here you can choose the type of condition.
  • Operator - this field depends on the chosen condition type and enables the definition of how the condition will be executed. The execution method may be only set to true.
  • Value - this field depends on the selected condition type. Here you may define the actual, expected value of a particular condition that will trigger the rule to apply the action.

You can configure one or several conditions within a single rule (by adding them via + button). Also, you can set the rule to accept only the messages that meet all conditions specified in a single rule (using And relationship) or the messages that meet at least one of the conditions (by using or relationship) (Fig. 2.).

Conditions bound with And / Or relationship.
Fig. 2. Conditions bound with And / Or relationship.

Info

You may remove conditions via the x button at any point.

Furthermore, you may also group and nest the conditions via ER Pro 2.x - conditions grouping button button to make more complex arrangements if necessary (Fig. 3.).

Grouping conditions within one single rule.
Fig. 3. Grouping conditions within one single rule.

Learn more about grouping conditions

Warning

If you leave the list of Conditions empty, the rule, when activated, will apply to all messages processed by the server. What is more, you will be always asked for confirmation.

Once configured, the program will process messages and apply the rules if all conditions are met (there is logical And relationship between the conditions which is inserted by default while adding new conditions to the existing ones) or apply the rules if at least one of the conditions is met (only if you change And to Or relationship type between the conditions).

Info

The logical relationship between the defined conditions is shown at the bottom of the window in the status area and explains how the conditions will be executed.

The way you use And / Or relationship is highly significant as its proper use determines the execution of rules yet applying the defined actions. Please note that the particular relationship type always refers to the condition specified above. The same situation applies to the conditions grouped in brackets. Take a look at the two examples of using And / Or for conditions with and without grouping brackets:

  • Use of And / Or for conditions without grouping brackets (Fig. 4.)

Conditions without grouping brackets.
Fig. 4. Conditions without grouping brackets.

In this situation, the rule will be applied in both below-mentioned scenarios:

  1. The Sender's email address matches the @company.com domain and the Recipient belongs to the Marketing group, e.g. user Mark who belongs to Developers' group and has the email address [email protected] sends message to John who belongs to Marketing group and has the email address [email protected]
  2. Message is sent inside the organization, e.g. user Claire, who belongs to Management group and has an email address [email protected] sends a message to Nicole, who belongs to the Technical Support group and has email address [email protected].
  • Use of And / Or for conditions with grouping brackets (Fig. 5.)

Conditions with grouping brackets.
Fig. 5. Conditions with grouping brackets.

In this situation, the rule will be applied in both below-mentioned scenarios:

  1. The Sender's email address matches the @company.com domain and the Recipient belongs to the Marketing group, e.g. user Mark who belongs to Developers' group and has the email address [email protected] sends message to John who belongs to Marketing group and has the email address [email protected].
  2. The Sender's email address matches the @company.com domain and the message is sent inside the organization, e.g. user Claire who has the email address [email protected] sends message to Nicole who belongs to the Technical Support group and has email address [email protected].

Below you will find the range of conditions that are possible to define in CodeTwo Exchange Rules. Click the links below to learn more about the selected conditions:

See also

Grouping conditions - this article describes how to group conditions and create the logical And / Or relationship between the groups, and individual conditions included in groups.
Exceptions - this article describes the configuration of exceptions that exclude messages from being processed by the program.

In this article

Was this information useful?