Knowledge Base

How to optimize the message processing speed in CodeTwo Exchange Rules software family


You would like to optimize the mail processing speed in CodeTwo Exchange Rules / CodeTwo Exchange Rules Pro.


CodeTwo Exchange Rules and CodeTwo Exchange Rules Pro are advanced mail management software. The program allows you to create multiple email rules. Each of this rules can have several conditions and exceptions that trigger or suppress it. Due to this significant amount of options, it is important to create rules efficiently. In large organizations (processing dozens of emails every minute, or more), having too many active rules with complex rule triggering schemes can result in prolonged message delivery times. By following the guidelines below, you can avoid unnecessary load on both the CodeTwo software and your Exchange server.

Make sure you only have as many active rules as you need

Do not configure the program in such a way that every email is checked against all of your rules. If a message triggers a rule and does not activate any other rules, it is a waste of time and processing power to have CodeTwo software check all consecutive (but now redundant) rules too. Try setting the option to stop processing next rules (after a rule is applied) wherever it is possible (Fig. 1.).

Fig. 1. The Options tab includes the option to stop processing next rules once a rule is applied.

Avoid using too many AD Groups when defining the scopes of senders/recipients

Avoid adding too many Active Directory Groups when defining thescopes of senders or recipients for your rules. If possible, try substituting the groups with something else entirely, e.g. an Active Directory Field Filter (Fig. 2.). Due to how Exchange Server processes emails, a membership to a group needs to be checked for every single user and every group defined in your rule separately. So, if you have a rule that checks 10 different AD groups for a single user, all those groups will need to be thoroughly searched for that person, one after the other. Now, imagine a hundred emails triggering that rule within a minute, from a hundred different users. That is 10 groups to be searched for 100 users 100 times - all within one minute! Using an Active Directory Filter is a much more efficient way to trigger rules based on the users' affiliation to AD groups.

Fig. 2. An AD filter used to check your users' membership in the Marketing group.

Avoid redundant entries in the scopes of senders/recipients

Make sure that the senders or recipients defined for your rules do not contain redundant entries. For example, there is no point in adding several email addresses and then specifying that these addresses should be internal or external (Fig. 4.) because the rule will apply to the specified addresses only, no matter if they are internal or external. In this case, defining specific email addresses is enough, so that the program does not have to additionally check if an address exists in your local AD or not.

Fig. 4. The highlighted entries are redundant (not necessary).

Avoid identical active rules

It is best to avoid multiple rules that are almost identical, the only difference being a single AD attribute placeholder in the signature. Sometimes you need to configure a signature for all people in your environment, but let's say that three of them need one additional line (filled with their AD attribute data) in their signature. Achieving this purpose by creating two separate similar rules is not recommended. It is much better to merge these similar rules into one, and use the {RT} tags to remove the attribute line for the users who do not have this attribute in Active Directory (Fig. 3.).

Fig. 3. Having two separate rules with almost identical signatures is not recommended (upper picture). RT tags can be used to create one universal signature (lower picture).

Avoid unnecessary rule processing

Ensure that your rules are created a way in which messages that do not fit any of your rules do not have to go through all of them.

Example: All your rules are defined to perform actions on outgoing messages only. In such scenario, there is no point to process incoming messages - if every incoming email is checked by the software against all of your rules, this occupies your server (if you have signatures with AD attributes, this also creates unnecessary traffic between your machine and Active Directory.) It is highly recommended to exclude such messages from processing. To do this, follow the steps below:

  1. Create a new rule and move it to the top of the rules list (Fig. 4.).

Fig. 4. A new rule that stops the processing of the next rules if a message is incoming.

  1. Configure the rule's conditions to match only the incoming messages (Fig. 5.).

Fig. 5. The Conditions tab configured to match incoming messages only.

  1. Leave the Exceptions and Actions tabs empty.

  2. On the Options tab, set the program to stop processing next rules if the current rule is applied, as shown in Fig. 1. earlier in this article.

Was this information useful?