Skip to content

Est. 2011ยทMicrosoft Partner 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

Free Fix 554 5.4.6

554 5.4.6 hop count exceeded: finding the mail loop in Exchange routing

11 min read Updated October 4, 2026 Exchange Server

Fix it now

Microsoft publishes 5.4.6 as Routing loop detected, and states that Exchange interrupts a mail loop after 20 iterations by default and returns a non-delivery report. The ceiling is the safety net, not the fault: something is sending mail in a circle.

Run these in the Exchange Management Shell against the address the loop centres on

Get-Mailbox user@contoso.com | Format-List ForwardingAddress,ForwardingSmtpAddress,DeliverToMailboxAndForward

Get-InboxRule -Mailbox user@contoso.com | Format-List Name,ForwardTo,RedirectTo,Enabled

Get-AcceptedDomain | Format-List Name,DomainName,DomainType
  1. Open the bounced message and read the Received headers from the bottom upwards. A loop shows as the same two or three host names repeating in sequence.
  2. Check forwarding on the recipient the loop centres on, at both levels: the mailbox properties and the user’s own inbox rules. A redirect rule is invisible in Get-Mailbox.
  3. Confirm the domain is authoritative on exactly one system. A domain marked authoritative on two will loop between them.
  4. In a hybrid organisation, check that the connector routing mail from Exchange Online to your servers uses smart host routing rather than DNS routing, and that the connector to your organisation has the on-premises connector type.
  5. Trace the message: Get-MessageTrackingLog -MessageSubject 'test' -Start (Get-Date).AddHours(-2) | Format-Table Timestamp,EventId,Source,ServerHostname,Recipients

5.4.6 is generated by on-premises Exchange Server, which is why it usually shows up in a hybrid organisation. Exchange Online generates 5.4.14 for the same condition.

If a test message now makes a single pass, you are finished. If the code is 5.4.8, that is an MTA-STS validation failure and not a loop at all – the next section explains the difference.

Why it happens

A mail loop is self-amplifying. Nothing in SMTP stops two systems handing a message back and forth indefinitely, and one looping message can consume a queue, a disk and eventually a server. Microsoft’s stated protection is an iteration count: by default, after 20 iterations of a loop, Exchange interrupts it and generates a non-delivery report to the sender. The published cause is that delivery of a message generates another message in response, which generates a third, and the process repeats.

The same condition produces two codes depending on which system notices. On-premises Exchange Server generates 5.4.6, which is why it is the one you see in a hybrid organisation, and Exchange Online generates 5.4.14. Microsoft’s guidance for both starts in the same place: verify that the recipient’s domain is configured as an authoritative accepted domain, then check whether automatic forwarding is enabled by reading the sender’s and the recipient’s mailbox rules.

In a hybrid organisation Microsoft names three specific configuration faults. Incoming mail routed through Exchange Online loops when the connector used to route mail from Exchange Online to the on-premises organisation is configured for DNS routing instead of smart host routing. Outgoing mail routed through the on-premises server loops when there is no connector from Microsoft 365 to your organisation’s mail server with the connector type On-premises, or when that connector is scoped to one or more accepted domains. Rerunning the Hybrid Configuration Wizard is the documented remedy for the connector faults.

One code in this group is not about loops at all. Microsoft publishes 5.4.8 as MX hosts of <domain> failed MTA-STS validation – the destination MX host was not the host the domain’s MTA-STS policy expects. It sits next to the loop codes numerically and nowhere near them in cause.

Two mailboxes forward to each other

You have this one if The headers alternate between your organisation and one external domain, and the recipient has a forwarding address set.

  1. Find every mailbox with forwarding configured: Get-Mailbox -ResultSize Unlimited | Where-Object {$_.ForwardingSmtpAddress -ne $null -or $_.ForwardingAddress -ne $null} | Format-List Name,ForwardingSmtpAddress,ForwardingAddress
  2. Remove the forwarding on your side: Set-Mailbox user -ForwardingSmtpAddress $null -ForwardingAddress $null
  3. Ask the far end to remove theirs; a loop needs both halves and only one of them is yours.
  4. Check inbox rules as well as mailbox forwarding. A user-created redirect produces the same loop and does not appear in Get-Mailbox.

