Fix email delivery issues for error code 5.4.6 through 5.4.20 in Exchange Online

It's frustrating when you get an error after sending an email message. This topic describes what you can do if see the error codes 5.4.6 through 5.4.20 in a non-delivery report non-delivery report (also known as an NDR, bounce message, delivery status notification, or DSN).

Why did I get this bounce message?

There can be several causes for error code 5.4.6, but a likely cause is if the message hop count is exceeded or the route the message is delivered through is broken. Some causes and solutions are provided in this topic. The information here applies to a range of error codes 5.4.6 through 5.4.20.

Use the information in the NDR to help you decide how to fix the problem.

Email user icon I got this bounce message. How do I fix it? Email admin icon I'm an email admin. How do I fix this?

I got this bounce message. How do I fix it?

Typically, the issues that cause error codes 5.4.6 through 5.4.20 can only be fixed by an Exchange Online admin and not the average email sender. Contact your email admin and refer them to this information so they can try to resolve the issue for you.

I'm an email admin. How do I fix this?

The most common issues and fixes are described in the following sections.

Accepted domain issues

Verify that the recipient's domain is configured as an authoritative accepted domain in Exchange Online. For more information, see Manage Accepted Domains in Exchange Online.

Hybrid configuration issues

If your domain is part of a hybrid deployment between Exchange and Exchange Online, check the following items based on your configuration.

You route all incoming mail for your hybrid domain through Exchange Online

This error can happen when the MX record for your hybrid domain points to Exchange Online, and the outbound connector that's used to route email from Exchange Online to your on-premises Exchange organization is configured to use DNS routing instead of smart host routing.

To fix the problem, configure a dedicated outbound connector that uses smart host routing and that has your on-premises hybrid server configured as a smart host. The easiest way to fix the problem is to re-run the Hybrid Configuration Wizard in your on-premises Exchange organization. Or, you can verify the configuration of the connector that's used for hybrid by following these steps:

  1. Open the Office 365 portal at https://portal.office.com, and then click Admin > Exchange.

  2. In the Exchange admin center (EAC), click Mail Flow > Connectors. In the Outbound connectors section, select the connector that's used for hybrid, and then click Edit.

  3. On the Delivery tab, verify that Route mail through smart hosts is selected and that the correct IP address or FQDN is specified for the smart host in your on-premises Exchange organization.

You route all outgoing mail from Exchange Online through your on-premises hybrid server

This configuration is controlled by the value of the RouteAllMessagesViaOnPremises parameter on the outbound connector that's used for hybrid. When the value of this parameter is $true, you're routing all outgoing mail from Exchange Online through your on-premises hybrid server. You can verify this value by running the following command in Exchange Online PowerShell:

Get-OutboundConnector -Identity "<Connector Name>" | Format-List Name,RouteAllMessagesViaOnPremises

In this configuration, the error is caused by either of the following issues on the inbound connector from your on-premises Exchange organization to Exchange Online:

  • You don't have an inbound connector that has the Connector Type value On-premises.

  • The inbound connector is scoped to one or more accepted domains.

To fix the problem, configure a dedicated inbound connector that has the Connector Type value On-premises* and that's not scoped to any accepted domains. The easiest way to fix the problem is to re-run the Hybrid Configuration Wizard in the on-premises Exchange organization. Or, you can verify the configuration of the Inbound connector that's used for hybrid by following these steps:

  1. Open the Office 365 portal at https://portal.office.com, and then click Admin > Exchange.

  2. In the EAC, click Mail Flow > Connectors. In the Inbound connectors section, select the connector that's used for hybrid, and then click Edit Edit icon. Verify the following information:

    • General: Verify that On-premises is selected.

    • Scope: Verify that Accepted domains is empty.

For more information about mail routing in hybrid deployments, see Transport routing in Exchange hybrid deployments.

Causes for NDR 5.4.6 and what does this error mean?

There are two likely possibilities:

  • Based on the domain in the recipient's email address, your Exchange Online organization accepted the message, but then couldn't correctly route the message to the recipient. This is likely caused by accepted domain configuration issues.

  • In hybrid environments, there are misconfigured connectors in your Exchange Online organization.

The NDR for this specific error might contain some or all of the following information:

  • User information section

    • Delivery has failed to these recipients or groups:

      <email addresses>

      A problem occurred while delivering this message to this email address. Try sending this message again.

    • The outbound connection attempt was not answered because either the remote system was busy or it was unable to take delivery of the message.

  • Diagnostic information for administrators section

    • #5.4.6 smtp;554 5.4.6 Hop count exceeded - possible mail loop> #SMTP#

Still need help with error codes 5.4.6 through 5.4.20?

Get help from the Office 365 community forums

Admins: Sign in and create a service request

Admins: Call Support

See also

Email non-delivery reports in Exchange Online