An email rule is applied more than once to the same message

Problem:

An email rule configured in CodeTwo software is executed twice or multiple times on a single message. As a result, users get two signatures instead of one or experience similar problems.

Solution:

This problem may occur in various cases. It's usually related to the configuration of your environment because all CodeTwo products feature internal mechanisms that prevent against processing the same message more than once.

Here are the most possible causes of such problems, ordered from the most common to those which happen rarely:

If you use an older version of CodeTwo software, see this article.

A single sender is affected by multiple email rules (rules' conditions are overlapping)

It may happen that one sender meets the conditions of multiple rules configured in CodeTwo software. This means that more than one rule can be executed for a single message. As a result, this user's emails might get duplicated signatures or might be subject to actions that should not apply.

The easiest method to resolve this issue is to set the following behavior for all email rules: If this rule is applied, stop processing next rules (Fig. 1.). However, this works only if each sender belongs to a single rule. If you want to use this solution, you need to double-check the conditions and exceptions of every email rule to ensure that they are not overlapping.

280-1
Fig. 1. The Stop processing next rules option in CodeTwo Email Signatures for Office 365 (top window) and in the Exchange Rules software family (bottom window).

If you prefer to have your CodeTwo software configured in such a way that one sender belongs to multiple rules, you should double-check these rules to make sure they are not overlapping where you do not want them to (for example, you might not want to include the same sender in the conditions of multiple signature rules).

Tip

If you are using software from the CodeTwo Exchange Rules family, you can use the Rules Tester to find possible conflicts. See the user's manual (Exchange Rules / Exchange Rules Pro) for more information.

A signature is already inserted by your email client

If you have configured a native signature in Outlook, Outlook on the web (Fig. 2.), or any other email client, you might encounter multiplicated signatures because they are added by both your email client and CodeTwo software. That's because CodeTwo software is not able to recognize if your email client's signature is already included in your message.

After you have deployed CodeTwo software, you should consider either disabling or removing client-side signatures from all user accounts. See our Knowledge Base articles for guidelines:

280-2
Fig. 2. A signature added directly (natively) in Outlook on the web (OWA).

In general, you can combine external mail processing software with CodeTwo products, but this needs to be done carefully to ensure that these applications do not overlap.

You are using a transport rule or another software that adds signatures

Users will also get double signatures if you have configured an Exchange transport rule which adds a signature or disclaimer to emails in your organization. Transport rules can be configured in Exchange admin center (or in Exchange Control Panel (ECP) if you use older versions of Exchange Server) in both on-premises and cloud environments.

Instead of using Exchange transport rules, you can recreate similar signature-adding actions in CodeTwo software. Our software also offers far more advanced options than the built-in Exchange features (see this page for a detailed comparison of CodeTwo software and Exchange transport rules). If you have configured the signatures/disclaimers in CodeTwo software, then you need to delete or disable the corresponding Exchange transport rule(s) to avoid multiplied signatures. To do that, follow these steps:

  1. Open Exchange admin center (EAC). In Exchange Online (Office 365), it's available under Admin centers > Exchange. The configuration is similar for on-premises Exchange Server.
  2. Go to mail flow > rules.
  3. Disable or remove the transport rule that adds your signature/disclaimer (Fig. 3.).

280-3
Fig. 3. An Exchange transport rule that adds a disclaimer.

Important

If for some reason you still prefer to use an Exchange transport rule to add a disclaimer, but this disclaimer is added several times, consult this article.

You have manually disabled the built-in mechanisms of CodeTwo software used to process messages only once

All CodeTwo applications have built-in mechanisms that prevent them from processing a single message several times. Read on to find out how these mechanisms work and how to restore them if you changed the default configuration.

CodeTwo Email Signatures for Office 365

The CodeTwo Email Signatures for Office 365 software forwards your messages to the CodeTwo Azure Email Service to add signatures. This is done using a set of Exchange Online connectors and a dedicated transport rule.

When a message travels through the CodeTwo Azure Email Service, a new header, X-CodeTwoProcessed, is added. In this way our service marks this message as processed. To avoid mail flow loops or duplicated signatures, the transport rule which controls the CodeTwo connectors applies only to messages that do not include the X-CodeTwoProcessed header.

You can verify if your mail flow configuration is correct by opening the CodeTwo Exchange transport rule in your Exchange admin center (in the EAC, go to mail flow > rules). There should be an exception added for this rule, and this exception should refer to the X-CodeTwoProcessed header (Fig. 4.).

280-4
Fig. 4. The header exception used in the CodeTwo Exchange transport rule to prevent against multiple processing of the same email message.

If you do not see the entry highlighted in Fig. 4., you can either add it back manually or reconfigure your connectors and transport rule automatically using our wizard, as explained in this article.

CodeTwo Exchange Rules / Exchange Rules Pro

As an on-premises Exchange environment usually consists of several Exchange servers, the CodeTwo Exchange Rules Transport Agent does not process a message if another instance of the software has already processed it - no matter on which server it happened. This is the default configuration. However, you can modify it by editing the config file available (by default) under the following path:

%ProgramData%\CodeTwo Exchange Rules\Config\Agent.xml

If you experience problems with doubled signatures or rules executed multiple times, make sure the following points are true (Fig. 5.):

  • The IgnoreAlreadyProcessedMessages value should be set to true. If this value is false, the software is allowed to process the same message again by the same instance of the Exchange Rules Transport Agent (this happens if a message comes back to the same Exchange server for some reason).
  • The IgnoreAlreadyProcessedMessagesInOrganization value should be set to true. When it's false, the software is allowed to process the same message again even if it has already been processed by another instance of the Exchange Rules Transport Agent (on another Exchange server).

280-5
Fig. 5. The entries responsible for multiple processing of the same message.