ESMTP is an extension to SMTP which allows additional commands to be defined. If Fluffy doesn't recognise a command it will pass on that command on to the local SMTP server (and echo its response back). This works for any command that doesn't change the state of the SMTP server (say from the processing command state to the accepting mail state). But Fluffy will still throw up warnings.
My aim is to have Fluffy recognise how to handle the various ESMTP commands it might receive. This started me on a quest to identify the commands and figure out how Fluffy should handle them. I didn't find a complete source of information, and met other people who had partially completed the same quest or were trying to understand just one command.
So here I am documenting what I have learnt, in the hope that others might find it useful. Please let me know any errors or additions
Thanks for corrections and additions to:
Keywords/Verbs that beging with the letter X are proprietary extensions.
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. |