Unsubscribe mechanism

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

This article contains the following sections:

The work cycle of the Unsubscribe mechanism

The steps below along the diagram (Fig. 1.), show the work cycle of the Unsubscribe mechanism:

  1. The Unsubscribe mechanism is configured and enabled.
  2. One of the users in your company sends the outgoing email.
  3. CodeTwo Exchange Rules Pro inserts the {unsubscribe link} to the outgoing email while processing mail.
  4. The recipient receives the email with the {unsubscribe link} included. If the recipient decides to unsubscribe from your company's mailing list, he/she clicks the {unsubscribe link}.
  5. Information about unsubscribing from the mailing list is pushed to Unsubscribe service that processes this information and adds the recipient's email address to the blacklist.
  6. Exchange Rules Pro Service synchronizes the recent changes in the blacklists data from 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 doesn't reach the recipient's inbox.
ER Pro 2.x - Unsubscribe mechanism scheme big.
Fig. 1. The work cycle of the Unsubscribe mechanism.

Rules and services involved in the work cycle of the Unsubscribe mechanism

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

  1. The combination of two rules (Fig. 2.). Note that the ready-made combination of these rules can be quickly added using the predefined rules in the Administration Panel.
    Fig. 2. Combination of two rules triggering the Unsubscribe mechanism.
    The combination of rules includes:
    • The first rule that blocks the outgoing emails. This rule includes two Recipient conditions (Fig. 3.) configured in the following way: Recipient is external and Recipient belongs to the blacklist [name of the blacklist] and the Block message action (Fig. 4.). The conditions are bound with the default And logical relationship.
    Fig. 3. Two Recipient conditions bound with And logical relationship.
    Fig. 4. The Block message action.
    • The second rule that inserts the {unsubscribe link} to signatures in the outgoing mail. This rule includes one condition: Recipient is external (Fig. 5.), and the Insert disclaimer action with the {unsubscribe link} placeholder included (Fig. 6.).
    Fig. 5. Recipient is external condition.
    Fig. 6. 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 adjust the conditions in any way you want to apply the rules to the chosen users, groups, etc. only. For example, If you want only the particular users/departments to have the unsubscribe links included in their mail, you can insert additional condition to rules defining the senders of emails for whom the rules will apply.

  2. Unsubscribe service (unsubscribe.codetwo.com) provided by CodeTwo. Unsubscribe service is responsible for processing the actions of unsubscribing from mailing lists (after clicking the {unsubscribe link} placeholder) performed by the recipients of the messages and adding those recipients' email addresses to the blacklists. Furthermore, this service also stores the collection of blacklists along the recipients included in these lists.


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

  3. Exchange Rules Pro Service. Exchange Rules Pro Service synchronizes the recent changes in the blacklists from Unsubscribe service to trigger the Block message action.


    The communication and the synchronization of data between Unsubscribe service provided by CodeTwo (unsubscribe.codetwo.com) and Exchange Rules Pro Service is executed over the 8080 port. Please make sure that this port is opened for outgoing connections to enable the communication between the aforementioned services. If the port is not opened, you are likely to receive the following error message (Fig. 7.):

    ER Pro 2.x - Failed connection to Web Service.
    Fig. 7. The connection to Unsubscribe service cannot be established.


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

Managing the blacklists along the included recipients

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

  1. You already have Clients that no longer want to receive emails from your company. In such case, you create the blacklist and add those Clients' email addresses to the blacklist before sending mail with the {unsubscribe link} included.
  2. Some of your Clients, who have already unsubscribed from the mailing list, changed their mind and want to receive emails from your company anew. In such case, you remove the email addresses of your Clients from the blacklist.

To manage the Recipients blacklists, go to the Administration Panels' ribbon, open Settings and click the Recipients blacklists tab (Fig. 8.).

Fig. 8. The Recipients blacklists tab in Settings.

The window that opens comprises three sections:

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

See next

Example on how to configure the program to enable unsubscribing recipients from the mailing lists

Was this information useful?