# Microsoft 365 Split Delivery: Share One Domain With Another Mail Server

> Set up split delivery so one domain delivers to Microsoft 365 or a second mail server (cPanel, Google Workspace, Zoho): internal relay, connector, rule, tests.

Source: https://www.epifive.com/blog/microsoft-365-split-delivery-shared-domain-internal-relay · Published 2026-11-22 · EpiFive

## Key takeaways

- Split delivery needs the domain set to Internal relay in Exchange Online, a connector to the other server, and a mail flow rule that uses it.
- Point MX at Microsoft 365 for the best filtering, and test delivery to both systems before you change MX.
- Each address must exist in exactly one system; duplicates, contacts, groups and shared mailboxes with the other system's addresses break routing.
- The other server must accept the domain locally, or mail loops between the two systems.
- When everyone has moved, remove the rule and connector and set the domain back to Authoritative.

Split delivery lets one email domain live on two systems: mail enters through Microsoft 365, delivers to any recipient that exists there, and is relayed to your other mail server (cPanel, Google Workspace, Zoho or an on-premises server) for everyone else. In Exchange Online you build it from three pieces: the accepted domain set to Internal relay, an outbound connector to the other server, and a mail flow rule that sends unknown recipients through that connector. Set it up and test it before you change the MX record.

## Who this is for and what you will have

This guide is for administrators who run one domain across two mail systems, usually during a phased migration to Microsoft 365 but also for a long-term shared setup. You do not need to be an Exchange specialist, but you need admin access to Exchange Online, to the DNS zone, and to the other mail server. At the end you will have:

- A clear picture of how a message finds its mailbox when two systems share a domain.
- The Microsoft 365 side configured in the Exchange admin center and in PowerShell.
- The matching settings on the other server, with specific notes for cPanel, Google Workspace and Zoho Mail.
- A test plan using message trace, a troubleshooting table and a way to remove the setup when you finish.