Forwarding set by someone who has left is a common source. Audit forwarding across the organisation periodically rather than only when a loop appears.

The domain is authoritative on more than one system

You have this one if A hybrid tenant and an on-premises server alternate in the headers, and the domain is marked authoritative on both.

  1. Read Get-AcceptedDomain on both sides and confirm the domain is authoritative on exactly one, and internal relay on the other where mail has to cross.
  2. Correct the type on the side that should not be authoritative.
  3. Retest with a message to a recipient that only exists on one side, and follow it in the tracking log.

A hybrid connector routes the wrong way

You have this one if Mail loops between Exchange Online and your servers rather than between two mailboxes.

  1. Check that the connector routing mail from Exchange Online to on-premises uses smart host routing rather than DNS routing.
  2. Check that a connector exists from Microsoft 365 to your organisation’s mail server with the connector type On-premises, and that it is not scoped to accepted domains.
  3. Rerun the Hybrid Configuration Wizard, which is Microsoft’s documented remedy for these connector faults.

A connector points back at its own server

You have this one if The same server name repeats in the headers, and a send connector has a smart host that resolves to the sending server.

  1. Inspect the connectors: Get-SendConnector | Format-List Name,AddressSpaces,SmartHosts,DNSRoutingEnabled,SourceTransportServers
  2. Confirm no smart host resolves to an address on the Exchange server itself, including a load balancer address that points back to it.
  3. Check the address spaces. A connector holding an address space for your own domain captures internal mail and tries to send it out and back in.

A distribution group contains itself

You have this one if One group address repeats through the headers and only mail to that group loops.

  1. Expand membership including nesting: Get-DistributionGroupMember -Identity 'All Staff' | Format-List Name,RecipientType, then repeat for each nested group.
  2. Remove the self-reference or the circular nesting.
  3. Check for a mail contact inside the group whose external address resolves back to the group.

Full reference

The four shapes a loop takes in the headers

Pattern in the headers What is looping
Two of your own servers alternating A connector or routing configuration pointing back at itself
Your server and an external host alternating Mailbox forwarding to an address that forwards back
The same server repeating with no second host A rule or accepted domain sending mail back into the same organisation
A distribution group address appearing repeatedly The group contains itself, directly or through nesting
A hybrid tenant and an on-premises server alternating The domain is authoritative on both sides, or a hybrid connector routes the wrong way

The codes, and which is not a loop

Code Published meaning Generated by
554 5.4.6 Routing loop detected On-premises Exchange Server
554 5.4.14 Routing loop detected Exchange Online
550 5.4.6 The same enhanced code; Microsoft publishes the code, not the 550 and 554 prefixes separately Either
550 5.4.8 MX hosts of the domain failed MTA-STS validation – the destination MX host was not the one the domain’s MTA-STS policy expects Exchange Online
550 5.3.5 Not published by Microsoft. RFC 3463 defines the class as a system not configured in a manner that permits it to accept this message Either

5.4.8 is a different problem with a different fix

If you have 5.4.8, stop looking for forwarding rules. The destination domain publishes an MTA-STS policy naming the MX hosts it expects, and the host Exchange reached was not on that list. That is either a stale policy at their end or a change of MX record they have not reflected in it. Nothing in your accepted domains, your connectors or your inbox rules affects it, and there is nothing to fix on your side beyond telling them.

Reading Received headers

  1. Open the message and view its internet headers through message properties, or read them from the non-delivery report.
  2. The headers are stacked newest first, so read from the bottom upwards to follow the message forwards through time.
  3. Each hop names the host that handed the message on and the host that received it.
  4. Count the repetitions. A loop that reached the ceiling shows the same pair twenty times over.
  5. Note the recipient address the repetitions centre on – that is the object to investigate, not the original sender.

