Original SMTP, defined in the early 1980s, was a minimal protocol: a handful of commands, seven-bit text and no security. Today's mail servers speak ESMTP, extended SMTP, in which the server advertises optional capabilities after the client greets it with EHLO. Those capabilities decide whether a connection can be encrypted, how large a message may be, whether non-English addresses are accepted and how fast a client can push many messages. Reading the EHLO response is one of the quickest ways to learn what a server will do, and it explains many puzzling errors. This guide walks through a typical session, describes the extensions you will meet most often, shows what each means for senders and explains how to use the information when you troubleshoot. For greeting errors see HELO and EHLO errors.
A typical session
$ openssl s_client -starttls smtp -connect smtp.example.net:587 -crlf -quiet
220 smtp.example.net ESMTP ready
EHLO client.example.com
250-smtp.example.net Hello client.example.com
250-PIPELINING
250-SIZE 52428800
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-SMTPUTF8
250-AUTH PLAIN LOGIN XOAUTH2
250 CHUNKINGEach line starting with 250- announces one extension, and the final line uses 250 with a space. A server that does not understand EHLO answers with an error, and the client falls back to the old HELO, which has no extensions at all. Modern clients should always try EHLO first. See how to test an SMTP connection for ways to run a session by hand.
The extensions you will meet
| Extension | What it does | Why it matters to senders |
|---|---|---|
| STARTTLS (RFC 3207) | Upgrades a plain connection to TLS | Encrypts the session; some servers require it before AUTH. See 530 STARTTLS errors |
| AUTH (RFC 4954) | Lists accepted authentication mechanisms: PLAIN, LOGIN, XOAUTH2 and others | Tells you which login method to configure. See authentication methods |
| SIZE (RFC 1870) | Announces the maximum message size and lets the client declare size in MAIL FROM | Large messages are refused early instead of after the whole body is sent |
| PIPELINING (RFC 2920) | Allows several commands to be sent without waiting for each reply | Speeds up delivery of many small messages; some broken middleboxes interfere |
| 8BITMIME (RFC 6152) | Accepts 8-bit message bodies without conversion to seven-bit encodings | Avoids needless quoted-printable overhead for UTF-8 text |
| SMTPUTF8 (RFC 6531) | Accepts internationalised addresses and headers in UTF-8 | Needed to deliver to addresses with non-ASCII characters |
| ENHANCEDSTATUSCODES (RFC 2034) | Adds codes such as 5.1.1 to replies | Makes bounce reasons machine-readable. See bounce codes |
| CHUNKING / BINARYMIME (RFC 3030) | Sends the body in sized chunks with BDAT instead of DATA | Efficient for large messages; not universally supported |
| DSN (RFC 3461) | Lets the client request delivery status notifications | Used by some enterprise systems; rarely needed for web applications |
| REQUIRETLS (RFC 8689) | Asks that a message travel only over TLS-protected hops | Newer; limited support but useful for sensitive mail |
| XCLIENT, XFORWARD | Pass original client details through a proxy | Internal use between trusted servers |
How the main ones affect real delivery
STARTTLS and AUTH
Many servers advertise AUTH only after STARTTLS has succeeded, so an application that logs in on a plain connection sees no AUTH line and fails with an error such as "authentication not enabled" or 530. The fix is to start TLS first, or to use implicit TLS on port 465. Capabilities should be requested again after the TLS handshake, since the list may change. See TLS and STARTTLS.
SIZE
The SIZE value is in bytes and includes the encoded message. Because attachments grow by about a third when base64-encoded, a ten megabyte file needs more than thirteen megabytes of allowance. A client can say MAIL FROM:<[email protected]> SIZE=14000000 and receive an immediate refusal with a 552 code if it is too large. See size limits and attachments.
PIPELINING
Without pipelining, every command waits for a reply, costing a round trip each. With it, the client sends MAIL FROM, several RCPT TO and DATA in one burst. Libraries use it automatically when advertised. If a firewall or load balancer mishandles pipelined commands, you may see hangs or "bad sequence of commands" errors; turning pipelining off in the client is a quick test. See connection pooling for the other half of efficient sending.
8BITMIME and SMTPUTF8
8BITMIME allows UTF-8 body text to travel as it is. Without it a sender must encode the body in quoted-printable or base64. SMTPUTF8 is different: it concerns addresses and headers that contain non-ASCII characters, such as a mailbox name in another script. If the receiving server lacks SMTPUTF8, a message to such an address cannot be delivered unless it can be downgraded, which is rarely possible. See UTF-8 in email.
Enhanced status codes and DSN
Enhanced status codes give three-part classes such as 5.7.1, which allow software to classify failures reliably. DSN requests (the NOTIFY and RET parameters) ask the receiving system to report success, delay or failure. Most web applications use webhooks and logs instead. See delivery event webhooks.
Using the EHLO output in troubleshooting
| Symptom | What to check in EHLO | Likely fix |
|---|---|---|
| Authentication fails with "not supported" | No AUTH line before STARTTLS | Start TLS first or use port 465 |
| Server refuses to accept a large message early | SIZE line value | Reduce attachments or use links |
| Message to an internationalised address fails | No SMTPUTF8 line | Use an ASCII alias or another route |
| Strange hangs on bulk sending | PIPELINING advertised but a proxy interferes | Disable pipelining in the client to test |
| Bounce text is vague | No ENHANCEDSTATUSCODES | Parse the three-digit code and the text. See reading bounce codes |
| TLS is expected but not offered | No STARTTLS line | Check server configuration or certificate. See certificate errors |
| Only LOGIN is offered, your library uses OAuth | AUTH mechanisms list | Match the mechanism or use another credential type |
Security notes
- Do not send credentials on a connection that has not been encrypted. If STARTTLS is not offered on a submission server, treat that as a fault.
- A server that advertises STARTTLS can be downgraded by an attacker who strips the line; clients that require TLS should refuse to continue without it, and policies such as MTA-STS and DANE help server-to-server mail. See MTA-STS.
- Open relays and permissive extensions such as XCLIENT must never be exposed to the public internet.
- Log EHLO responses when you debug, but never log passwords or full AUTH exchanges.
Testing your own server
Connect from outside your network, send EHLO, and compare the output to what you expect. Check that STARTTLS is present on ports 25 and 587, that AUTH is not offered before encryption, that SIZE matches your policy, and that nothing sensitive appears in the greeting banner. Repeat after any change to a proxy, firewall or load balancer, because those can rewrite or strip capability lines. Document the expected output so that a change is easy to spot.
The EHLO list is a short, honest statement of what a server can do. Learning to read it turns many mysterious failures into simple configuration questions.
Test your SMTP settings Use our relay with TLS, authentication and clear error replies.
References and further reading
Frequently asked questions
What is the difference between HELO and EHLO?
EHLO starts an ESMTP session and makes the server list its extensions; HELO is the original greeting with no extensions.
Why does AUTH not appear in the EHLO response?
Many servers advertise AUTH only after STARTTLS. Upgrade the connection and send EHLO again.
What does the SIZE extension do?
It announces the maximum message size so that oversized messages are refused before the body is sent.
Is PIPELINING safe to leave on?
Usually yes. If a proxy or firewall breaks sessions, disable it in the client to test.
When do I need SMTPUTF8?
When a recipient address or header contains non-ASCII characters.