Unsubscribe mechanism

Following the email disclaimers international legislation to let your clients decide if they want to unsubscribe from a mailing list, CodeTwo Exchange Rules Pro provides the Unsubscribe mechanism. If this mechanism is configured and enabled, the program inserts the {unsubscribe link} placeholder to outgoing mail. Once such link is clicked by the recipient, this user's email address is added to a blacklist, preventing them from receiving any further emails from your company.

This article contains the following sections:

The flow of operations in the Unsubscribe mechanism

The flow chart below (Fig. 1.) illustrates how the Unsubscribe mechanism works:

  1. The Unsubscribe mechanism is configured and enabled.
  2. One of the users in your company sends an external email.
  3. CodeTwo Exchange Rules Pro processes the mail and inserts the {unsubscribe link} into the message.
  4. The recipient receives the email with the {unsubscribe link} included. If this recipient decides to unsubscribe from your company's mailing list, they click the {unsubscribe link}.
  5. Information about unsubscribing from the mailing list is pushed to the Unsubscribe service that processes this information and adds the recipient's email address to a blacklist.
  6. The Exchange Rules Pro Service synchronizes the recent changes in the blacklist data from the Unsubscribe service.
  7. One of the users in your company sends another outgoing email to the recipient whose email address has been added to the blacklist.
  8. The program blocks this message and it does not reach the recipient's inbox.
ER Pro 2.x - Unsubscribe mechanism scheme big.
Fig. 1. The flow chart of the Unsubscribe mechanism.

Rules and services involved in the Unsubscribe mechanism

The Unsubscribe mechanism uses the following rules and services to unsubscribe recipients from mailing lists:

  1. A dedicated combination of two rules (Fig. 2.) which can be quickly added in the Administration Panel.
    Fig. 2. A combination of two rules that trigger the Unsubscribe mechanism.
    This combination includes:
    • A rule that blocks outgoing emails. This rule includes two Recipient conditions (Fig. 3.) configured in the following way: Recipient is external and Recipient belongs to blacklist [name of the blacklist]. The conditions are bound with the default And logical relationship. The rule also contains the Block message action (Fig. 4.).
    Fig. 3. Two Recipient conditions bound with the And logical relationship.
    Fig. 4. The Block message action.
    • A second rule that inserts the {unsubscribe link} into signatures in outgoing mail. This rule includes one condition: Recipient is external (Fig. 5.), and contains the Insert disclaimer action with the {unsubscribe link} placeholder included (Fig. 6.).
    Fig. 5. The Recipient is external condition.
    Fig. 6. The Insert disclaimer action with the {unsubscribe link} placeholder included in the template.


    By default, the predefined Unsubscribe mechanism rules apply to all users in your company. However, you can modify the conditions if you want to apply the rules only to chosen users, groups, etc.

  2. The Unsubscribe service (unsubscribe.codetwo.com) provided by CodeTwo. This service performs the unsubscribing action: removes a recipient from a mailing list (if this person clicked the {unsubscribe link} placeholder) and adds their email address to a blacklist. The service also stores the collection of blacklists with the included recipients.


    Note that the Unsubscribe service is provided by CodeTwo, so you do not need to implement any other services on your own to use the unsubscribe mechanism.

  3. The Exchange Rules Pro Service which synchronizes recent changes in the blacklists from the Unsubscribe service and triggers the Block message action.


    The communication and synchronization of data between the Unsubscribe service provided by CodeTwo (unsubscribe.codetwo.com) and the Exchange Rules Pro Service is executed via the 8080 port. In order for this to work, please make sure that this port is open for outgoing connections. If the port is not open, you are likely to receive an error message (Fig. 7.).

    ER Pro 2.x - Failed connection to Web Service.
    Fig. 7. Error message displayed when connection to the Unsubscribe service cannot be established.


Using the Unsubscribe service provided by CodeTwo is safe as the communication between this service and the Exchange Rules Pro Service and your private data are protected via three independent technologies: AES encryption, SHA-1 cryptographic hash function and RSA key transport algorithm.

Management of blacklists and included recipients

During or after the configuration of the Unsubscribe mechanism, you can manage the blacklists and the recipients included in these lists from one central place located in the program's settings. The blacklist configuration window lets you manage both new and existing blacklists. The configuration of recipient blacklists may be used in two basic scenarios:

  1. You already have clients that no longer want to receive emails from your company. In such case, you create a blacklist and add those Clients' email addresses to this blacklist before sending them an email with the {unsubscribe link}.
  2. Some of your clients, who have already unsubscribed from your mailing list, change their minds and want to resume receiving emails from your company. In such case, you remove their email addresses from the blacklist.

To manage the Recipient blacklists, go to the Administration Panel, open Settings on the toolbar and navigate to the Recipients blacklists tab (Fig. 8.).

Fig. 8. The Recipients blacklists tab in Settings.

The tab comprises three sections:

  • Recipients blacklists - within this section you can manage (Add or Remove) your blacklists. Each blacklist is a container that includes a list of email addresses of the recipients who unsubscribed from your mailing lists.
  • Email addresses in this blacklist - this section lets you manage (Add/Remove/Edit) the email addresses (in the SMTP format) included in blacklists. Note that email addresses are automatically added to this field once a recipient of your email clicks the {unsubscribe link} in the message. If you want to add the email address of a particular recipient to a chosen blacklist before this person hits the link in the received mail, you can enter it here. In addition, you can either enter a full SMTP email address or use wildcards. When using wildcards, you can include the asterisk (*) in front of, after or inside an email address, e.g.: *@company.com, newsletter@*, newsletter@*.com.
  • Import / Export buttons - these two options let you import or export the existing blacklists and the included recipients into any other instance of the program, e.g. operating on a separate tenant within your organization.

See next

How to configure the program to enable unsubscribing recipients from mailing lists

Was this information useful?