Home › Exchange Online › 554 5.4.14

Exchange Online · 554 5.4.14 · Exchange Online / Microsoft 365

Exchange Online NDR 554 5.4.14 Hop Count Exceeded in Exchange Online/Microsoft 365

Root cause: mail routing loop due to incorrect accepted domain type or transport rules. Fix: change accepted domain to Authoritative, modify transport rules, and adjust third-party gateway settings.

Error Details

FactValueSourceNote
Exact error string554 5.4.14 Hop Count ExceededExchange admin center > Mail flow > Message trace-> delivery failure
Affected build rangeExchange Online / Microsoft 365Microsoft documentation
Registry key involved
Relevant service/endpoint URLhttps://testconnectivity.microsoft.com/Remote Connectivity Analyzer-> diagnostic tool
Log line signatureEvent ID 1022 (MSExchangeTransport)Application event log on Exchange server-> message loop detection

Log Files to Check

What This Error Actually Means

The error code "554 5.4.14 Hop Count Exceeded" is raised by Exchange Online when an email message has been routed through more than 30 mail servers (referred to as hops) without being successfully delivered, indicating a potential routing loop within the network infrastructure. This error occurs because each time an email passes through a server, it adds another "Received:" header line to its metadata. When this count exceeds 30, Exchange Online detects that the message is likely stuck in a loop and generates a Non-Delivery Report (NDR) with the specified error code. This issue can occur due to misconfigurations within your organization's email routing setup or third-party services connected to your mail flow, such as email gateways. The NDR will appear both in the sender’s inbox and in Exchange Admin Center (EAC) > Mail flow > Message trace, where you can expand a delivery event to view detailed information about the message's journey.

Affected Versions and Scope

This error is relevant for all versions of Exchange Online and Microsoft 365. It does not affect on-premises deployments of Exchange Server unless they are configured in hybrid mode with Exchange Online, where messages can be routed between both environments. The issue is particularly prevalent in organizations that use third-party email gateways or have complex mail flow rules set up for routing emails internally and externally.

Where To Look First: Logs and Event IDs

To diagnose the root cause of this error, start by examining logs within Exchange Admin Center (EAC) > Mail flow > Message trace. Here, you can find detailed delivery events that include the full message header with all "Received:" lines. Additionally, review the Application event log on your Exchange server for Event ID 1022 (MSExchangeTransport), which indicates a detected message loop. You should also use Microsoft Remote Connectivity Analyzer at https://testconnectivity.microsoft.com/. This tool can help analyze the full header of an NDR and identify problematic routing configurations. The log file containing these events is typically located in the Exchange Server Application Log, where you can filter for Event ID 1022 to find specific instances of message loops.

Root Causes

Accepted Domain Type Misconfiguration

One common cause is an incorrect configuration of accepted domains. If your primary domain is set as "Internal Relay" instead of "Authoritative," Exchange Online will attempt to route messages back to on-premises servers, potentially causing a loop if the on-premises environment also routes back to Exchange Online.

Transport Rules Creating Loops

Another cause involves transport rules that redirect or forward emails in ways that create loops. For example, a rule might redirect all incoming emails from a specific domain to an internal distribution group, which includes the sender's address, thereby causing the message to loop back to itself.

Third-Party Email Gateway Misconfiguration

Misconfigurations within third-party email gateways can also lead to loops. If your organization uses a gateway like Mimecast or Proofpoint and it is configured with catch-all rules that route undelivered mail back to Exchange Online, this can create a loop.

Fix Procedure

  1. Check Accepted Domain Type: In EAC > Mail flow > Accepted domains, ensure the primary domain is set as "Authoritative." If it's set as "Internal Relay," change it to "Authoritative" by clicking on the domain, selecting Edit, and changing the accepted domain type. Save your changes.
  2. Review Transport Rules: Navigate to EAC > Mail flow > Rules and review rules that might create loops. Disable any suspect rules temporarily and re-test message delivery.
  3. Analyze Send Connectors (Hybrid Environment): Use the Exchange Management Shell command Get-SendConnector | Select-Object Name,SmartHosts,AddressSpaces to check your send connectors. Ensure that any connector targeting 'smtp.office365.com' only routes external mail and does not catch internal domains.
  4. Check Journaling Rules: Use the PowerShell command Get-JournalRule in Exchange Online to identify rules that might be causing loops. Disable problematic journaling rules using Disable-JournalRule -Identity <name>.
Disabling journaling rules can impact compliance and auditing, so ensure you have a backup plan before proceeding.

Error Code Variants

Code Description Distinguishing Factors
554 5.3.0 Mailbox Full This error indicates that the recipient's mailbox is full and cannot accept new messages.
554 5.1.1 User Unknown This code means that the recipient address does not exist in your organization.

Verification

To verify that the fix has been successful, send a test message through the previously affected route and monitor its delivery status. Use EAC > Mail flow > Message trace to track the message's journey and confirm it does not exceed 30 hops or generate another NDR with the same error code.

Prevention

To prevent recurrence of this issue, ensure that your accepted domains are correctly configured as "Authoritative" for all primary SMTP domains. Regularly review transport rules to avoid creating loops and ensure third-party email gateways are properly configured not to route mail back into Exchange Online unnecessarily. Implementing a comprehensive monitoring solution can also help detect potential routing issues before they cause widespread delivery problems.
Using the Remote Connectivity Analyzer tool for header analysis provides quick insights into message routing paths, helping you identify loop patterns without deep log diving.

Sources & References

Related Guides

Get new error code fixes by email

Product-specific solutions for Intune, Autopilot, SCCM and Entra ID — straight to your inbox. No spam.