Invalid command
Production Risk
Low — indicates a client implementation issue rather than a delivery problem.
The SMTP client issued a command that is not recognised by the receiving server. This is a protocol-level error indicating a client implementation bug or version mismatch.
- 1The client sent a command not in the server's supported command set.
- 2The client attempted to use an ESMTP extension command without verifying server support via EHLO.
- 3A software bug caused a malformed or unsupported command to be transmitted.
An SMTP client sends an unrecognised or unsupported command during a session.
XUNKNOWNCMD arg # Server returns: 500 5.5.1 Command unrecognized: "XUNKNOWNCMD"
expected output
500 5.5.1 ...
Fix
Check EHLO capabilities before using extended commands
WHEN Building or debugging an SMTP client
# Always parse EHLO response to determine supported extensions: EHLO client.example.com 250-mail.example.com 250-STARTTLS 250-AUTH LOGIN PLAIN 250 HELP # Only use extensions listed in the EHLO response
Why this works
Negotiating capabilities via EHLO before using extended commands ensures compatibility with the server.
✕ Ignore 5.5.1 errors and continue the session
An unrecognised command means the session state may be undefined; the client should handle the error and proceed correctly.
RFC 3463 — Enhanced Mail System Status Codes
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev