Scenario
If you use Exclaimer in a hybrid environment with centralized mail flow, you may find that emails do not route as expected, and either of the following scenarios occurs:
- Emails route out to the internet instead of using the hybrid connector after being routed back from Exclaimer.
- Emails do not route to Exclaimer to have signatures applied; instead, they are routed to On-Premises.
What is centralized mail transport?
"With centralized mail transport, you can route all mail from mailboxes in the Exchange Online organization through the on-premises organization before they're delivered to the Internet. In the same way, incoming Internet messages will be routed to an on-premises organization before being delivered to any Exchange Online recipient."
Quote from Microsoft - Transport options in Exchange hybrid deployments
Resolution
Microsoft 365 Global Administrator credentials
Currently, the hybrid send connector is set to apply to all messages at the connector level, and commonly appears similar to the following connector:
The objective of this solution is to modify the connector set up so that it uses a Transport Rule with a lower priority than the Exclaimer Transport Rule, therefore, ensuring that signatures are applied before messages are routed On-Premises.
Please follow the steps below to reconfigure the hybrid send connector:
- Sign in to the Exchange Online admin portal (https://admin.exchange.microsoft.com) as an Administrator.
The Exchange admin center is displayed.
- From the left-hand navigation menu, select Mail flow, then select Connectors.
- Reconfigure the hybrid send connector to apply Only when I have a transport rule set up that redirects messages to this connector.
Example:
- Leave all other connector settings as they are and save the connector.
- In the Exchange admin center, under Mail flow, select Rules.
- Click Add a rule (+ plus button), then select Create a new rule.
- Give the rule a name - for example: Send on-premise.
Example:
- In Apply this rule if, select The sender. In the adjacent box, select is external/internal. In The Sender is located, select InOrganization.
- Click Save.
This will ensure that all emails sent from your Microsoft 365 tenancy are routed through the connector.
Example:
Now, add an action that states Redirect messages to the following connector and select your Hybrid Send Connector.
- In Do the following, select Redirect the messages to. In the adjacent box, select the following connector. In select connector, select Select your hybrid connector.
- Click Save.
Example:
- Click + to add an action.
- In Add, select Modify the message properties. In the adjacent box, select set a message header.
- Click Enter text and set the message header to something, like 'x-sentonpremise' and set Value to 'True'.
- Click Save.
Example:
Now, add an exception for 'A Message Header' that 'Matches these text patterns' and set that rule to also be for the text 'x-sentonpremise' and Value to 'True'.
- In Except if, select The message headers.... In the adjacent box, select matches these text patterns.
- Click Enter text and set the message header to something, like 'x-sentonpremise' and set Value to 'True'.
- Click Save.
Example:
This combination of adding the header and setting it as an exception means that if the mail is returned to your Microsoft 365, it will not be redirected to the connector again, preventing mail loops.
- Click Next to set the settings for the new transport rule.
- As required, fill in the options and click Next.
- Review and finish creating the new transport rule.
By default, it is turned off until you turn it on from the Rules page.
- You will see the new transport rule in the rules list with a priority of 2. The Exclaimer rule called Identify messages to send to Exclaimer has moved to a priority of 1.
Your Microsoft 365 set up is now complete.
NOTE: Please allow up to one hour for mail flow changes to replicate in Microsoft 365.
The final step of this process is to return to the Exclaimer portal to ensure that emails are routed to Microsoft 365 once the signature has been applied:
- Log into the Exclaimer portal (portal.exclaimer.com) and Launch your subscription.
- From the left-hand pane, click Configuration, then select Manage Mail Flow.
- In the right-hand pane, under Mail Routing Domain, are the relevant options.
- In Domain Name, enter the .omnicrosoft.com domain name - this can be located in the Domain list in the Microsoft 365 Admin Center. This setting is important, and an incorrect domain can result in mail flow issues.
Example:
- Click SAVE to save the changes made.
Your setup is now complete.
NOTES: The MX record for the Domain name (in the Mail Routing settings) should specify a single Exchange Online Server for your Microsoft 365 tenancy.
- To check the MX record for your own Domain name, use a DNS lookup tool, such as MXToolbox.
Example showing Exclaimer's domain: