← Blog/Authentication

SMTP error 502 5.5.1: command not implemented

October 15, 2026·5 min read·By MailPilot

502 5.5.1 is a 5yz permanent failure paired with 5.5.1, which RFC 3463 defines as "command

not implemented". The receiving SMTP server understood the connection but does not support a

specific command the client issued — this happens at the protocol level, before your message

content is ever evaluated.

A real transcript

EHLO yourdomain.com
250-mx.example.com
250-SIZE 35882577
250-8BITMIME
250 STARTTLS
STARTTLS
220 2.0.0 Ready to start TLS
MAIL FROM:<you@yourdomain.com>
250 2.1.0 Sender OK
RCPT TO:<recipient@example.com>
250 2.1.5 Recipient OK
VRFY recipient@example.com
502 5.5.1 Command not implemented

In this example VRFY (an old recipient-verification command) is the one rejected — most modern

servers disable it deliberately for privacy and anti-harvesting reasons. The same code shows up for

any command the client sends that the server's EHLO capability list did not advertise.

How different servers report an unsupported command

Server/providerTypical wordingUsual trigger
Gmail / Google Workspace502 5.5.1 Unrecognized commandNonstandard or malformed command verb
Microsoft 365502 5.5.1 Invalid command, or sequence of commandsOverlaps with 503-style sequencing issues in practice
Generic Exim/Postfix502 Command not implemented (base code only, no enhanced status)Older servers often omit the x.y.z suffix entirely

The last row matters for anyone parsing logs: not every server sends the enhanced status code at

all, so code that assumes 5.5.1 will always be present after 502 will miss a meaningful share

of real-world replies.

Who is at fault

The sending client or library, in essentially all cases. Something in your SMTP implementation

— a hand-rolled script, an outdated library, or a misconfigured relay — is issuing a command the

destination server does not support, usually because it was never advertised in the EHLO

response in the first place.

Diagnose it yourself

  1. Capture the full SMTP transcript, including the EHLO response that lists supported

extensions. With openssl s_client -starttls smtp -connect mx.example.com:25 you can step

through the session by hand and see the exact capability list before issuing any command.

  1. Compare the command set your client sends against the advertised `EHLO` capability list —

grep your client library's source or debug output for the literal command verb it issues right

before the 502.

  1. Check whether the command is optional or deprecated (VRFY, EXPN, or a vendor-specific

extension) — RFC 5321 marks several commands as optional, and a compliant server is free to

reply 502 to any of them.

  1. Reproduce with a minimal manual session — strip your script down to the bare EHLO,

MAIL FROM, RCPT TO, DATA sequence and confirm that succeeds before reintroducing whichever

extra command triggered the failure.

How to diagnose the problem

Step 1: Review the full error message

The text after 502 5.5.1 sometimes names the offending command directly; read it before assuming

which command failed.

Step 2: Check SMTP command logs

If your sending library has a debug or verbose mode, enable it for one send and capture the exact

command sequence transmitted.

Step 3: Compare client and server SMTP settings

Confirm your client is not hardcoded to assume a capability (such as a specific AUTH mechanism or

pipelining) without checking the server's EHLO response first.

Fixes and workarounds for SMTP Error 502 5.5.1

  1. Update your email client or library to a current version — this error is common with old,

hand-rolled SMTP code that hardcodes a command sequence instead of negotiating capabilities.

  1. Remove or make conditional any command not universally supported, falling back gracefully

when a server's EHLO response does not list it.

  1. Switch to supported alternatives — if your code relies on VRFY for address validation, use

actual delivery attempts or a dedicated verification service instead; no modern receiving server

should be expected to support it.

What not to do

  • Do not treat this as a deliverability or reputation problem — it has nothing to do with your

domain's sending history or your message content, and "warming up" a mailbox will not fix a

protocol mismatch.

  • Do not retry the exact same command against the same server expecting a different result; the

server does not implement it and will not start to, regardless of how many times you ask.

  • Do not disable TLS or authentication to work around it — the fix is almost always to stop

sending the unsupported command, not to weaken the connection, and disabling TLS introduces a

real security regression for zero benefit here.

MailPilot's integrations use standard, well-supported SMTP/IMAP flows for the providers it

connects to (SendGrid, Amazon SES, Mailgun, Postmark, and custom SMTP), so this class of

protocol-level error is not something warm-up traffic through MailPilot triggers — it is worth

checking first in any custom sending code you run outside it.

MailPilot

Ready to reach the inbox every time?

Automated email warmup across real peer mailboxes. Live inbox placement monitoring. Free 7-day trial - no credit card required.

Start free trial
Reach the Inbox, Every Time
Connect unlimited inboxes for warmup. Free 7-day trial, no credit card.
Try for Free
WORKS WITH
OZOHO
inbox placement99.2%
free trial7-day
companies trust us340+

Start for free - no credit card required.

Get started freeBook a demo