Do not respond to this by trying to raise the loop ceiling or by disabling loop detection. Microsoft’s stated reason for interrupting after 20 iterations is to protect against exhausting system resources. Removing that protection lets a looping message multiply until the transport queue database fills, at which point back pressure stops the server accepting new mail for everybody.

Finding forwarding you did not know about

  • Mailbox forwarding, in ForwardingAddress and ForwardingSmtpAddress, is set by an administrator and visible in Get-Mailbox.
  • Inbox rules with ForwardTo or RedirectTo are set by the user and only visible in Get-InboxRule.
  • Transport rules can redirect messages organisation-wide and are visible in neither.
  • Mail contacts and mail users inside a group can point at an address that comes straight back.
  • A resource mailbox with a delegate can generate responses that re-enter the loop.

Proving it is gone

One test message, to the address that was looping, delivered once, with a single set of Received headers rather than a repeating pattern. Then check the tracking log for one DELIVER event rather than a series of TRANSFER events between the same two hosts, and watch queue depth return to normal. A loop that has been running for a while leaves a backlog behind it, and the queue is where you will see whether it has actually stopped.

Every code this article covers

Code What it points at Source
554 5.4.6 Routing loop detected. Generated by on-premises Exchange Server; Exchange interrupts the loop after 20 iterations by default Microsoft Learn
554 5.4.14 Routing loop detected, the code Exchange Online generates for the same condition Microsoft Learn
550 5.4.6 The same routing loop condition. Microsoft publishes the enhanced code rather than the 550 and 554 prefixes separately Microsoft Learn
550 5.4.8 MX hosts of the domain failed MTA-STS validation: the destination MX host was not the host expected by the domain’s MTA-STS policy. Not a loop Microsoft Learn
550 5.3.5 Not published by Microsoft. RFC 3463 defines the class as a system not configured in a manner that permits it to accept this message RFC 3463

Confirm the fix worked

  1. A test message to the affected address is delivered once, with a single set of Received headers.
  2. Get-Mailbox and Get-InboxRule show no forwarding or redirect remaining on the mailbox that was looping.
  3. The tracking log shows one DELIVER event for the recipient, not a series of TRANSFER events between the same two hosts.
  4. Get-AcceptedDomain shows the domain authoritative on exactly one system.
  5. Queue depth returns to normal and no new loop reports appear over the following day.

Questions people ask about this

Is there anything to buy to fix a mail loop?

No. Every cause is a configuration mistake in forwarding, accepted domains, connectors, DNS or group membership, and every fix is free.

Can I raise the loop limit to get an urgent message through?

Not usefully. A looping message loops again at a higher number, only slower and with more copies in the queue. Send it directly to the final recipient address instead, bypassing whatever is redirecting it.

Why do I get 5.4.6 and my colleague gets 5.4.14?

Because the two are generated by different systems for the same condition. On-premises Exchange Server produces 5.4.6, which is why it turns up in hybrid organisations, and Exchange Online produces 5.4.14.

How do I read Received headers?

In Outlook, open the message and view its internet headers through message properties. They are stacked newest first, so read from the bottom upwards to follow the message forwards through time.

Why does the loop only affect one user?

Because loops are usually per-recipient. A forwarding address, an inbox rule or one group membership affects only mail addressed to that object, which is why the rest of the organisation is unaffected.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

License Error Error -1018 JET_errReadVerifyFailure: page checksum damage in a mailbox database License Error HCW8078: the hybrid migration endpoint could not be created by the wizard Free Fix HTTP 404.0 on Autodiscover: Outlook cannot retrieve its own configuration License Error Event ID 9646: a client blew past the Exchange session or object limit
โ† Back to Knowledge Base