TL;DR
A valid SMTP command was rejected because its arguments were invalid for this session. Adjust command parameters or session state: do not blindly retry. Permanent failure; fix configuration to avoid repeated protocol rejects that providers may treat as abusive.
What this code means
Rejected arguments on an otherwise syntactically valid mail-transaction command yield code 5.5.4 under pattern X.5.4: the arguments were out of acceptable range or named an unrecognized feature. Permanent refusal for this message is what class 5 denotes. The code does not expose the command name, offending argument, or whether range or feature mismatch triggered the reply, and it does not invalidate the recipient address.
Provider examples
501 5.5.4 HELO/EHLO argument “...” invalid, closing connection.
501 5.5.4 https://support.google.com/mail/?p=helo501 5.5.4 Empty HELO/EHLO argument not allowed, closing connection.
501 5.5.4 https://support.google.com/mail/?p=helo501 5.5.4 Invalid domain namesmtp;554 Message not allowed - [PH01] Email not accepted for policy reasons. Please visit https://postmaster.yahooinc.com/error-codes501 5.5.4 HELO/EHLO argument argument invalid closing connection. For more information, go to HELO/EHLO email error. - gsmtp501 5.5.4 Empty HELO/EHLO argument not allowed, closing connection. For more information, go to HELO/EHLO email error. - gsmtpTechnical meaning
Invalid arguments on an otherwise valid mail transaction protocol command define X.5.4: 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
- 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.
- 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.
- 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.
- 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.
Sources
These sources define what this enhanced status code means, mainly through the IANA registry and related RFCs. When provider examples appear on the page, they come from that provider's published documentation. Follow the links to read the original wording in context.
- SMTP Enhanced Status Codes — IANA registry of enhanced mail system status codes.
- RFC 5248 — A Registry for SMTP Enhanced Mail System Status Codes — Creates and governs the IANA enhanced status code registry.
- RFC 2034 — SMTP Service Extension for Returning Enhanced Error Codes — Defines how SMTP returns enhanced status codes to clients.
- RFC 3463 — Enhanced Mail System Status Codes — Defines the class/subject/detail model for enhanced status codes.
- Fix bounced or rejected emails — Gmail Help guide for diagnosing bounced and rejected messages.
- Use Telnet to test SMTP communication on Exchange servers — Microsoft Learn guide for testing Exchange SMTP with Telnet.
- SMTP Field Manual (community corpus) — Community-maintained reference of provider SMTP responses, pinned locally as evidence.
- Gmail SMTP errors and codes — Official Gmail Help table of SMTP error messages and status codes.
Last verified:

