# SMTP 501: syntax error in parameters or arguments

URL: https://iblockspam.com/smtp-errors/501
Last updated: 2026-10-09

Code: 501 (permanent failure, the message bounced)
Provider: Standard (RFC)

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.

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.

## Common 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 (sender)

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

## How to fix it (recipient or admin)

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

**Q: 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.

**Q: 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:
- RFC 5321: Simple Mail Transfer Protocol (reply codes, section 4.2): https://www.rfc-editor.org/rfc/rfc5321#section-4.2
- RFC 5321, section 4.5.3.1: Size limits and minimums: https://www.rfc-editor.org/rfc/rfc5321#section-4.5.3.1
- Gmail SMTP errors and codes (Google Workspace Admin Help): https://knowledge.workspace.google.com/admin/support/troubleshooting/gmail-smtp-errors-and-codes

---

Source: iBlockSpam, https://iblockspam.com/smtp-errors/501 (this is a Markdown copy; the HTML page is canonical). Quote with attribution and a link. Site index for AI assistants: https://iblockspam.com/llms.txt
