Bobcares

Email error 554 5.4.0 – What is it, and what are its causes

by | Sep 1, 2018

554 5.4.0‘ is a email bounce error that is usually seen after a server migration or a mail server reconfiguration.

Here at Bobcares.com, we help hosting providers (web hosts, VPS hosts, etc.) resolve such errors as part of our Outsourced Tech Support services.

A typical email bounce looks like this:

host xxx.xxx.xxx.xxx[yyy.yyy.yyy.yyy] said: 554 5.4.0 id=03742-03-6 - Rejected by next-hop MTA on relaying, from MTA(smtp:[zzz.zzz.zzz.zzzz]:31142): 554 5.4.0 Error: too many hops (in reply to end of DATA command)

 

What is mail error 554 5.4.0?

In a normal mail delivery, mail goes from sender, to the sending MX, to the recipient’s MX and then to the receiver. That is 2 “hops”.

 

A simple mail transfer. First hop to sender MX. Second hop to receiver MX.

That said, there can be additional servers in between for anti-spam, corporate gateway, load balancers, etc.

It means there could be more hops (up to 10 or 15) based on how the sender and receiver SMTP servers are configured.

However, server misconfigurations are known to cause mails to be stuck in a loop – that is mail keep going in circles between servers, and never get delivered to the recipient.

To prevent such “loops” most mail servers discard (aka bounce) a mail if there are 20 or more “hops”.

Error 554 5.4.0 is used to denote such a situation.

 

What causes error 554 5.4.0?

A normal healthy mail system should be able to deliver a mail within 20 hops.

However, that limit can get exhausted when:

  • Mail gets stuck in a sending loop – We’ve seen improperly configured sender MX or mail gateways forwarding mails back to the sender, causing a mail loop.
  • Too many headers are added by intermediate servers – Anti-spam servers or gateway clusters can inject too many headers that’ll be interpreted as a mail loop.

Let’s take a look at these points in more detail.

 

1. Mail loop within Sender’s MX or Gateway

All mail systems depend on destination “pointers” that show where the destination mailbox is.

These pointers include DNS records, mail user databases, host entries, and more.

In a perfectly working system, these pointers route mail perfectly to the destination server.

But all that can break during a mail system overhaul, and direct the mail elsewhere or inwards to the sending server itself.

We’ve seen such situations during:

– DNS & Mail routing errors after hosting account transfers

When a website is transferred to a new server, its MX DNS records and SMTP routing data need to be changed. We’ve seen cases where these changes do not happen – either due to software errors, or due to customized settings that broke during migration. It leads to mail to be bounced between the old and new servers.

– Mail config errors after server migrations

During server upgrades or infrastructure migrations, mail servers may need to be reconfigured with new IPs and routing tables. We’ve seen issues where routing tables were misconfigured which caused mails to keep connecting back to the sender server, thereby creating a loop.

– Gateway or anti-spam server installation/upgrades

Some companies put a separate anti-spam server or a mail gateway to improve mail filtering. But if the DNS settings and outgoing mail routes are not configured correctly, mails will bounce between the sender’s MX and the gateway.

To resolve these issues, we enable debugging, and trace the error to the exact setting that’s causing the failure.

If you suspect your mail server config is at fault and need help troubleshooting this error, click here to talk to our server experts. We are online 24/7 and can help you within minutes.

 

2. Too many headers added by intermediate servers

A “Received:” header gets added to a message whenever it passes through a mail server, mail gateway or an anti-malware program.

To prevent mail loops (that is mail never getting delivered), mail servers bounce a mail if the number of “Received:” headers cross 20.

An example of such an error is:

Too many "Received" headers - suspected mail loop

In almost all cases, this error could point to an actual mail loop as we’ve discussed in the previous point.

But there are systems where a mail is processed by many different programs and can inject more than 20 headers.

For eg. the mail will first go to the sender’s MX, then a spam filter, an anti-virus, a DNSBL check tool, a routing server and a mail gateway. All this can add up to 10 “Received:” headers. If the receiving mail server is also similarly configured, the mail could be categorized as a loop.

In such cases, we configure the security tools to print less headers and by combining all functions (antispam, antivirus, external DB check, etc.) into a single tool.

 

Conclusion

Mail error 554 5.4.0 can be caused due to improper mail server configuration or anti-spam tool configuration. Here we’ve discussed the two main causes for this error, and how we fix them. If you are having a hard time figuring out the exact cause for this failure then click here to talk to our server experts and get a quick fix for your issue.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure./p>

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF