Configuring Exchange Online connectors
If you use CodeTwo Email Signatures 365 in cloud (server-side) or combo mode, you need to create Exchange Online connectors and transport rule. Creating an outbound and inbound Exchange Online connector for your Microsoft 365 tenant is required so that emails sent by your organization can be routed through CodeTwo cloud service. Additionally, an Exchange Online transport rule needs to be configured for the outbound connector to specify the scope of senders whose emails will be processed by CodeTwo. Our service checks such emails against the signature rules you created and adds the right signature.
Important
- You can configure connectors when registering your tenant to CodeTwo or later, by accessing your tenant's settings in CodeTwo Admin Panel, as shown in Fig. 1. But keep in mind that email signatures will not be added by CodeTwo cloud service until the connectors are configured correctly.
- If you use CodeTwo Email Signatures 365 in Outlook (client-side) mode, no Exchange Online connectors configuration is required, as your emails will not be routed through CodeTwo services to get signatures. You need to deploy a dedicated Outlook add-in instead.
- If you plan on using only the Autoresponder feature in CodeTwo Email Signatures 365, you also need to configure the connectors, as the CodeTwo services take part in sending automatic replies.
- If you use smart host (mail relay) services in your organization (e.g. Barracuda, Proofpoint, Mimecast, Reflexione, and similar), additional configuration might be required. See this article for details
You can configure Exchange Online connectors automatically or manually. Watch our step-by-step video guide or see detailed instructions below.
If you want to remove the existing connectors, see the article on uninstalling CodeTwo Email Signatures 365.
Automatic configuration of Exchange Online connectors
You can configure Exchange Online connectors automatically in CodeTwo Admin Panel. On the Tenants page, select your Microsoft 365 tenant, and then select Exchange Online connectors from the left menu (Fig. 1.). Click Configure connectors automatically.
Fig. 1. Exchange Online connectors configuration settings.
The connectors configuration wizard starts (Fig. 2.) - it will help you create Exchange Online connectors and transport rule in your tenant. Click Next to begin.
Fig. 2. Exchange Online connectors configuration wizard.
Click Next to start the configuration. In the Connectors step, you will be provided with a temporary authorization code needed to associate our service with tenant (Fig. 3.). Copy the code by using the button and click Authorize. This will open a Microsoft sign-in page in a new tab. Paste the copied code in the space provided and click Next. Then, sign-in to your Microsoft 365 tenant by providing global admin credentials. Once you have successfully signed in, the Microsoft sign-in page will close automatically.
Fig. 3. Authorization code in the configuration wizard.
Important
Your credentials are not stored with any CodeTwo service. If necessary, you can skip the connectors' configuration via the wizard and set them up manually in your Microsoft 365. However, we strongly advise against manual configuration of connectors.
Back in the configuration wizard, proceed to the next step – Users (Fig. 4.). Here, you need to specify the scope of senders whose emails will be routed through the CodeTwo cloud service to get signatures.
Every sender whose emails go through our service uses one license from your license pool, no matter if this user is defined in any signature rule. That is why you should pay special attention when defining the scope of senders. Learn more about license counting.
You can select all AD users or (to avoid excessive usage of licenses) you can limit the scope of senders to members of a particular group in your Microsoft 365 (a distribution list, Microsoft 365 group, or mail-enabled security group; groups hidden from your address book are also available). You also need to decide if you want to apply signatures to emails sent within your organization.
Fig. 4. Configuring the scope of senders.
Note that any changes in your Active Directory might take some time (up to several hours) to propagate and synchronize with CodeTwo services:
- If you have just created a new group, it may not be available in the group picker (Fig. 4.) right away.
- Any future changes you make to the group selected in the wizard also need time for propagation. For example, if you add new users to this group, they might not get signatures right away. Learn more
If you select a group that has other groups nested inside, emails sent by members of the nested groups will also travel through the CodeTwo service.
Tip
A good idea is to create a separate group for all users and shared mailboxes that may require email signatures. Such a solution lets you avoid excessive usage of licenses. If you want to add more than one group, you need to edit the transport rule and add another group manually.
If you wish to further customize the range of users whose emails will be stamped with signatures, you can do that by creating signature rules.
Click Next proceed to the Deployment step. The configuration of Exchange Online connectors will start automatically. When the deployment is complete (Fig. 5.), click Finish.
Fig. 5. Successful configuration of connectors.
Info
It can take from a few minutes to more than an hour for the changes in the connectors' configuration to propagate. Email signatures created in the program might not be added to messages sent from your tenant during that time.
If you configured the program to process messages sent to a particular group, every change made to this group (such as adding new users) also requires time to propagate in your Microsoft 365. Learn more
Once the connectors are set up, you can start managing your signature rules. Read this article for guidelines.
If you use smart host (mail relay) services in your organization, additional configuration might be required. See this article for details.
Manual configuration of Exchange Online connectors
You can also configure Exchange Online connectors manually in the Exchange admin center of your Microsoft 365 tenant.
Alternatively, if you prefer doing things with PowerShell, you can manually configure the connectors by following the instructions from this Knowledge Base article.
Important
CodeTwo strongly recommends that you use the connectors configuration wizard instead of manually setting up connectors to avoid mistakes and unsupported customizations. Manual configuration might be useful only if you have any problems with automatic connectors configuration or need to use non-standard (not available in the configuration wizard) settings.
To configure the connectors manually, follow the steps below.
- Access the mail flow configuration pages in the Exchange admin center.
- Configure the inbound connector for CodeTwo Email Signatures 365.
- Configure the outbound connector for the program.
- Configure the transport rule for the outbound connector.
Opening mail flow configuration in the Exchange admin center
The manual configuration procedure is described in detail in the sections below. In a nutshell, you will need to add two connectors and a transport rule (mail flow rule):
- The outbound connector will forward your emails to the service. Learn how to configure the outbound connector
- The inbound connector will accept processed emails coming from the CodeTwo service. Learn how to configure the inbound connector
- The transport rule will be responsible for filtering emails to be processed by the CodeTwo service. The rule also helps to avoid processing loops and signature duplicates. Learn how to configure the transport rule
All the steps required for manual configuration are performed in the Exchange admin center. To access it, sign in to the Microsoft 365 admin center and expand the menu on the left by clicking Show all. Then, click Exchange in the Admin centers section (Fig. 6.). You can also access the Exchange admin center directly by clicking this link.
Fig. 6. Accessing the Exchange admin center from the Microsoft 365 admin center.
Configuration of the outbound connector
In the Exchange admin center, go to Mail flow > Connectors. Click Add a connector to create a new connector (Fig. 7.).
Fig. 7. Adding a new connector.
In the new pane that opens, select:
- Connection from > Office 365
- Connection to > Your organization's email server
as shown in Fig. 8. Click Next to continue.
Fig. 8. Mail flow scenario configuration for the outbound connector.
In the next step of the wizard, enter the following name: CodeTwo Outbound Connector and make sure that the Turn it on and Retain internal Exchange email headers (recommended) checkboxes are both enabled (selected), as shown in Fig. 9. Click Next to continue.
Important
Make sure that you name your connector exactly the same as indicated above to avoid any configuration issues in the future, for example if you decide to reconfigure connectors automatically using the wizard.
Fig. 9. Naming and enabling the outbound connector.
In the next step, choose the second option (Only when I have a transport rule set up that redirects messages to this connector), as shown in Fig. 10. Proceed to the next step.
Fig. 10. Selecting when the outbound connector is going to be used.
In the Routing step, add the following CodeTwo smart host address (Fig. 11.):
[your unique subdomain name].smtp.codetwo.online
Info
In order to get [your unique subdomain name], go to CodeTwo Admin Panel, access the Exchange Online connectors page in the Manage tenant section of your tenant, and use the link displayed in the I manage my connectors manually section. This link opens the same article you are reading right now, but the box above will instead display your unique subdomain name.
For other ways to find the CodeTwo domain, see this article.
Click the Add (+) button and then click Next to continue configuring the connector.
Fig. 11. Routing configuration for the outbound connector.
In the Security restrictions step, configure the options as shown in Fig. 12. and make sure that you provide this address:
*.codetwo.com
as the domain name on the certificate. Proceed to the Validation email step by clicking Next.
Fig. 12. Configuring security restrictions for the outbound connector.
You have to validate the outbound connector (Fig. 13.) by typing any external (not hosted in Microsoft 365) email address and clicking the Add (+) button. After adding the email address, click Validate and - after successful validation - click Next to continue.
Fig. 13. Validation of the outbound connector.
Warning
If you are not able to validate your connectors and you get the following (or similar) error:
401 4.5.4 Invalid arguments - possible version mismatch [VE1EUR01FT009.eop-EUR01.prod.protection.outlook.com]
then you might be experiencing a recent Microsoft 365 health issue. This problem is not related to our software.
In the Review connector step, click Create connector to finish the configuration. When the connector is created click Done.
Configuration of the inbound connector
Next, create an inbound connector. Click the Add a connector button (as shown in Fig. 7.). In the new pane that opens, select Connection from > Your organization's email server. The Connection to selection is made automatically (as shown in Fig. 14.). Click Next to continue.
Fig. 14. Mail flow scenario configuration for the inbound connector.
In the next step of the wizard, enter the following name: CodeTwo Inbound Connector 2.0 and make sure that the Turn it on and Retain internal Exchange email headers (recommended) checkboxes are both enabled (selected), as shown in Fig. 15. Click Next to continue.
Important
Make sure that you name your connector exactly the same as indicated above to avoid any configuration issues in the future, for example if you decide to reconfigure connectors automatically using the wizard.
Fig. 15. Naming and enabling the inbound connector.
On the Authenticating sent email page, select the first option (By verifying that the subject name...) and provide the domain name as follows (Fig. 16.):
[your unique subdomain name].smtp.codetwo.online
Info
In order to get [your unique subdomain name], go to CodeTwo Admin Panel, access the Exchange Online connectors page in the Manage tenant section of your tenant, and use the link displayed in the I manage my connectors manually section. This link opens the same article you are reading right now, but the box above will instead display your unique subdomain name.
For other ways to find the CodeTwo domain, see this article.
Fig. 16. Email authentication method configuration.
Click Next to proceed to the Review connector step and then click Create connector to finish the configuration. When the connector is created, click Done.
Configuration of the CodeTwo Exchange transport rule
Once you're done configuring the connectors, you need to create a new transport rule (mail flow rule) that will specify senders whose emails will be processed by the CodeTwo service.
Every sender selected in this step will use one license from your signature license pool, no matter if the sender is defined in any signature rule. That is why you should pay special attention to properly define the scope of senders in the transport rule.
This configuration corresponds to the Senders scope step of the automatic configuration of Exchange Online connectors (described earlier in this article). You can specify the following scopes of senders:
- all of your Active Directory users,
- only selected users or users belonging to a specific group or groups,
- all or selected AD users but excluding internal messages.
Configuration of the transport rule for all AD users
To add and configure a new transport rule for all AD users (including emails sent internally in your organization), open the Exchange admin center and go to Mail flow > Rules. Use the Add a rule button and select Create a new rule from the drop-down list (Fig. 17.).
Fig. 17. Adding a new transport rule for the program's outbound connector.
Configure the rule in the following way:
In the Set rule conditions step:
- Type the following name: CodeTwo Exchange transport rule
- In the Apply this rule if section, add the following condition: The sender > is external/internal. Select Inside the organization as sender location.
- In the Do the following section, add the following action: Redirect the message to > the following connector > CodeTwo Outbound Connector
- In the Except if section, add the following three exceptions (click + to add another exception):
- The sender > address matches any of these text patterns. Enter the following phrase: <>
- The message properties > include the message type. Select the following message type: Calendaring
- The message headers > matches these text patterns. Enter the following header name:
X-CodeTwoProcessed and enter the following text pattern: true
Click Next to proceed to the Set rule settings step. Leave the default settings for all options except:
- the Defer the message if rule processing doesn't complete checkbox must be enabled (selected),
- in the Match sender address in message section, select Header or envelope
Review your settings – compare them with Fig. 18. and make sure your rule looks exactly the same at this point. If it does, click Finish to create the new transport rule and then click Done to close the rule creation wizard.
Fig. 18. The correct configuration of the CodeTwo Exchange transport rule for all users.
On the Rules page, use the Move up button to place the CodeTwo Exchange transport rule at the top of the rules list, as shown in Fig. 19., item 1 (you can also edit the rule's settings and set its priority to 0). Finally, click the rule and use the toggle to enable the rule (Fig. 19., item 2).
Fig. 19. Placing the CodeTwo Exchange transport rule at the top of the rules list and enabling it.
Important
In the above configuration, emails of all of your users will be routed through the CodeTwo service to receive signatures. This might lead to excessive usage of licenses (learn more).
The created transport rule is applied to both outgoing and internal messages. If you do not want to add signatures to emails sent between the users inside your tenant, you need to specify an additional condition, as described in this section.
Configuration of the transport rule for selected users or groups
If you want to add a transport rule that limits your users to a particular group in your Microsoft 365, start with configuring a transport rule for all users, as described earlier in this article. The only difference is that in the Apply this rule if section you need to add another condition (by clicking the + button): you can select individual senders (The sender > is this person) or groups (The sender > is a member of this group) from the drop-down menu. An example of changing the scope of senders to a distribution group (Sales) is shown in Fig. 20.
Fig. 20. Limiting the scope of senders.
The transport rule will be applied to both outgoing and internal messages sent by the users and/or members of the group(s) you specified. Note that if the group you selected has other groups nested inside, emails sent by members of the nested groups will also travel through the CodeTwo service.
If you need guidelines on how to add multiple groups or if some of your groups are not displayed in the group picker (for example, Microsoft 365 groups are never shown on the list), see our Knowledge Base article.
If you do not want to add signatures to emails sent between the users inside your tenant, you need to add and configure another condition, as described in the next section.
Configuration of the transport rule to exclude internal emails
If you would like to stop adding signatures to your internal correspondence, you need to modify your transport rule by adding an extra condition in the Apply this rule if section. Click the + button, select The recipient > is external/internal and select Outside the organization as recipient location. The condition should appear as shown in Fig. 21.
Fig. 21. Additional condition to exclude internal correspondence.