If you are moving a whole cPanel domain end to end, read [cPanel to Microsoft 365 migration step by step](https://www.epifive.com/blog/cpanel-to-microsoft-365-migration-step-by-step) for the migration itself; this guide is the standalone reference for the shared-domain mail flow. For generic IMAP migration details see [IMAP to Exchange Online migration](https://www.epifive.com/blog/imap-to-exchange-online-migration).

## How split delivery works

### Authoritative versus internal relay

Microsoft defines two accepted domain types in Exchange Online. **Authoritative** delivers email to recipients that exist in Microsoft 365 for the domain and rejects mail for unknown recipients. **Internal relay** (also called non-authoritative) delivers to known recipients in Microsoft 365 and relays mail to your own email server if the recipient is not known to Microsoft 365.

Two warnings from the same page matter here. You should not choose Internal relay if all recipients for the domain are in Microsoft 365. And if you choose it, you must create a connector from Microsoft 365 to your other server; otherwise recipients hosted there cannot receive mail.

### The path of a message

With MX pointing at Microsoft 365, every inbound message takes the same path:

```text
Internet sender
      |
      v
MX record -> Microsoft 365 (Exchange Online Protection)
      |
      +-- recipient exists in Microsoft 365 --> delivered to the mailbox
      |
      +-- recipient unknown, domain = Internal relay
                |
                v
        mail flow rule "Not in M365 to other server"
                |
                v
        outbound connector --> smart host mail.example.com
                |
                v
        other server delivers to its own mailbox
```

Mail sent from a user on the other server to a user who has moved to Microsoft 365 takes the reverse trip: the other server must hand it to Microsoft 365, usually through a forwarder to the user's `yourtenant.onmicrosoft.com` address.

### Which side should hold the MX record

Microsoft's mixed-location guidance recommends pointing the MX record to Microsoft 365 because that setting provides the most accurate spam filtering, and says most customers with a hybrid setup should let Microsoft 365 do all filtering and routing. The other direction is possible: the other server keeps MX, delivers its own mailboxes, and forwards Microsoft 365 users' mail to their `onmicrosoft.com` address. Microsoft's page lists "MX record points to my on-premises servers" as a scenario but notes that filtering typically works better with MX on Microsoft 365. This guide builds the recommended direction and covers the reverse in its own section.

| Direction | MX points to | Unknown recipients | Best for |
|---|---|---|---|
| Microsoft 365 first (recommended) | Microsoft 365 | Relayed to the other server by connector and rule | Phased moves to Microsoft 365, best spam filtering |
| Other server first | The other server | Other server forwards Microsoft 365 users to `onmicrosoft.com` | Organizations that must keep their existing filter in front |

## Prerequisites

- **Global Administrator or Exchange Administrator** rights, and permission to edit DNS.
- The domain added and verified in Microsoft 365. Leave the MX record where it is until the tests pass.
- A list of every address in the domain and where each one will live. Each address exists in exactly one system.
- The other server reachable by name (for example `mail.example.com`) with inbound SMTP on port 25 open. Microsoft's connector guidance says to open port 25 so Microsoft 365 can connect and to accept connections from the published Exchange Online IP address ranges.
- A valid CA-signed TLS certificate on the other server if you want strict certificate checks. Microsoft recommends a certificate whose subject name includes the domain of your primary mail server.
- An address that exists only on the other server, for connector validation and testing.

## Step 1: Set the accepted domain to Internal relay

In the Exchange admin center go to **Mail flow** > **Accepted domains**, select `example.com`, and under **This accepted domain is** choose **Internal relay**, then **Save**. If you already created users in Microsoft 365 for the domain, they are unaffected; only the treatment of unknown recipients changes.

```powershell
Connect-ExchangeOnline -UserPrincipalName admin@example.com
Set-AcceptedDomain -Identity example.com -DomainType InternalRelay
Get-AcceptedDomain -Identity example.com | Format-List Name,DomainName,DomainType
```

Do not do this step on its own and walk away. Until the connector and rule exist, mail for recipients that are only on the other server has nowhere to go, and Authoritative-mode rejection no longer protects you from typos. Do steps 1 to 3 in one sitting.

## Step 2: Create the outbound connector

Microsoft's conditional routing guide shows the wizard. In **Mail flow** > **Connectors**, select **+ Add a connector** and choose:

1. **Connection from**: **Office 365**. **Connection to**: **Your organization's email server** (the connector page also allows **Partner organization**).
2. Name it `To other server` and tick **Turn it on**.
3. On **Use of connector**, choose **Only when I have a transport rule set up that redirects messages to this connector**. This keeps the connector from catching ordinary outbound mail.
4. On **Routing**, enter `mail.example.com` and click **+**. Microsoft notes that clicking **+** is mandatory to continue.
5. On **Security restrictions**, tick **Always use Transport Layer Security (TLS) to secure the connection (recommended)** if the server supports TLS. Microsoft notes you can skip this page without choosing anything, but if you choose TLS you must also pick one of the two options under **Connect only if the recipient's email server certificate matches this criteria**.
6. On **Validation email**, enter an address that exists only on the other server, click **+**, then **Validate**, and finish with **Create connector**.

PowerShell equivalent:

```powershell
New-OutboundConnector -Name "To other server" -ConnectorType Partner -UseMXRecord $false -SmartHosts mail.example.com -IsTransportRuleScoped $true -Enabled $true -TlsSettings EncryptionOnly
```

`-TlsSettings EncryptionOnly` encrypts without verifying the certificate. Use `CertificateValidation` or `DomainValidation` (with `-TlsDomain`) when the other server has a proper certificate for its name.

If validation fails, the usual causes are that port 25 is blocked, that the server is not accepting mail from Microsoft's ranges, or that the TLS certificate does not match the criteria you chose.

## Step 3: Create the mail flow rule

In **Mail flow** > **Rules**, select **Add a rule** > **Create a new rule**. Name it `Not in M365 to other server`. For **Apply this rule if**, choose **The recipient is located** > **Outside the organization**, and add a second condition: **The recipient's address domain portion belongs to** `example.com`. For **Do the following**, choose **Redirect the message to** > **the following connector** and pick `To other server`. Set priority 0, then save and enable the rule.

```powershell
New-TransportRule -Name "Not in M365 to other server" -SentToScope NotInOrganization -RecipientDomainIs example.com -RouteMessageOutboundConnector "To other server" -Priority 0
```

Three points from the New-TransportRule reference:

- `-Enabled` defaults to `$true` for rules created in PowerShell, but the portal lets you decide when a rule activates, so check that it shows as enabled. If it is not, `Enable-TransportRule` turns it on.
- `-Priority` 0 is the highest priority, and rules cannot share a priority value; a lower number runs first.
- `-RouteMessageOutboundConnector` accepts the connector's name, distinguished name or GUID.

### A caution about the scope condition

The documented definition of `NotInOrganization` is: the recipient's address is not in an accepted domain, or is in an accepted domain configured as an external relay domain. The definition of `InOrganization` explicitly includes recipients in accepted domains configured as authoritative or internal relay. Read literally, a rule scoped to `NotInOrganization` would not match a recipient in an internal relay domain. Administrators report that this exact rule works for unknown recipients of an internal relay domain, but the documentation reads differently, so treat the tests below as mandatory. If a cPanel-only address does not receive mail, change the scope condition first and compare the rule's behavior in message trace, rather than changing the connector.

## Step 4: Configure the other server

### cPanel

- **Email Routing.** In cPanel **Email** > **Email Routing**, select the domain and choose **Local Mail Exchanger**. cPanel documents it as: the server always accepts the domain's mail and delivers it to the local mailbox. **Remote Mail Exchanger** makes the server refuse the domain's mail and send all of it to the lowest-numbered mail exchanger, which is now Microsoft 365, and that is how loops form. **Automatically Detect Configuration** reads the local zone file and picks Local, Backup or Remote based on the lowest-numbered MX, so after the MX change it can silently select Remote. cPanel also warns that the system does not change the setting again after you update it, and that misconfigured routing can disrupt receiving mail.
- **Forwarders for moved users.** Delete the user's cPanel account and add a forwarder: **Forwarders** > **Add Forwarder**, type the part before the @ in **Address to forward**, pick the domain, and under the destination menu choose **Forward to Email Address**, entering `user@yourtenant.onmicrosoft.com`. cPanel's notes matter: forwarded mail from an existing account is stored in that account first, and if a forwarder and an email account share an address, both receive the mail. Delete the account to stop local storage.
- **Port 25 and SPF checks.** Keep inbound SMTP open. If the server rejects mail that fails SPF checks, relayed mail from Microsoft can be rejected, because it arrives from Microsoft's IP addresses and not the original sender's. Check the Exim settings in WHM and allow Microsoft's published ranges.

### Google Workspace

Google's split delivery page has the mirror-image prerequisites: MX points to Google, all incoming mail goes to Gmail first, and each user has an address in Gmail or in the other system, not both. That makes Google the front door, which is the opposite of the recommended Microsoft direction in this guide, so decide which platform should be primary before you start. To use Google as the front door:

1. Add the non-Gmail server through **Add Route** (Google's "Add mail servers for Gmail email routing" page).
2. In the Admin console go to **Menu** > **Apps** > **Google Workspace** > **Gmail** > **Routing**, scroll to **Routing**, and click **Configure** or **Add Another Rule**.
3. Name the rule, check **Inbound messages**, **Internal inbound messages**, or both, choose **Modify message**, click **Change route**, and select the server. Under **Select all account types this action applies to**, check **All inactive and unrecognized accounts** and leave **Active user account** and **Group account** unchecked.

Google says changes can take up to 24 hours to apply. If Microsoft 365 is primary instead, Google must accept the domain mail locally and send it where you want; the Microsoft side of this guide is unchanged, and the connector smart host is Google's SMTP routing name, which you take from Google's documentation, not from this article.

### Zoho Mail

Zoho calls the server that MX points to the primary server. If Microsoft 365 is primary, Zoho's own coexistence page lists the Microsoft steps: in the Exchange admin center create a connector from **Office 365** to **Your organization's email server**, route it to the Zoho MX value (`mx.zoho.com`) or the destination domain, choose a certificate issued by a trusted certificate authority, validate with an active user on the secondary server, and then enable internal relay under **Mail flow** > **Accepted domains**. Zoho's page also recommends including both providers in SPF and creating groups on the primary server. If Zoho is primary, in the Zoho Mail Admin Console go to **Mail Settings** > **Email Routing**, configure routing for the domain, and set the delivery type to **Split Delivery**, which Zoho defines as delivering emails to non-existing accounts only. New routing configurations are disabled by default; toggle **Status** to enable them. Zoho also documents a **Dual Delivery** option, which copies mail for existing accounts to both systems and is for archival, not for splitting a domain.

### On-premises Exchange or Postfix

For any SMTP server, the requirement is the same: accept mail for the domain locally, accept connections from Microsoft 365 on port 25, and for a user who moved, forward to the `onmicrosoft.com` address. For Exchange Server, Microsoft's hybrid configuration is the supported route; for other servers use the vendor's documentation.

## Where to create each address

| Address | Create it in | Do not |
|---|---|---|
| A user staying on the other server | The other server only | Create a Microsoft 365 user, contact, mail user, shared mailbox, group or alias with that address |
| A user who has moved | Microsoft 365; then remove the old mailbox and add a forwarder | Keep the old mailbox on the other server |
| A shared address (`info@`, `sales@`) | The side that owns it, with a plan for the other side's members | Create the same address in both systems |
| A distribution list of mixed users | Microsoft 365 or the other system, not both | Expect one system to expand members that live on the other |

Zoho gives the same advice for groups: create them on the server your MX records point to.

## The reverse direction: the other server keeps MX

If you must keep MX on the other server, Microsoft lists it as a supported scenario. The other server delivers to its own mailboxes and forwards mail for Microsoft 365 users to `user@yourtenant.onmicrosoft.com`. Because mail now arrives in Microsoft 365 from your own server and not from the internet, Microsoft's page says you may need a connector from your email server to Microsoft 365 in some cases: for example when users automatically forward to outside addresses, or when your organization relays non-delivery reports through Microsoft 365. Choose the first option on the connector's identification screen (certificate subject name), as Microsoft describes, and include `spf.protection.outlook.com` in SPF because Microsoft 365 may relay mail from your server. You also lose the recommended filtering path, so decide this deliberately.

## Step 5: Test before you change MX

1. From a Microsoft 365 user's Outlook, send a message to an address that exists only on the other server. It must arrive in that server's webmail.
2. In message trace, find that message and confirm it left Microsoft 365 through the `To other server` connector. See [Message trace in Exchange Online](https://www.epifive.com/blog/message-trace-exchange-online-get-messagetracev2) for how to search.
3. From the other server, send to a user who has moved. It must arrive in Microsoft 365 through the forwarder.
4. Send between two Microsoft 365 users and between two users on the other server; neither should leave its own system.
5. Only then change the MX record to the value shown in **Settings** > **Domains** in the Microsoft 365 admin center (for example `example-com.mail.protection.outlook.com`). Keep the A record for `mail.example.com` pointing at the other server, because the connector uses it.
6. After the MX change, send from an outside mailbox (for example Gmail) to one user on each system and confirm both in message trace.

For SPF, Microsoft's examples combine the on-premises IP and the Microsoft include in one record, for example `v=spf1 ip4:172.17.17.231 include:spf.protection.outlook.com -all`. Publish only one SPF record for the domain, and set up DKIM for both senders during coexistence; see [SPF, DKIM and DMARC for Microsoft 365](https://www.epifive.com/blog/spf-dkim-dmarc-microsoft-365-setup).

## Common mistakes

- **Remote routing on the other server.** It sends unknown recipients straight back to Microsoft 365, which relays them again. Use the local setting.
- **Rule left disabled.** Without the rule, nothing uses the connector, and mail for the other server's users is rejected or lost.
- **Creating a staying user in Microsoft 365.** Microsoft delivers to the known recipient, so their mail lands in Microsoft 365, not on the other server.
- **No forwarder for a moved user.** Mail from the other server's users to that person stays in the old local mailbox.
- **Changing MX before testing.** If the test fails after the MX change, external mail is already affected.
- **Forgetting the rule's scope.** See the caution above.

## Troubleshooting

| Symptom | Likely cause | Fix |
|---|---|---|
| Mail to a user on the other server is rejected with an unknown-recipient error | Domain still Authoritative, or rule disabled or not matching | Confirm `DomainType` is `InternalRelay`; confirm the rule is enabled with priority 0; test the scope condition |
| Connector validation fails | Port 25 blocked, wrong smart host, or certificate mismatch with the chosen TLS criteria | Open port 25 to Microsoft's ranges; check the host name; relax the TLS option to test, then tighten |
| Message bounces back and forth | Other server set to Remote or Automatic routing | Set Local Mail Exchanger (cPanel) or the equivalent |
| Moved user receives nothing from colleagues on the other server | Old mailbox still exists, no forwarder | Delete the old mailbox, add forwarder to `onmicrosoft.com` |
| Relayed mail rejected by the other server | SPF check on relayed mail | Allow Microsoft's published ranges, or relax the check |
| A staying user's mail lands in Microsoft 365 | Duplicate address (contact, group, alias, shared mailbox) | Remove the duplicate from Microsoft 365 |
| Rule never matches | Scope condition does not match an internal relay domain | Rebuild the rule per the caution and retest |

## When to remove split delivery

Once the last mailbox has moved and the other server no longer holds mail for the domain, remove the setup in this order: delete the rule, delete the connector, and set the accepted domain back to Authoritative.

```powershell
Remove-TransportRule -Identity "Not in M365 to other server"
Remove-OutboundConnector -Identity "To other server"
Set-AcceptedDomain -Identity example.com -DomainType Authoritative
```

Authoritative also turns on Directory-Based Edge Blocking, which rejects messages for invalid recipients at the service edge; Exchange Online asks you to confirm this in the admin center. Keep a backup of the other server's mail before you decommission it.

## Closing checklist

- [ ] Every address is listed once, in exactly one system.
- [ ] Accepted domain is **Internal relay**.
- [ ] Connector `To other server` created, scoped to the rule only, and validated.
- [ ] Rule created, enabled, priority 0.
- [ ] Other server accepts the domain locally, and moved users have forwarders.
- [ ] Tests passed in both directions with message trace evidence.
- [ ] MX changed last; SPF is one record; DKIM published.
- [ ] Removal plan written for when the last mailbox moves.

## What we checked

- Opened Microsoft Learn's Manage accepted domains in Exchange Online page on 2026-11-22 and confirmed the **Authoritative** and **Internal relay** definitions, the warnings quoted above, the **Mail flow** > **Accepted domains** path, and the `Set-AcceptedDomain -Identity contoso.com -DomainType InternalRelay` example; the page documents no output for it.
- Opened the conditional mail routing page on 2026-11-22 and matched the connector wizard labels (**Connection from**, **Use of connector**, **Routing**, **Security restrictions**, **Validation email**) and the mandatory click on **+** after the smart host.
- Read the New-TransportRule reference on 2026-11-22: the `-SentToScope` definitions for `InOrganization` and `NotInOrganization`, `-Priority` (0 is highest, no shared values), `-Enabled` (default `$true`) and `-RouteMessageOutboundConnector` (name, DN or GUID). Compared the `InOrganization` definition (includes internal relay) with `NotInOrganization` and found the scope conflict described above.
- Read the mixed-location mail flow page on 2026-11-22: MX on Microsoft 365 is recommended; the SPF example `v=spf1 ip4:172.17.17.231 include:spf.protection.outlook.com -all` is quoted exactly.
- Read cPanel's Email Routing and Forwarders documentation on 2026-11-22 and matched option names and the Add Forwarder fields; checked Google's split delivery page (menu path **Menu** > **Apps** > **Google Workspace** > **Gmail** > **Routing**) and Zoho's Email Routing and Office 365 coexistence pages on the same date.
- Not checked: no Microsoft 365 tenant, cPanel server, Google Workspace or Zoho account was available, so no cmdlet was run and no message trace was observed. The rule scope behavior for internal relay domains was not tested, Google's smart host value was not verified, and menu labels may change.

Last tested: 2026-11-22

## References

- [Manage accepted domains in Exchange Online](https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/manage-accepted-domains/manage-accepted-domains)
- [Set up connectors to route mail between Microsoft 365 and your own email servers](https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/use-connectors-to-configure-mail-flow/set-up-connectors-to-route-mail)
- [Scenario: Conditional mail routing in Exchange Online](https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/use-connectors-to-configure-mail-flow/conditional-mail-routing)
- [Manage mail flow with mailboxes in multiple locations](https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/manage-mail-flow-for-multiple-locations)
- [New-TransportRule](https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/new-transportrule)
- [New-OutboundConnector](https://learn.microsoft.com/en-us/powershell/module/exchangepowershell/new-outboundconnector)
- [cPanel: Email Routing](https://docs.cpanel.net/cpanel/email/email-routing/)
- [cPanel: Forwarders](https://docs.cpanel.net/cpanel/email/forwarders/)
- [Google Workspace: Send email to 2 email systems with split delivery](https://knowledge.workspace.google.com/admin/gmail/advanced/send-email-to-2-email-systems-with-split-delivery)
- [Zoho Mail: Email Routing](https://www.zoho.com/mail/help/adminconsole/email-routing.html)
- [Zoho Mail: Configuring coexistence with Office 365](https://www.zoho.com/mail/help/adminconsole/coexistence-with-office365.html)

## Frequently asked questions

### What is split delivery in Microsoft 365?

Split delivery means one email domain is hosted on two systems at once. Mail enters through one system, which delivers to mailboxes it knows and relays the rest to the other system. In Exchange Online this is built from the Internal relay domain type, an outbound connector and, usually, a mail flow rule.

### Should the MX record point to Microsoft 365 or to the other server?

Microsoft recommends pointing MX at Microsoft 365 when mailboxes live in two places, because that gives the most accurate spam filtering. You can keep MX on the other server, but then that server must forward mail for Microsoft 365 users to their address on yourtenant.onmicrosoft.com.

### Why does mail loop between Microsoft 365 and my other server?

A loop happens when each side believes the other one owns the unknown recipient. Microsoft 365 relays unknown recipients to the other server, and the other server, set to forward the domain's mail to its MX, sends them back. Make the other server accept the domain locally.

### Can I use the same address in both systems?

No. Each address must exist in exactly one system. Microsoft delivers to a known recipient in Microsoft 365 and only relays unknown ones, so a duplicate address in Microsoft 365 captures the mail and the copy on the other server never receives it.

