Exchange Connection Problems

Fix Exchange Online Hybrid Mail Loops and Hop Count Errors

Olivia MillerOlivia Miller Nov 14, 2026 868 views

Question details

Resolve external mail delivery failures after moving a mailbox from Exchange 2010 to Exchange Online.

Fix Exchange Online Hybrid Mail Loops and Hop Count Errors
Product
Exchange Online and Exchange Server 2010 hybrid
Device & OS
not provided
Scenario
A mailbox has been moved to Exchange Online in a hybrid environment, while other mailboxes remain on Exchange 2010.
Observed behavior
External messages to the moved mailbox fail with a hop count exceeded or possible mail loop error. The non-delivery report references an onmicrosoft.com address and an SPF failure.
Before you start

Collect the complete non-delivery report, including its diagnostic headers, and identify an affected recipient and message timestamp. Confirm that you have the permissions needed to review Exchange Online and on-premises mail flow settings.

Solution 1Recommended

Trace and correct hybrid routing for the moved mailbox

Use this method to find where mail is looping and correct the hybrid configuration before moving more mailboxes.

1
Trace the failed message

In the Exchange admin center, open Mail flow > Message trace and search for the affected recipient and message time. Compare the trace with the non-delivery report to identify whether mail is repeatedly passing between Exchange Online and the on-premises server.

2
Check the remote routing address

In the on-premises Exchange Management Shell, run Get-RemoteMailbox -Identity "user@example.com" | Format-List RemoteRoutingAddress. Confirm that the address uses the tenant's actual hybrid routing domain, commonly tenant.mail.onmicrosoft.com, and points to the intended Exchange Online mailbox.

3
Correct an incorrect address

If the remote routing address is wrong, use Set-RemoteMailbox -Identity "user@example.com" -RemoteRoutingAddress "user@tenant.mail.onmicrosoft.com" with the verified address for your tenant. Allow directory synchronization to complete, then check the recipient again.

4
Review hybrid configuration

Open the Hybrid Configuration Wizard from a supported Exchange management environment and verify that the selected Microsoft 365 cloud and configuration options match your tenant. Rerun the wizard if the hybrid configuration needs repair; check current Microsoft support requirements first because Exchange 2010 is out of support.

5
Check connectors and accepted domains

In the Exchange admin center, review Mail flow > Connectors and Mail flow > Accepted domains. In the on-premises Exchange Management Console or Exchange Management Shell, review the corresponding send connectors and accepted domains; verify that routing to the hybrid domain does not send mail back to the original hop.

6
Test mail flow

Send test messages to the moved mailbox from an external account and from an on-premises mailbox, and test outgoing mail. Review Message trace and any new non-delivery reports before moving additional users or changing the MX record.

Trace and correct hybrid routing for the moved mailbox
Verify the routing domain first: Do not substitute a guessed onmicrosoft.com domain. Use the hybrid routing domain configured for the tenant, which may differ from its default onmicrosoft.com domain.
Free Microsoft Office alternative

Document Your Exchange Troubleshooting in WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface for documenting mail-flow investigations and sharing results. It supports common Microsoft Office formats for an easier move between office suites. WPS Office does not repair Exchange connectors or mail routing.

Document message traces and troubleshooting steps in WPS WriterOpen and edit Microsoft Word DOCX and Excel XLSX filesUse a familiar interface for everyday documents and spreadsheetsWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

What does a hop count exceeded error mean?

The message passed through too many mail servers or routing hops and was rejected as a possible loop. Use Mail flow > Message trace in the Exchange admin center and the non-delivery report to find the repeated route.

Which remote routing address should a moved mailbox use?

It should use an address in the tenant's verified hybrid routing domain, commonly tenant.mail.onmicrosoft.com. Check it with Get-RemoteMailbox in the on-premises Exchange Management Shell rather than assuming the tenant's default onmicrosoft.com domain is correct.

Should I change the MX record to stop the loop?

Not as a first step. Trace the message and verify the remote routing address, connectors, and accepted domains. Test internal and external mail flow before making an MX change.

Does an SPF failure mean the SPF record caused the mail loop?

Not necessarily. Check the domain named in the SPF result and its authorized senders, but investigate repeated routing separately. If the domain belongs to an external sender, its administrator must review its SPF record.