SMTP Commands and Reply Codes
Top Deliverability > SMTP Commands and Reply Codes
SMTP/ESMTP Commands
Token | Type | Reference | SMTP server | Comments |
---|---|---|---|---|
8BITMIME | Keyword | RFC1652 | Most | Indicates support for 8 bit encoded (rather than 7 bit) mail message contents, through the optional addition of a parameter to the MAIL command |
ATRN | Keyword | RFC2645 | Some | Indicates support for the ATRN verb. Only valid in an on-demand SMTP server running on port 366 |
ATRN | Verb | RFC2645 | Some | Operates as an authorised TURN equivalent for SMTP servers with a dynamic IP address |
AUTH | Keyword | RFC2554 | Most | Indicates support for the AUTH verb |
AUTH | Verb | RFC2554 | Most | Authentication. If accepted challenge/response pairs are sent 1 or more times |
AUTH= | Keyword | RFC2554 | Some | This keyword is not valid, but seems to indicate support for the AUTH parameter with the MAIL verb. That support should be indicated with the AUTH keyword |
BDAT | Verb | RFC3030 | Microsoft Exchange Server | Should only be used if the CHUNKING keyword is sent. Like the DATA command, but if accepted data of a length specified in BDAT follows. No need for a terminator. Can be multiple chunks - the last BDAT command comes with a LAST parameter. Cannot mix BDAT and DATA |
BINARYMIME | Keyword | RFC3030 | Microsoft Exchange Server | Indicates support for binary encoded (rather than 7 bit) mail message contents, through the optional addition of a parameter to the MAIL command. |
CHECKPOINT | Keyword | RFC1845 | Some | Indicates support for restarting an interrupted SMTP conversation by adding an optional parameter to the MAIL command |
CHUNKING | Keyword | RFC3030 | Microsoft Exchange Server | Indicates support for the BDAT command |
CONNEG | Keyword | SMTP and MIME Extensions For Content Conversion | Indicates support for the CONNEG parameter to the RCPT-TO command | |
CONPERM | Keyword | SMTP and MIME Extensions For Content Conversion | Indicates support for the CONPERM paramter for the MAIL FROM command | |
DATA | Verb | RFC2821 | Required | If accepted, means that subsequent text makes up a mail message, until a terminator (CR LF . CR LF) is received |
DEBUG | Verb | Sendmail,Zmailer | If accepted, puts receiving SMTP server into debug mode | |
DELIVERBY | Keyword | RFC2852 | Most | Indicates support for not delivering mail after a designated time. Comes with reporting paramters and adds an optional parameter to the MAIL command |
DSN | Keyword | RFC1891 | Most | Indicates support for Delivery Status Notification by adding optional parameters to the MAIL and RCPT command |
EHLO | Keyword | CommuniGate Pro | Some faulty SMTP servers will incorrectly list EHLO as a keyword | |
EHLO | Verb | RFC1869 | Most | Alternative to HELO. Returns list of keywords identifying SMTP extensions supported by receiving SMTP server |
EMAL | Verb | IETF Archives | Zmailer | Start of EMAL FROM: Like MAIL except planned to indicate (or allow) 8 bit support for the data contents |
ESAM | Verb | IETF Archives | Zmailer | Start of ESAM FROM: Like SAML except planned to indicate (or allow) 8 bit support for the data contents |
ESND | Verb | IETF Archives | Zmailer | Start of ESND FROM: Like SEND except planned to indicate (or allow) 8 bit support for the data contents |
ESOM | Verb | IETF Archives | Zmailer | Start of ESOM FROM: Like SOML except planned to indicate (or allow) 8 bit support for the data contents |
ENHANCEDSTATUSCODES | Keyword | RFC2034 | Most | Indicates responses will include an enhanced status code |
ENHANGEDSTATUSCODES | Keyword | RFC2034 | Zmailer - Obsolete | A typo for enhanCed. Indicates responses will include an enhanced status code |
ETRN | Keyword | RFC1985 | Some | Indicates support for the ETRN verb |
ETRN | Verb | RFC1985 | Some | Requests the local SMTP server to initiate delivery of mail to the external SMTP server on a separate SMTP connection |
EVFY | Verb | IETF Archives | Zmailer | Planned to return whether an address is likely to accept 8 bit messages |
EXDATA | Keyword | RFC2821 | Courier | Indicates support for the EXDATA parameter with the MAIL FROM command |
EXPN | Keyword | RFC2821 | Many | Indicates support for the EXPN verb |
EXPN | Verb | RFC2821 | Many | Expand a mailing list address into individual recipients. Often disabled to prevent use by spammers |
HELO | Verb | RFC2821 | Required | Should be the first command is an SMTP conversation. Identifies sending SMTP server |
HELP | Keyword | RFC2821 | Many | Indicates support for the HELP verb |
HELP | Verb | RFC2821 | Many | Returns help message |
IDENT | Verb | RFC1431 | Zmailer | Returns the response from an IDENT query (preusmably on your own connection) |
LANG | Keyword | SMTP Language Extension | Specify language for response messages | |
LANGUAGE | Keyword | SMTP Language Extension | Indicates support for the LANG verb | |
Verb | RFC2821 | Required | Start of MAIL FROM: Identifies sender of mail message. May be forged. May not correspond to the From: line in a mail message. Should be added in Return Path header. Address to send any undeliverable notifications (bounces) | |
NOOP | Verb | RFC2821 | Required | NO OPeration. Does nothing but keeps the connection active and can help synchronise commands and responses. |
OK | Keyword | Microsoft Exchange Server | Some faulty SMTP servers will incorrectly list this as a keyword | |
ONEX | Keyword | Sendmail - Obsolete | Indicates support for the ONEX verb | |
ONEX | Verb | Sendmail - Obsolete | Indicates that only one mail message is coming in this connection - stops Sendmail from forking a new process (supposed to make it more efficient) | |
PIPELINING | Keyword | RFC2920 | Most | Indicates support for a command stream without waiting for a response to each command. The receiving server is supposed to batch responses. Streaming is supposed to stop with a command that can change the state of the receiving SMTP server (such as the DATA command) |
QUIT | Verb | RFC2821 | Required | Disconnects |
RCPT | Verb | RFC2821 | Required | Start of RCPT TO: Identifies recipient of mail message. |
READY | Keyword | FTGate | Some faulty SMTP servers will incorrectly list this as a keyword | |
RSET | Verb | RFC2821 | Required | Resets the server state |
SAML | Keyword | RFC2821 | Obsolete | Indicates support for the SAML verb |
SAML | Verb | RFC2821 | Obsolete | Start of SAML FROM: Like MAIL except supposed to also display the message on the recipients computer (early form of instant messaging) |
SOML | Keyword | RFC2821 | Obsolete | Indicates support for the SOML verb |
SOML | Verb | RFC2821 | Obsolete | Start of SAML FROM: Like MAIL except supposed to either mail the message OR display the message on the recipients computer (early form of instant messaging) |
SEND | Keyword | RFC2821 | Obsolete | Indicates support for the SEND verb |
SEND | Verb | RFC2821 | Obsolete | Start of SEND FROM: Like MAIL except supposed to display the message on the recipients computer (early form of instant messaging) |
SIZE | Keyword | RFC1870 | Most | Indicates the maximum size of messages that will be accepted, and indicates support for message sizes to be included as a parameter with the MAIL verb |
QUEU | Verb | IBM VM SMTP | Returns mail delivery queue information | |
RELAY | Keyword | Draft RFC 2476 | PMDF - Obsolete | Part of a draft which was dropped in the final version |
STARTTLS | Keyword | RFC2487 | Some | Indicates support for the STARTTLS verb. |
STARTTLS | Verb | RFC2487 | Some | Triggers start of TLS negotiation for secure SMTP conversation. If successful, resets state to before EHLO command sent |
SUBMITTER | Keyword | Responsible Submitter of an E-mail Message | Indicates support for the SUBMITTER Parameter of the MAIL command | |
TETHYS | Keyword | FTGate | Unknown | |
TICK | Keyword | PMDF - Obsolete | Indicates support for the TICK verb. There were only ever used in BSMTP (Batch SMTP). | |
TICK | Verb | IBM VM SMTP, PMDF - Obsolete | Returns a ticket number for BSMTP | |
TIME | Keyword | Mercury | Indicates support for the TIME verb.td> | |
TIME | Verb | Mercury | Returns the date and time of the receiving mail server | |
TLS | Keyword | Draft of RFC2487 | Microsoft Exchange Server - Onsolete | Indicates support for the TLS verb. |
TLS | Verb | Draft of RFC2487 | Microsoft Exchange Server - Obsolete | Triggers start of TLS negotiation for secure SMTP conversation. If successful, resets state to before EHLO command sent |
TURN | Verb | RFC2821 | Obsolete | If accepted swaps the sending/receveing roles of the external/local SMTP servers. Not recommended due to lack of authentication |
TURNME | Verb | Zmailer - Obsolete | Equivalent to ETRN | |
VERB | Keyword | Sendmail | Indicates support for the VERB verb | |
VERB | Verb | Sendmail | Enableds verbose (detailed) responses | |
VRFY | Verb | RFC2821 | Required | Returns whether specified email address is a valid recipient. Often disabled to prevent spammers testing a dictionary list of names to build up a list of valid recipients. |
WITHELD | Keyword | FTGate | Unknown - possibly indicates the host name is supressed? | |
X-ADAT | Keyword | ESMTP Service Extension for Filtering Gateways | Indicates support for the X-ADAT verb | |
X-ADAT | Verb | ESMTP Service Extension for Filtering Gateways | Allows sending of mail message before specifying recipients | |
X-DRCP | Verb | ESMTP Service Extension for Filtering Gateways | Start of X-DRCPT TO: Allows deferred specifying recipients following use of X-ADAT | |
X-ERCP | Verb | ESMTP Service Extension for Filtering Gateways | Specifies end of recipients following use of X-DRCP | |
X-EXPS | Keyword | Microsoft | Microsoft Exchange Server | Indicates support for the X-EXPS verb |
X-EXPS | Verb | Microsoft | Microsoft Exchange Server | Microsoft version of AUTH. Seems to work the same way. If accepted challenge/response pairs are sent 1 or more times. |
X=EXPS= | Keyword | Microsoft Exchange Server | This seems to indicate support for the X-EXPS parameter with the MAIL verb. | |
X-LINK2STATE | Keyword | Microsoft | Microsoft Exchange Server | Indicates support for the X-LINK2STATE verb |
X-LINK2STATE | Verb | Microsoft | Microsoft Exchange Server | Exchange of routing information. Supposedly generates one response |
X-RCPTLIMIT | Keyword | Zmailer | Parameter follows indicates maximum number of recipients per mail message | |
X-TURNME | Keyword | Zmailer - Obsolete | Indicates support for the TURNME verb | |
XADR | Keyword | PMDF | Indicates support for the XADR verb | |
XADR | Verb | PMDF | Returns information about how an address is routed internally by PMDF as well as general channel information | |
XAUD | Keyword | NT Mail | I'm guessing this is an audit ID reporting licence number and version | |
XAUTH | Keyword | Microsoft bug report | Microsoft Exchange Server 5.0 | Indicates support for the XAUTH verb |
XAUTH | Verb | Microsoft bug report | Microsoft Exchange Server 5.0 | Authentication. If accepted challenge/response pairs are sent 1 or more times. |
XBDATA | Keyword | Mailbeamer | Details are unknown. | |
XCIR | Keyword | PMDF | Indicates support for the XCIR verb | |
XCIR | Verb | PMDF | Returns PMDF circuit check information | |
XDATASIZE | Keyword | LSMTP | I'm guessing it's an obsolete form of XLSMTP-DATASIZE | |
XDSN | Keyword | RFC1891 | Zmailer,Sendmail | Indicates support for Delivery Status Notification by adding optional parameters to the MAIL and RCPT command |
XEXCH50 | Keyword | Microsoft | Microsoft Exchange Server | Indicates support for the XEXCH50 verb |
XEXCH50 | Verb | Microsoft | Microsoft Exchange Server | Allows transfer of binary data with Exchange specific recipient information (eg plain text only versus MIME, etc). If accepted, receiver SMTP servers sends 354 Send Binary data and sending SMTP server sends the number of bytes as the first parameter on the XEXCH50 command. Once these bytes are sent, the receiving SMTP server sends an acknowledgement |
XGEN | Keyword | PMDF | Indicates support for the XGEN verb | |
XGEN | Verb | PMDF | Returns status information about whether a compiled configuration and compiled character set are in use | |
XLICENSE | Verb | LSMTP | Returns license information | |
XLSMTP-ACKRCPT | Keyword | LSMTP | I'm guessing it's linked with L-Soft's LISTSERV programme. There are probably associated keywords. Details are unknown. | |
XLSMTP-DATASIZE | Keyword | LSMTP | I'm guessing it's linked with L-Soft's LISTSERV programme. There are probably associated keywords. Details are unknown. | |
XLSMTP-MMERGE | Keyword | LSMTP | I'm guessing it's linked with L-Soft's LISTSERV programme and mail merge. There are probably associated keywords. Details are unknown. | |
XMBEAM30 | Keyword | Mailbeamer | I'm guessing this simply identifies the software and version running. Details are unknown. | |
XONE | Keyword | Sendmail - Obsolete | Indicates support for the ONEX verb | |
XQUE | Keyword | Sendmail - Obsolete | Indicates support for the XQUE | |
XQUE | Verb | Sendmail - Obsolete | I'm guessing this is equivalent to ETRN | |
XREMOTEQUEUE | Keyword | Netscape Mail server | I'm guessing it indicates support for the XREMOTEQUEUE verb, to implement another version of the TURN command. Details are unknown. | |
XSBEAM30 | Keyword | Mailbeamer | I'm guessing this simply identifies the software and version running. Details are unknown. | |
XSECURITY | Keyword | SECURITY SMTP Service Extension | Courier | Indicates support for the SECURITY parameter with the MAIL verb. This allows for specifying the secruity level for delivering mail. |
XSTA | Keyword | PMDF | Indicates support for the XSTA verb | |
XSTA | Verb | PMDF | Returns status information about the number of messages processed and currently in the PMDF channel queues | |
XTRN | Keyword | SLMail | Indicates support for the XTRN verb | |
XTRN | Verb | SLMail | I believe this is equivalent to ETRN | |
XUSR | Keyword | Sendmail - Obsolete | Indicates support for the XUSR verb | |
XUSR | Verb | Sendmail - Obsolete | Indicates that the submitted mail is coming directly from the user, and not relayed from another SMTP server | |
XVERP | Keyword | Qmail,Postfix,Courier | Indicates support for the XVERP parameter with the MAIL verb. This allows for automatic inclusion of the intended recipients address in the MAIL FROM address, so that bounces clearly show the address of the intended recipient. | |
XVRB | Keyword | Sendmail | Indicates support for the VERB verb | |
XXWALL30 | Keyword | XWall | I'm guessing this simply identifies the software and version running. Details are unknown. |
SMTP Reply Codes
CODE | MEANING |
---|---|
101 | Server connection error (wrong server name or connection port) |
200 | (nonstandard success response, see rfc876) |
211 | System status (response to HELP) |
214 | Help message (response to HELP) |
220 | |
221 | |
235 | Authentication successful (response to AUTH) |
250 | The requested command is completed. As a rule, the code is followed by OK |
251 | User is not local, but the server will forward the message to |
252 | The server cannot verify the user (response to VRFY). The message will be accepted and attempted for delivery |
334 | Response to the AUTH command when the requested security mechanism is accepted |
354 | Start mail input; end with The server confirms mail content transfer (response to DATA). After that, the client starts sending the mail. Terminated with a period ( “.”) |
421 | |
422 | The recipient’s mailbox has exceeded its storage limit |
431 | File overload (too many messages sent to a particular domain) |
441 | No response from the recipient’s server |
442 | Connection dropped |
446 | Internal loop has occurred |
450 | Requested mail action not taken: mailbox unavailable (busy or temporarily blocked). Requested action aborted |
451 | The server aborted the command due to a local error |
452 | The server aborted the command due to insufficient system storage |
454 | TLS not available due to a temporary reason (response to STARTTLS) |
455 | Parameters cannot be accommodated |
471 | Mail server error due to the local spam filter |
500 | Syntax error (also a command line may be too long). The server cannot recognize the command |
501 | Syntax error in parameters or arguments |
502 | The server has not implemented the command |
503 | Improper sequence of commands |
504 | The server has not implemented a command parameter |
510 | Invalid email address |
512 | A DNS error (recheck the address of your recipients) |
521 | |
523 | The total size of your mailing exceeds the recipient server limits |
530 | Access denied (Authentication problem that mostly requires the STARTTLS command to run) |
535 | Authentication failed |
538 | Encryption required for a requested authentication mechanism |
541 | Message rejected by spam filter |
550 | Mailbox is unavailable. Server aborted the command because the mailbox was not found or for policy reasons. Alternatively: Authentication is required for relay |
551 | User not local; please try |
552 | The server aborted the command because the mailbox is full |
553 | Syntactically incorrect mail address (Requested action not taken: mailbox name not allowed) |
554 | The transaction failed (due to an unknown error or No SMTP service here as a response to the client’s attempts to establish a connection) |
555 | Parameters not recognized/ not implemented (response to MAIL FROM or RCPT TO) |
Related Terms:
- Term: Authentication
- Term: Mailing List
- Term: IP Address
- Term: Recipient
- Term: Encryption
- Term: Delivery
- Term: Messaging, Malware and Mobile Anti-Abuse Working Group (M3AAWG)
- Term: Receiver
- Term: RFC2821
- Term: RFC1869
- Term: Forward
- Term: Sender
- Term: Header
- Term: Extended Simple Mail Transfer Protocol (ESMTP)
- Term: Spam
- Term: Simple Mail Transfer Protocol (SMTP)
- Term: Multi-Purpose Internet Mail Extensions (MIME)
- Term: Internet Engineering Task Force (IETF)
- Term: Domain Name System (DNS)
- Term: Request For Comments (RFC)
- Term: Transport Layer Security (TLS)