Error 554 5.4.14

Error 554 5.4.14: Hop Count Exceeded - Fix Guide 2025

Complete troubleshooting guide for Exchange Server Error 554 5.4.14 indicating maximum hop count exceeded. Learn how to identify mail routing loops, fix send connector configurations, and restore normal message delivery.

Medha Cloud
Medha Cloud Exchange Server Team
Exchange Database Recovery Team12 min read

Table of Contents

Reading Progress
0 of 9

Error 554 5.4.14 Hop Count Exceeded indicates Exchange detected a mail routing loop that would cause messages to circulate endlessly between servers. Exchange stops the message after 50 hops to prevent infinite loops and resource exhaustion. This guide shows you how to identify the loop, trace the routing path, and fix the underlying configuration issue.

Our Exchange Mail Flow Services team resolves routing loops quickly by analyzing message headers and connector configurations. This guide provides the same diagnostic process we use.

Error Overview: Understanding Hop Count

Every time an email passes through a mail server, that server adds a "Received" header and increments the hop count. Exchange allows a maximum of 50 hops by default. If a message reaches this limit, it's rejected with error 554 5.4.14 and returned as an NDR (Non-Delivery Report).

Typical NDR Message
Delivery has failed to these recipients or groups:

user@external-domain.com

The maximum hop count was exceeded for the message. This usually
indicates a mail loop between servers or an incorrect mail routing
configuration.

Diagnostic information for administrators:
Generating server: mail.company.com

#554 5.4.14 Hop count exceeded - possible mail loop ##5.4.14 Hop count exceeded - possible mail loop ##

How Mail Loops Happen

Server A
forwards to
Server B
forwards to
Server A

Loop Detected: Message bounces between servers until hop limit reached

Symptoms & Business Impact

What Users Experience:

  • NDR returned with "554 5.4.14 Hop count exceeded"
  • Emails to specific domains or recipients always bounce
  • Internal emails between certain mailboxes fail
  • Delayed NDRs (loop runs until timeout, then bounces)

What Admins See:

  • Transport queues growing with messages to same destinations
  • High CPU/memory on transport servers processing loops
  • Event ID 2004 indicating mail flow issues
  • Large number of NDRs in postmaster mailbox

⚠️ Business Impact: Mail loops consume server resources and can degrade overall mail flow performance. All messages caught in the loop bounce, causing potential communication failures with customers or partners. Fix routing loops immediately.

Common Causes of Hop Count Exceeded

1. Misconfigured Send Connector (40% of cases)

Most Common Cause: Send connector address space overlaps with accepted domains, causing Exchange to route outbound mail back to itself.

Identified by: Send connector for "*" or specific domain routes mail back to Exchange

2. Incorrect Smart Host Configuration (25% of cases)

Relay Issue: Smart host points back to the Exchange server, or smart host is misconfigured to relay back to Exchange.

Identified by: Smart host IP resolves to Exchange server or forwards mail back

3. Hybrid/Coexistence Routing Problems (20% of cases)

Migration Issue: Mail flow connectors between on-premises and Exchange Online create loops during hybrid migrations.

Identified by: Messages loop between on-premises and Microsoft 365

4. Forwarding Rule Loops (10% of cases)

User Configuration: Mailbox forwarding rules create loops between mailboxes that forward to each other.

Identified by: Specific user mailboxes involved in every loop instance

5. Third-Party Email Gateway Issues (5% of cases)

Infrastructure Problem: Spam filter, email gateway, or load balancer misconfigured to route mail back to source.

Identified by: Third-party server appears in Received headers repeatedly

Quick Diagnosis: Trace the Loop

📌 Version Compatibility: This guide applies to Exchange 2016, Exchange 2019, Exchange 2022. Commands may differ for other versions.

Step 1: Analyze Message Headers from NDR
# Get the NDR message and extract headers
# Look for repeating Received: headers - this shows the loop

# Example header analysis:
# Received: from server-b.company.com (10.0.0.2) by server-a.company.com10.0.0.2) by server-a.company.com
# Received: from server-a.company.com (10.0.0.1) by server-b.company.com10.0.0.1) by server-b.company.com
# Received: from server-b.company.com (10.0.0.2) by server-a.company.com10.0.0.2) by server-a.company.com
# ...pattern repeats...

# Use Message Tracking to find the loop
Get-MessageTrackingLog -Start (Get-Date).AddHours(-4) -EventId "FAIL" |
    Where-Object {$_.Recipients -like "*554 5.4.14*"5.4.14*" -or $_.RecipientStatus -like "*5.4.14*"4.14*"} |
    Select-Object Timestamp, Sender, Recipients, MessageSubject
