554 5.4.6: A mail loop was detected

At a glance

The message went round in a loop. Two or more servers, or forwarding rules, kept passing it between them until one of them counted too many hops and stopped it.

What it means

RFC 3463 §3.5 defines X.4.6 as "routing loop detected": the message was forwarded too many times, because of incorrect routing tables or a forwarding loop set up by users. The RFC describes it as a transient code, but Gmail sends it as a permanent 554: retrying a message that is stuck in a loop would only repeat the loop. The basic code 554 says the transaction failed (RFC 5321 §4.2.3).

Every server that handles a message adds a Received: header. RFC 5321 §6.3 says counting these headers is an effective way to detect loops, recommends a high threshold of normally at least 100 entries, and requires servers to have some way to stop simple loops.

Common causes

How providers use it

How to fix it

  1. Open the bounced message's headers and read the Received: lines from the bottom up. The same two server names repeating show you where the loop is.
  2. Check forwarding on every mailbox involved, including server-side rules and automatic forwarding settings.
  3. Check the recipient domain's MX records and make sure they point to the system that should store the mail, not to a relay that sends it back.
  4. On hybrid or migrated setups, check which system is authoritative for the domain and that connectors send mail in one direction only.
  5. After the fix, send a test and check that the received copy has a normal number of Received: lines.

If the loop involves automatic forwarding to an outside address, the forwarding may also be blocked by policy; see 5.7.520.

See every bounce code in the dictionary.

Many bounces from addresses that do not exist can be avoided: check an address with our free email checker, or clean a whole list before you send.

How we wrote this: drafted by the email-validation.org team with the help of AI writing tools, from our product documentation and the sources linked in the text.

Updated · Maintained by the email-validation.org team