Conditions

CodeTwo Exchange Rules Pro processes messages according to the conditions defined within rules. Conditions, which are configured and processed by the program independently for each rule, are user-specified criteria that must be met by a message in order for the program to trigger a particular rule assigned to this message and apply a 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 an exception to exclude messages from processing.

Below you will find the range of conditions that can be defined in CodeTwo Exchange Rules Pro. Click the links below to learn more about the selected conditions:

The conditions are specified by the user on 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 - defines the logical relationships between individual conditions.
  • Field - allows a user to choose the type of condition.
  • Operator - this field depends on the chosen condition type and defines how the condition will be executed. The execution method may only be set to true.
  • Value - this field depends on a chosen condition type and defines the actual or expected value of the condition. This value will trigger the assigned rule to apply the action.

You can configure one or several conditions within a single rule (by adding them via the Add (+) button). Also, you can define if the rule should be applied only to messages that meet all of the specified conditions (by using the And relationship) or to messages that meet at least one of the conditions (by using the Or relationship) (Fig. 2.).

ExchangeRulesPRO-Conditions2
Fig. 2. Conditions bound with And/Or relationships.

Info

You may remove conditions via the Remove (Exchange Rules Pro remove button 11px) button at any point.

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

ExchangeRulesPRO-Conditions3
Fig. 3. Grouping of conditions within a single rule.

Warning

If you leave the list of conditions empty then the rule, when activated, will apply to all messages processed by the server. The program will remind you about this fact and ask you to confirm when you save your rule via the Submit changes (ESIG for O365 rule save) button.

Once configured, the program will process messages and apply rules if all conditions are met (i.e. when the conditions are bound with the And logical relationship which is proposed by the program by default) or if at least one of the conditions is met (only when you connect the conditions via the Or relationship).

Info

The logical relationships between the defined conditions are shown at the bottom of the window in the status area and explain how the conditions will be executed.

The way you use And/Or relationships is highly important as it determines the execution of rules and the resulting actions. Please note that a particular relationship type always applies to the condition defined in the line 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 the following two 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 the Developers group and has an email address "mark@company.com" sends a message to John who belongs to the Marketing group and has an email address "john@company.com". 
  2. Message is sent inside the organization, e.g. user Claire, who belongs to the Management group and has an email address "claire@company.com" sends a message to Nicole, who belongs to the Technical Support group and has an 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 the following two 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 the Developers group and has an email address "mark@company.com" sends message to John who belongs to the Marketing group and has an 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 an email address "claire@company.com" sends a message to Nicole who belongs to the Technical Support group and has an email address "nicole@company.com".

See next

Grouping conditions - this article describes how to group conditions and create logical And/Or relationships between groups or between individual conditions within 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 by the program on messages.

Was this information useful?