# 554 5.4.6: routing loop detected

URL: https://iblockspam.com/smtp-errors/554-5-4-6
Last updated: 2026-10-09

Code: 554 5.4.6 (permanent failure, the message bounced)
Provider: Standard (RFC)

The message went round in a loop, through forwarding rules or misrouted servers, until a hop limit stopped it.

What the bounce says:

```
554 5.4.6 Message exceeded 50 hops, this may indicate an email loop.
```
Gmail's text, as listed in Google's SMTP errors reference.

RFC 3463 defines X.4.6 as "Routing loop detected": a loop caused the message to be forwarded too many times, either because of incorrect routing tables or a user forwarding loop. RFC 5321 notes that simply counting the Received header fields each hop adds is an effective way to detect loops, and requires servers to detect and stop trivial loops.

Gmail stops a message after 50 hops and returns 554 5.4.6. Microsoft documents the same condition: on-premises Exchange reports 5.4.6 and Exchange Online reports 5.4.14, and by default Exchange interrupts a loop after 20 iterations. Microsoft says loops are typically caused by a configuration error on the sending server, the receiving server or both, and suggests checking mailbox rules for automatic forwarding.

Typical loops: two mailboxes forwarding to each other; an address forwarding to an external account that forwards back; or a domain whose MX points at a server that sends the mail back to the MX (common in hybrid setups and after a migration).

## Common causes

- Two mailboxes or accounts forward to each other.
- An auto-reply or rule creates a message that triggers another rule.
- A server is set to relay a domain to a host that sends it back (common after migrations).
- Wrong connector or smart host settings in a hybrid setup.

## How to fix it (sender)

- Usually not your problem: tell the recipient, including the bounce with its Received headers.

## How to fix it (recipient or admin)

- Check forwarding settings and inbox rules on the mailbox and any address it forwards to.
- Read the Received headers in the bounce to see which servers the message bounced between.
- Check connectors, smart hosts and MX records, especially after a migration.

**Q: How do I find where the loop is?**
Open the bounce and read the Received headers of the returned message. You'll see the same servers or addresses repeating; the place where the path turns back is where the misconfiguration is.

**Q: What's the difference between 5.4.6 and 5.4.14?**
Both report a loop. Microsoft says on-premises Exchange reports 5.4.6 (which you see in hybrid setups) and Exchange Online reports 5.4.14.

Sources:
- RFC 3463: Enhanced Mail System Status Codes: https://www.rfc-editor.org/rfc/rfc3463
- RFC 5321, section 6.3: Loop detection: https://www.rfc-editor.org/rfc/rfc5321#section-6.3
- Gmail SMTP errors and codes (Google Workspace Admin Help): https://knowledge.workspace.google.com/admin/support/troubleshooting/gmail-smtp-errors-and-codes
- Email nondelivery reports (NDRs) and SMTP errors in Exchange Online (Microsoft Learn): https://learn.microsoft.com/en-us/troubleshoot/exchange/email-delivery/ndr/non-delivery-reports-in-exchange-online

---

Source: iBlockSpam, https://iblockspam.com/smtp-errors/554-5-4-6 (this is a Markdown copy; the HTML page is canonical). Quote with attribution and a link. Site index for AI assistants: https://iblockspam.com/llms.txt
