Blazalek.com

5.5.4Invalid command arguments

A mail system permanently rejected a valid protocol command because its arguments were invalid. Do not retry the same attempt without changing the arguments or conditions that caused the rejection.

Category
Delivery protocol
Class
Permanent failure
Retry
Do not retry unchanged
Suppression
Check the full context

What this code means

A mail system permanently rejected a valid protocol command because its arguments were invalid. Do not retry the same attempt without changing the arguments or conditions that caused the rejection.

Technical meaning

The X.5.4 pattern means that a valid mail transaction protocol command was issued with invalid arguments: the arguments were out of range or represented unrecognized features. The T0 registry says this detail is useful only as a permanent error, and the concrete 5.5.4 code has the corresponding class 5.

Delivery status

The leading digit 5 denotes a permanent failure for the current message in this context. The code alone identifies neither the exact command nor argument, does not distinguish an out-of-range value from an unrecognized feature, and does not establish that the recipient address is invalid.

Class
Permanent failure
Retry
Do not retry unchanged
Suppression
Check the full context

Retry decision

Operational recommendation: stop automatic and manual retries of the same unchanged attempt. Consider a new send only after the argument or feature compatibility has demonstrably been corrected, or the relevant configuration has materially changed; first check suppression state again and use idempotency.

Suppression decision

Operational recommendation: do not add the address to a suppression list based on 5.5.4 alone because the code describes a protocol-command argument, not mailbox status. Inspect the full response, command, arguments, system returning the code, and other permanent events, then suppress only according to the established cause and applicable policy.

Common causes

  • An argument to a valid mail transaction protocol command was outside the range accepted by the system that returned the code.
  • An argument to a valid command represented a feature that the system returning the code did not recognize.

Diagnostic steps

  1. Inspect the raw SMTP response or delivery report and confirm that the enhanced code is exactly 5.5.4 and that the basic reply is in the 5xx class; retain the complete original response text.
  2. Correlate the response with the intended message, attempt time, system that returned the code, and exact command and arguments; also retain the transaction state before the command.
  3. Use the trace, logs, and documented system capabilities to determine whether an argument was out of range or represented an unrecognized feature. If the response identifies HELO/EHLO, inspect an empty or invalid domain argument and, in the context of the accepted Microsoft example, connection restrictions as well; do not generalize those practices to every 5.5.4 case.
  4. Stop unchanged retries; before any new send, confirm that the established cause has been corrected and check suppression state again.

Actions by owner

Sender administrator

  • Retain the full response, command, exact arguments, and preceding transaction trace, then correct the confirmed out-of-range argument or use of an unrecognized feature.
  • Stop retries in the unchanged context; permit a new send only after a confirmed correction and another suppression check.

Provider

  • For the specified time and system, inspect logs, argument constraints, and supported features to establish which argument was rejected and why.
  • Correct any confirmed defect in the managed implementation, or give the sender administrator the accepted range or supported feature needed for correction; preserve the exact code and response context.

Verified provider examples

The accepted Gmail examples at the HELO stage read exactly: «501 5.5.4 HELO/EHLO argument “...” invalid, closing connection. 501 5.5.4 https://support.google.com/mail/?p=helo» and «501 5.5.4 Empty HELO/EHLO argument not allowed, closing connection. 501 5.5.4 https://support.google.com/mail/?p=helo». The accepted Microsoft Exchange Server example for EHLO validation reads exactly: «501 5.5.4 Invalid domain name». These are practices of specific products, not the standards definition of X.5.4. Only the accepted Microsoft evidence additionally describes invalid characters in the domain name or connection restrictions and recommends correcting the EHLO argument and checking destination connection restrictions.

Gmail SMTP · SMTP 501

Exact SMTP response

501 5.5.4 HELO/EHLO argument “...” invalid, closing connection.
501 5.5.4 https://support.google.com/mail/?p=helo
Gmail SMTP · SMTP 501

Exact SMTP response

501 5.5.4 Empty HELO/EHLO argument not allowed, closing connection.
501 5.5.4 https://support.google.com/mail/?p=helo
Microsoft Exchange Server SMTP EHLO validation · SMTP 501

Exact SMTP response

501 5.5.4 Invalid domain name

Sources and verification

The canonical T0 meaning of X.5.4, its note about permanent-error-only use, and the assignment of code 5.5.4 to class 5 were verified against the IANA registry and RFC 2034, RFC 3463, and RFC 5248. The exact Gmail practice examples come from accepted evidence gmail-ph01-123 and gmail-ph01-124, while the Microsoft practice example and explanation come from p03-b04-microsoft-x-5-4-001. The sources were verified on July 17, 2026; retry, diagnostic, and suppression guidance is presented separately as operational advice.

  • Enumerated Status Codes / X.5.4

  • rfc5248T0 source

    Section 2.1: registry fields and non-exclusive Associated Basic Status Code

  • rfc2034T0 source

    Section 4: enhanced status class agrees with SMTP reply class

  • rfc3463T0 source

    IANA registry reference for X.5.4

  • Section 'You get a HELO/EHLO error message', second code block (rendered lines 124-125)

  • Section 'You get a HELO/EHLO error message', first code block (rendered lines 121-122)

  • Step 4 > EHLO command: exact failure response

Last verified:

Wojtek Blazalek

Email deliverability expert

Stuck on this error code? I help teams clear the root cause of rejections and fix authentication and reputation — so email lands in the inbox.

Hands-on deliverability work for teams that send at scale.