Skip to content
iBlockSpam
SMTP error code · Standard (RFC)

SMTP 501: syntax error in parameters or arguments

501 Permanent failure (5xx): the message bounced
By iBlockSpam Team Checked against sources 3 sources How we check our content
What it means

The server recognized the command but rejected its argument: usually a badly formatted email address or an invalid HELO/EHLO host name.

What the bounce says
501 5.5.4 Empty HELO/EHLO argument not allowed, closing connection.

Start of one of Gmail's 501 texts, as listed in Google's SMTP errors reference.

What 501 means

RFC 5321 defines 501 as "Syntax error in parameters or arguments". Unlike a 500, the command itself was fine: the server objected to what came after it.

The usual suspects are the address in MAIL FROM or RCPT TO and the name in HELO or EHLO. An address with spaces, missing angle brackets, two @ signs or illegal characters gets a 501 from strict servers. Gmail documents 501 5.5.4 for an invalid or empty HELO/EHLO argument and 501 5.5.2 for a response it cannot decode. RFC 5321's size-limit section also shows "501 Path too long" as an example reply.

If people get a 501 when sending from an email program, check the recipient address for typos and stray characters first. If an application or device gets it, check how it names itself in HELO/EHLO: it should send its own fully qualified host name, not an empty value or a bare word.

Likely causes

  • A recipient or sender address with invalid characters, spaces or missing brackets.
  • An empty or invalid HELO/EHLO host name.
  • An address or path longer than the server accepts.
  • A malformed authentication response.

How to fix it

If you sent the message

  1. Check the address you typed for spaces, extra punctuation or a second @.
  2. Configure the sending server or device to announce its fully qualified host name in HELO/EHLO.
  3. Update or reconfigure software that builds SMTP commands itself.

If you're the recipient or their admin

  1. No action is usually needed: the problem is in how the message was sent.

Frequently asked questions

What does a 501 error on HELO mean?

The receiving server didn't accept the host name your server introduced itself with. Configure the sending server to use its fully qualified domain name, ideally the same name its PTR record points to.

What's the difference between SMTP 500 and 501?

A 500 means the command itself wasn't recognized. A 501 means the command was recognized, but its parameter, such as an email address or host name, was invalid.

Sources

  1. RFC 5321: Simple Mail Transfer Protocol (reply codes, section 4.2)
  2. RFC 5321, section 4.5.3.1: Size limits and minimums
  3. Gmail SMTP errors and codes (Google Workspace Admin Help)

Provider messages are quoted as the provider publishes them. Servers can change their wording, so the bounce you received may differ slightly.