Conditions

CodeTwo Exchange Rules PRO processes messages based on the defined Conditions in rules. Conditions, which are configured and processed by the program independently for each rule, are criteria specified by the user that must be met by a message in order for the program to trigger a particular rule for this message and apply the corresponding action. If the message does not meet the conditions, no actions will be applied, and the message will reach the recipient intact.

Info

Please note that each condition type may also be defined as the exception to exclude messages from processing.

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

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

ExchangeRulesPRO-Conditions1
Fig. 1. Conditions tab with all available conditions.

The conditions are defined using four factors:

  • And/Or - enables definition of the 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 chosen 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 within the single rule (using And relationship) or the messages that meet at least one of the conditions (by using or relationship) (Fig. 2.).

ExchangeRulesPRO-Conditions2
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.)

ExchangeRulesPRO-Conditions3
Fig. 3. Grouping conditions within one single rule.

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 important as its proper use determines the execution of rules, which consequently are applying the defined actions. Please note that the particular relationship type always applies to the condition defined 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.)
ER Pro 2.x - Bare conditions.
Fig. 4. Conditions without grouping brackets.

In this situation, the rule will be applied for 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 mark@company.com sends message to John who belongs to Marketing group and has the email address john@company.com 
  2. Message is sent inside the organization, e.g. user Claire, who belongs to Management group and has an email address claire@company.com sends a message to Nicole, who belongs to the Technical Support group and has email address nicole@company.com.
  • Use of And/Or for conditions with grouping brackets (Fig. 5.)
ER Pro 2.x - Conditions grouped.
Fig. 5. Conditions with grouping brackets.

In this situation, the rule will be applied for 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 mark@company.com sends message to John who belongs to Marketing group and has the email address john@company.com.
  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 claire@company.com sends the message to Nicole who belongs to the Technical Support group and has email address nicole@company.com.

See next

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.

See also

Exceptions - this article describes the configuration of exceptions that exclude messages from being processed by the program.
Actions - this article provides information on actions that can be performed on messages using the program.

Was this information useful?