Step 2: Check Send Connector Configuration
# List all send connectors and their address spaces
Get-SendConnector | Format-List Name,AddressSpaces,SmartHosts,SourceTransportServers

# Check for overlapping address spaces with accepted domains
$accepted = Get-AcceptedDomain | Select-Object -ExpandProperty DomainName
$connectors = Get-SendConnector | Select-Object Name,AddressSpaces

foreach ($conn in $connectors) {
    foreach ($space in $conn.AddressSpaces) {
        if ($space.Domain -in $accepted -or $space.Domain -eq "*") {
            Write-Warning "Connector '$($conn.Name)' routes to accepted domain: $($space.Domain)"$space.Domain)"
        }
    }
}
Step 3: Check for Forwarding Loops
# Find mailboxes with forwarding enabled
Get-Mailbox -ResultSize Unlimited | Where-Object {
    $_.ForwardingAddress -ne $null -or $_.ForwardingSmtpAddress -ne $null
} | Format-Table DisplayName,ForwardingAddress,ForwardingSmtpAddress

# Check inbox rules that forward mail
Get-Mailbox -ResultSize Unlimited | ForEach-Object {
    $rules = Get-InboxRule -Mailbox $_.Identity -ErrorAction SilentlyContinue |
        Where-Object {$_.ForwardTo -ne $null -or $_.RedirectTo -ne $null}
    if ($rules) {
        Write-Host "Mailbox: $($_.DisplayName)"
        $rules | Format-Table Name,ForwardTo,RedirectTo
    }
}
Step 4: Test Mail Flow
# Test mail flow to the affected destination
$testAddress = "recipient@external-domain.com"
Test-Mailflow -TargetEmailAddress $testAddress

# Get detailed routing information
Get-RoutingGroupConnector
Get-TransportService | Get-InternalSmtpServers

Quick Fix (15 Minutes) - Fix Send Connector

⚠️ Use this if:

  • Send connector address space includes "*" or an accepted domain
  • Smart host configuration points back to Exchange
  • Loop started after connector configuration change

Solution: Fix Send Connector Routing

Correct Send Connector Address Space
# Identify the problematic connector
Get-SendConnector | Format-List Name,AddressSpaces,SmartHosts

# Remove accepted domain from send connector (if incorrectly included)
# First, get current address spaces
$connector = Get-SendConnector "Internet Connector"
$connector.AddressSpaces

# Set correct address space (route to internet, not to yourself)
# Option 1: Route all external mail via smart host
Set-SendConnector "Internet Connector" -AddressSpaces "SMTP:*;1" -SmartHosts "smtp.emailprovider.com"

# Option 2: Use DNS for external routing (no smart host)
Set-SendConnector "Internet Connector" -AddressSpaces "SMTP:*;1" -DNSRoutingEnabled $true -SmartHosts $null

# Verify change
Get-SendConnector "Internet Connector" | Format-List Name,AddressSpaces,SmartHosts,DNSRoutingEnabled

✅ Expected Result:

  • No more 554 5.4.14 NDRs for the affected destinations
  • Transport queues drain normally
  • Test-Mailflow completes successfully

Detailed Solution: Complex Loop Scenarios

Scenario 1: Smart Host Loop

Fix Smart Host Configuration
# Check current smart host
Get-SendConnector | Format-List Name,SmartHosts

# Verify smart host doesn't resolve back to Exchange
$smartHost = "smtp.relay.com"
Resolve-DnsName $smartHost

# If smart host was pointing to Exchange, fix it
Set-SendConnector "Outbound to Internet" -SmartHosts "correct-relay.emailprovider.com"

# Or remove smart host and use DNS
Set-SendConnector "Outbound to Internet" -SmartHosts $null -DNSRoutingEnabled $true

# Test the fix
Send-MailMessage -From "test@company.com" -To "test@external.com" -Subject "Loop Test" -SmtpServer localhost

Scenario 2: Hybrid Configuration Loop

Fix Hybrid Mail Flow
# Check hybrid send connectors
Get-SendConnector | Where-Object {$_.Name -like "*O365*" -or $_.Name -like "*Microsoft 365*"} |
    Format-List Name,AddressSpaces,SmartHosts

# Check inbound connector from O365
Get-InboundConnector | Format-List Name,SenderDomains,TlsSenderCertificateName

# Verify connectors don't create loop
# Outbound to O365 should route cloud domains
# Inbound from O365 should route on-prem domains only

# Re-run Hybrid Configuration Wizard if needed
# This reconfigures connectors correctly

Scenario 3: Forwarding Rule Loop

Break Forwarding Loop
# Find the forwarding loop
# User A forwards to User B, User B forwards to User A

