Configure Microsoft 365 Mail Flow for a Shared Domain and External Mail Host
Question details
Configure one email domain so some mailboxes receive mail in Microsoft 365 and others remain with an external provider.

- Product
- Microsoft 365 Exchange Online
- Device & OS
- not provided
- Scenario
- A domain's MX record points to Microsoft 365 during a partial mailbox migration.
- Observed behavior
- Messages addressed to mailboxes still hosted externally may be rejected instead of being forwarded to the external mail host.
Confirm that the domain is verified in Microsoft 365 and identify which addresses are hosted in each system. Obtain the external provider's inbound smart-host address and its TLS requirements; the smart host must accept mail for the shared domain.
Set up an internal relay domain and outbound connector
Use this shared-domain configuration when Microsoft 365 receives incoming mail but must relay unresolved addresses to an external mail host.
An internal relay domain lets Exchange Online route addresses it cannot resolve locally to another mail system. The external host must accept those addresses without routing them back to Microsoft 365.
In your DNS provider's management console, confirm that the domain's MX record points to the Microsoft 365 endpoint shown under Microsoft 365 admin center > Settings > Domains.
In the Microsoft 365 admin center, use Users > Active users to create or verify the users and licenses for mailboxes hosted in Microsoft 365. Keep the remaining addresses configured at the external provider.
In the Exchange admin center, open Mail flow > Accepted domains, select the shared domain, and change its domain type to Internal relay.
Go to Mail flow > Connectors and add a connector from Microsoft 365 to a partner organization. Scope it to the shared domain and route mail through the external provider's inbound smart host, using the provider's required security settings.
Use the connector's validation option with an externally hosted address, then send test messages to both Microsoft 365 and external mailboxes. If delivery fails, check Mail flow > Message trace and the external provider's logs.

Use WPS Office for Documents During Your Mail Migration
WPS Office is a free, lightweight Office alternative with a familiar interface and support for Microsoft Office files, making it easy to move document work while you manage your email migration separately. It does not configure Exchange mail flow.

Frequently Asked Questions
Why are externally hosted addresses rejected when the MX record points to Microsoft 365?
Exchange Online receives the messages first. If the domain is authoritative and an address is not recognized locally, Exchange Online may reject it instead of routing it to the external host.
What does the Internal relay domain setting do?
It allows Exchange Online to relay messages for unresolved addresses in the shared domain to another mail system. Set it under Exchange admin center > Mail flow > Accepted domains and configure an appropriate outbound route.
Which server should I use as the connector's smart host?
Use the inbound server address supplied by the external mail provider, not the Microsoft 365 MX endpoint. Confirm that the server accepts mail for the shared domain and follows the required TLS settings.
How can I troubleshoot mail that still does not reach the external host?
Run connector validation in Exchange admin center > Mail flow > Connectors and check Mail flow > Message trace. Also ask the external provider to check its delivery logs and confirm that it accepts the recipient address.




