The Office 365 Configuration Service configures Exchange Online mail flow for mxHERO from the Admin Dashboard. It creates the connectors and mail flow rules for the architecture you choose, so you don't have to build them by hand. Use this page to run it, to see exactly what it changes in your tenant, and to finish the steps it does not do.
To make the same changes by hand instead, see Office 365 manual configuration.
Before you begin
- Choose your architecture: Inbound Loopback, Inbound Border, Outbound Standard or Outbound Loopback. See Routing architectures.
- You need a Microsoft 365 account with Exchange admin rights in the tenant. You sign in with it during setup.
- Your domains must be added in Settings › Organization and domains, each with its Server set to your tenant's MX host (for example
example-com.mail.protection.outlook.com). See Domain Server and Relay settings. - Settings › Gateway must show an Allowed transport agent value. If it is empty, click the refresh icon ("Generate new transport agent") first. The service writes this value into the mail flow rules.
- Plan a pilot. The service creates rules for the whole tenant, with no group condition. To start with a group, use the default Save as disabled option and add a group condition before you turn the rules on. See Selective routing.
Run the setup
In the Admin Dashboard, open Settings › Gateway.
-
In the Office 365 Connector section, click Add Connector. If the setup ran before, the button is Configure again .
-
In the dialog, select the flows to configure:
- Inbound : sends inbound mail through mxHERO. Also select Loopback under it for Inbound Loopback. Leave Loopback clear for Inbound Border (your MX record or border gateway sends mail to mxHERO).
- Outbound : sends outbound mail through mxHERO. Select Loopback under it for Outbound Loopback.
You must select at least one of Inbound or Outbound.
Leave Save as disabled selected (the default). The mail flow rules are then created turned off, so no mail is rerouted until you turn them on.
Click the button to continue. A Microsoft sign-in window opens.
Sign in with your Exchange admin account and accept the permissions requested (
Exchange.Manage,User.Read).Wait while the dashboard shows each step and its result. It usually takes a few minutes.
When it finishes, the section shows the status (Enabled or Disabled), the flows configured and the date of the last configuration.
What the service creates
The service connects to Exchange Online with PowerShell and creates the objects below. If an object with the same name already exists, the service skips it and does not change it.
| Step | Object | Settings | When |
|---|---|---|---|
| 1 | Inbound connector mxHERO Tenant Connector
|
Type Partner; sender domains *; sender IP addresses = the 8 mxHERO IPs; TLS required; enabled |
Always |
| 2 | Trusted ARC sealer | Adds mxhero.com; keeps existing sealers |
Always |
| 3 | Connection filter policy (Default, or the first policy found) |
Adds the 8 mxHERO IPs to the IP Allow list; keeps existing entries | Always |
| 4 | Remote domain Default
|
TNEF (rich text) turned off | Always |
| 5 | Outbound connector mxHERO Inbound Route
|
Smart host smtp-in.mxhero.com; used only by mail flow rules; TLS with certificate validation; enabled |
Inbound + Loopback |
| 6 | Mail flow rule mxHERO - Route Inbound
|
If the recipient is inside the organization: set header X-mxHero-Transport-Agent = your Transport Agent value, route through mxHERO Inbound Route. Except if header X-mxHero-Server matches your Transport Agent value. |
Inbound + Loopback |
| 7 | Outbound connector mxHERO Outbound Route
|
Smart host smtp-relay.mxhero.com; used only by mail flow rules; TLS with certificate validation; enabled |
Outbound |
| 8 | Mail flow rule mxHERO - Route Outbound
|
If the sender is inside the organization: set header X-mxHero-Transport-Agent = your Transport Agent value, route through mxHERO Outbound Route. Except if header X-mxHero-Server matches your Transport Agent value. |
Outbound |
For Inbound without Loopback (Inbound Border), the service creates only steps 1–4. For Outbound with Loopback, it also checks that mxHERO Tenant Connector exists, because mxHERO returns processed mail to your tenant through it.
The 8 mxHERO IP addresses are 54.208.111.28, 54.236.184.32, 54.165.252.128, 54.165.253.193, 3.211.77.148, 52.22.51.97, 54.209.222.83 and 107.23.152.206.
Important: Connectors are always created enabled. Only the two mail flow rules follow Save as disabled. Because the outbound connectors are used only when a rule routes mail to them, enabled connectors with disabled rules do not change mail flow.
What the service does not do
Finish these steps yourself:
| Task | Where |
|---|---|
| Set each domain's Server (and Relay Server for Outbound Loopback, usually your tenant MX host) | Settings › Organization and domains › Domains in the Admin Dashboard. See Domain Server and Relay settings. |
| Limit routing to a pilot group | Add a group condition to the mail flow rules. See Selective routing. |
Add include:_spf.mxhero.com to SPF and set up DKIM |
Your DNS and Settings › Organization and domains › DKIM. See SPF, DKIM and DMARC. |
| Point your MX record to mxHERO (Inbound Border only) | Your DNS. See Border gateways. |
| Turn on the mail flow rules | Exchange admin center (next section). |
| Remove the configuration | By hand. See Removing mxHERO from mail flow. |
Turn on the mail flow rules
- Create a test rule in mxHERO for a test user, for example a Copy Emails rule. See Testing mail flow.
- In the Exchange admin center, go to Mail flow › Rules.
- Optional: open
mxHERO - Route InboundandmxHERO - Route Outboundand add a group condition for your pilot users. - Select
mxHERO - Route Inbound, and turn it on. - Select
mxHERO - Route Outbound, and turn it on.
Or in Exchange Online PowerShell:
Enable-TransportRule -Identity "mxHERO - Route Inbound"
Enable-TransportRule -Identity "mxHERO - Route Outbound"Changes to mail flow rules can take up to an hour to apply across Exchange Online.
Verify
In the Exchange admin center, check Mail flow › Connectors for
mxHERO Tenant Connectorand, depending on your flows,mxHERO Inbound RouteandmxHERO Outbound Route.Check Mail flow › Rules for the rules and their status.
-
Confirm the values in Exchange Online PowerShell:
Get-InboundConnector "mxHERO Tenant Connector" | Format-List Name,ConnectorType,SenderIPAddresses,RequireTls,Enabled Get-OutboundConnector | Where-Object Name -like "mxHERO*" | Format-List Name,SmartHosts,IsTransportRuleScoped,TlsSettings,Enabled Get-TransportRule | Where-Object Name -like "mxHERO*" | Format-List Name,State,SetHeaderName,SetHeaderValue,ExceptIfHeaderMatchesMessageHeader,ExceptIfHeaderMatchesPatterns Get-ArcConfig | Format-List ArcTrustedSealers Get-RemoteDomain Default | Format-List TNEFEnabledSetHeaderValueandExceptIfHeaderMatchesPatternsmust both equal the Allowed transport agent value in Settings › Gateway. Send test messages and check them in Reports › Email Flow Logs. See Testing mail flow.
Change or re-run the configuration
Configure again skips every object that already exists. It does not update existing rules or connectors, does not change a rule's on/off state, and does not remove objects for flows you clear.
To add a flow (for example, add Outbound later): run Configure again with the new flow selected. Only the missing objects are created.
To change an existing object: edit it in the Exchange admin center or with PowerShell, using the values on Office 365 manual configuration. Or delete it and run Configure again.
-
After you generate a new Transport Agent value: update both rules by hand. Change the header value and the exception pattern to the new value, test, then remove the previous value in Settings › Gateway. Until you do, mxHERO accepts both values.
$ta = "<new Transport Agent value>" Set-TransportRule -Identity "mxHERO - Route Inbound" -SetHeaderValue $ta -ExceptIfHeaderMatchesPatterns $ta Set-TransportRule -Identity "mxHERO - Route Outbound" -SetHeaderValue $ta -ExceptIfHeaderMatchesPatterns $ta
The service runs one operation at a time per organization. The configuration covers the whole tenant: one inbound connector for all sender domains, rules with no domain condition, and one Transport Agent value for your mxHERO organization, however many domains you have.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| The setup ends with a failure message and an operation ID | A PowerShell step failed in your tenant (for example, missing admin rights) | Note the operation ID and the failed step. Check your Exchange admin rights and run Configure again. If it fails again, send the operation ID to support. |
| "Operation already active" | Another setup for your organization is still running | Wait for it to finish, then refresh the page. |
| Setup finished but mail is not processed | The mail flow rules are still disabled (Save as disabled is on by default) | Turn the rules on. See Turn on the mail flow rules. |
| A step shows as skipped and the old settings remain | An object with the same name already existed | Edit or delete the existing object, then run Configure again. |
Mail loops or bounces with 554 Message exceeded 50 hops
|
The rule value does not match Settings › Gateway (for example after a new value was generated), or the domain Server is missing | Update both rules to the current value. Set the Server for every domain. |
External recipients see winmail.dat
|
TNEF still enabled for a remote domain other than Default
|
See Preventing TNEF encapsulation. |
Comments
0 comments
Please sign in to leave a comment.