How to configure smart host (mail relay) services to work with CodeTwo software
You use smart host (mail relay) services (e.g. for security or anti-spam protection) and you would like to configure them to work with CodeTwo cloud services.
To ensure correct mail flow in your organization (Fig. 1.), you will have to reconfigure your smart host's Exchange Online outbound connector and the associated transport rule. Follow the steps below.
- Log in to your Microsoft 365 admin center (Office 365 admin center).
- Go to Admin centers, Exchange to access your Exchange admin center.
- Select mail flow from the left menu, and open the connectors tab.
- Find and select the outbound connector of your smart host, as shown in Fig. 2. Click the Edit (pencil icon) button.
- The Edit Connector wizard will open (Fig. 3.). Click Next.
- Select the first option, as shown in Fig. 4. (Only when I have a transport rule...), and click Next. Leave the other settings unchanged and complete the wizard.
- Now you need to add a new transport rule for your smart host's outbound connector. Switch to the rules tab, click the New (+) button (Fig. 5.) and choose Create a new rule... from the drop-down menu.
- A new window will open. Name your rule and click More options... to turn on additional options. Configure the rule so that it looks exactly like the one shown in Fig. 6.:
- add a new condition by selecting A message header... matches these text patterns. Type the name of the header (X-CodeTwoProcessed) and the text pattern that needs to be matched (true);
- add a new action: choose Redirect the message to... the following connector and select your smart host's outbound connector. Leave the other fields as they are and save the rule.
- The rule will be saved at the bottom of the list, with the lowest priority. Move it up using the arrow button, so it is directly below the CodeTwo transport rule (by default, the CodeTwo rule has 0 priority - in this case your smart host rule should have a priority of 1, as shown in Fig. 7.). You can also edit the rule and change the priority manually.
Your mail flow is now configured and emails will be routed through our cloud services and your smart host service before they reach their recipients.
If you experience any mail flow problems when sending emails via SMTP clients (e.g. Mozilla Thunderbird), see this article.