# Disable forwarding on one mailbox to break the loop
Set-Mailbox "UserA" -ForwardingAddress $null -ForwardingSmtpAddress $null

# Or remove the problematic inbox rule
Get-InboxRule -Mailbox "UserA" | Where-Object {$_.ForwardTo -ne $null} | Disable-InboxRule

# To prevent future loops, disable forwarding to external addresses
Set-RemoteDomain Default -AutoForwardEnabled $false

Scenario 4: Third-Party Gateway Loop

Fix External Gateway Configuration
# If spam filter or gateway is causing the loop:
# 1. Check MX records point to correct gateway
Resolve-DnsName -Name company.com -Type MX

# 2. Verify gateway forwards to correct Exchange server
# Check gateway configuration (vendor-specific)

# 3. Ensure Exchange doesn't route back to gateway for internal mail
Get-TransportConfig | Format-List InternalSMTPServers

# 4. Add gateway to internal servers if needed
Set-TransportConfig -InternalSMTPServers @{Add="10.0.0.50"0.0.50"}  # Gateway IP

💡 Pro Tip: Use Microsoft Remote Connectivity Analyzer (testconnectivity.microsoft.com) to test outbound mail flow. It provides detailed routing information that helps identify where the loop occurs.

Verify the Fix

Verification Commands
# 1. Test mail flow to previously failing destination
Test-Mailflow -TargetEmailAddress "user@external-domain.com"

# 2. Send test message and verify delivery
Send-MailMessage -From "admin@company.com" -To "test@external-domain.com" -Subject "Loop Fix Test" -Body "Testing mail flow after loop fix" -SmtpServer localhost

# 3. Check message tracking for successful delivery
Get-MessageTrackingLog -Start (Get-Date).AddMinutes(-10) -Sender "admin@company.com" |
    Format-Table Timestamp,EventId,Source,Recipients,RecipientStatus

# 4. Monitor for new 554 5.4.14 errors554 5.4.14 errors
Get-MessageTrackingLog -Start (Get-Date).AddHours(-1) -EventId "FAIL" |
    Where-Object {$_.RecipientStatus -like "*5.4.14*"4.14*"} | Measure-Object

# 5. Check transport queues are draining
Get-Queue | Format-Table Identity,Status,MessageCount

✅ Success Indicators:

  • Test messages deliver without 554 5.4.14 errors
  • No new hop count exceeded entries in message tracking
  • Transport queues processing normally
  • Users report previously bouncing emails now deliver

Prevention: Avoid Mail Routing Loops

1. Connector Configuration Best Practices

  • Never include accepted domains in outbound send connector address spaces
  • Verify smart host IPs don't resolve back to Exchange servers
  • Document all connector configurations and review before changes
  • Use explicit address spaces rather than wildcards when possible

2. Test Before Production

Pre-Change Validation
# Before changing connectors, test mail flow
Test-Mailflow -TargetEmailAddress "user@external-domain.com"

# Document current configuration
Get-SendConnector | Export-Csv "SendConnectors_Backup.csv"
Get-ReceiveConnector | Export-Csv "ReceiveConnectors_Backup.csv"

# After changes, immediately test
Send-MailMessage -To "test@external.com" -Subject "Connector Change Test" -SmtpServer localhost

3. Monitor for Loop Indicators

  • Alert on 554 5.4.14 NDRs in postmaster mailbox
  • Monitor transport queue lengths for abnormal growth
  • Set up Event ID 2004 alerts for mail flow issues

4. Restrict User Forwarding

  • Disable automatic forwarding to external addresses
  • Use transport rules to block forwarding loops
  • Audit mailbox forwarding settings regularly

Complex Routing Loop?

If the routing loop involves multiple servers, third-party gateways, or hybrid configurations, our Exchange mail flow specialists can trace the complete routing path and implement fixes without disrupting legitimate mail flow.

Get Mail Flow Expert Support

Average Resolution Time: 45 Minutes

Frequently Asked Questions

Error 554 5.4.14 occurs when an email message passes through more than the maximum allowed number of mail servers (hops) before delivery. The default limit is 50 hops. This usually indicates a routing loop where servers keep forwarding the message back and forth endlessly.

Can't Resolve Error 554 5.4.14?

Exchange errors can cause data loss or extended downtime. Our specialists are available 24/7 to help.

Emergency help - Chat with us
Medha Cloud

Medha Cloud Exchange Server Team

Microsoft Exchange Specialists

Our Exchange Server specialists have 15+ years of combined experience managing enterprise email environments. We provide 24/7 support, emergency troubleshooting, and ongoing administration for businesses worldwide.

15+ Years ExperienceMicrosoft Certified99.7% Success Rate24/7 Support