# 501 5.5.4 Bounce: Invalid HELO or Command Arguments

URL: https://email-validation.org/bounce-codes/501-5-5-4/
Updated: 2026-11-06

> Documentation index: https://email-validation.org/llms.txt

**At a glance**

- **Type:** permanent failure (class 5, RFC 3463 §2). The sending server does not retry; sending the same message again fails the same way until the cause is fixed.
- **Basic code 501:** “Syntax error in parameters or arguments” (RFC 5321 §4.2.3).
- **Enhanced code 5.5.4:** “Invalid command arguments” in the IANA registry (RFC 3463), in the group mail delivery protocol status (RFC 3463 §3.6).

A command your mail server sent had invalid arguments. Most often it is the greeting: the name your server gives in EHLO or HELO is empty or not a proper host name, so the receiving server refuses to talk to it.

## What it means
[RFC 3463 §3.6](https://www.rfc-editor.org/rfc/rfc3463) defines X.5.4 as "invalid command arguments": a valid command was sent with arguments that were out of range or not recognized. It is only useful as a permanent error. The basic code 501 is "syntax error in parameters or arguments" ([RFC 5321 §4.2.3](https://www.rfc-editor.org/rfc/rfc5321)).

The EHLO rules come from RFC 5321:
- §4.1.1.1: the argument is the client's fully qualified domain name. If it has no meaningful name, it should send an address literal, such as `[192.0.2.1]`.
- §4.1.4: the client must, if possible, use its primary host name. A server may check whether the name matches the client's IP address, but must not refuse mail only because it does not.
- §4.1.2: domain labels may contain only letters, digits and hyphens; an underscore is not allowed, and a server must reject such a command with 501.

## Common causes
- EHLO sent with no argument at all.
- A bare machine name such as `server01`, `localhost` or a Windows computer name instead of a full domain name.
- A host name with an underscore, such as `mail_01.example.com`.
- An IP address written without the square brackets of an address literal.
- Other commands with bad arguments, such as an unknown parameter after `MAIL FROM`.

## How providers use it
**Gmail** returns 501 5.5.4 when the HELO or EHLO argument is invalid or empty ([Google's SMTP error reference](https://support.google.com/a/answer/3726730)). **Microsoft** has a separate code, 5.7.506, for a bad HELO in which the sending server introduces itself with the name of the server it is connecting to ([Exchange Online NDR reference](https://learn.microsoft.com/en-us/troubleshoot/exchange/email-delivery/ndr/non-delivery-reports-in-exchange-online)).

## How to fix it
1. Find the EHLO name your server sends. It is in your mail server's settings, often called the host name, HELO name or SMTP banner name, and in the SMTP log.
2. Set it to a full domain name you control, such as `mail.example.com`.
3. Give that name an A or AAAA record pointing to the sending IP, and set the IP's reverse DNS (PTR) to the same name. Receivers check reverse DNS separately; see [550 5.7.25](https://email-validation.org/bounce-codes/550-5-7-25/).
4. If an application connects directly, set its EHLO name in its mail settings; if none is set, the library may send the machine's short name.
5. If the error points to a different command, check that command's parameters against the server's EHLO reply, which lists the extensions it supports.

## Related codes

- [503 5.5.1](https://email-validation.org/bounce-codes/503-5-5-1/): Commands sent in the wrong order
- [550 5.7.25](https://email-validation.org/bounce-codes/550-5-7-25/): Reverse DNS (PTR) check failed
- [553 5.1.3](https://email-validation.org/bounce-codes/553-5-1-3/): The recipient address is not valid syntax

See [every bounce code](https://email-validation.org/bounce-codes/) in the dictionary.

Many bounces from addresses that do not exist can be avoided: check an address with our [free email checker](https://email-validation.org/email-checker/), or [clean a whole list](https://email-validation.org/bulk-email-verification/) before you send.
