Suvarna Garge (Editor)

Extended SMTP

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

Extended SMTP (ESMTP), sometimes referred to as Enhanced SMTP, is a definition of protocol extensions to the Simple Mail Transfer Protocol standard. The extension format was defined in November 1995 in IETF publication RFC 1869 which established a general structure for all existing and future extensions.

Contents

ESMTP defines consistent and manageable means by which ESMTP clients and servers can be identified and servers can indicate supported extensions.

Extensions

ESMTP is a protocol used to transport internet mail. It is used as both an inter-server transport protocol and (with restricted behavior enforced) a mail submission protocol.

The main identification feature for ESMTP clients is to open a transmission with the command EHLO (Extended HELLO), rather than HELO (Hello, the original RFC 821 standard). A server will respond with success (code 250), failure (code 550) or error (code 500, 501, 502, 504, or 421), depending on its configuration. An ESMTP server returns the code 250 OK in a multi-line reply with its domain and a list of keywords to indicate supported extensions. A RFC 821 compliant server returns error code 500, allowing ESMTP clients to try either HELO or QUIT.

Each service extension is defined in an approved format in subsequent RFCs and registered with the Internet Assigned Numbers Authority (IANA). The first definitions were the RFC 821 optional services - SEND, SOML (Send or Mail), SAML (Send and Mail), EXPN, HELP, and TURN. The format of additional SMTP verbs was set and for new parameters in MAIL and RCPT.

Some relatively common keywords (not all of them corresponding to commands) used today are:

  • 8BITMIME — 8 bit data transmission, RFC 6152
  • ATRN — Authenticated TURN for On-Demand Mail Relay, RFC 2645
  • AUTH — Authenticated SMTP, RFC 4954
  • CHUNKING — Chunking, RFC 3030
  • DSN — Delivery status notification, RFC 3461 (See Variable envelope return path)
  • ETRN — Extended version of remote message queue starting command TURN, RFC 1985
  • HELP — Supply helpful information, RFC 821
  • PIPELINING — Command pipelining, RFC 2920
  • SIZE — Message size declaration, RFC 1870
  • STARTTLS — Transport layer security, RFC 3207 (2002)
  • SMTPUTF8 — Allow UTF-8 encoding in mailbox names and header fields, RFC 6531
  • UTF8SMTP — Allow UTF-8 encoding in mailbox names and header fields, RFC 5336 (deprecated)
  • The ESMTP format was restated in RFC 2821 (superseding RFC 821) and updated to the latest definition in RFC 5321 in 2008. Support for the EHLO command in servers became mandatory, and HELO designated a required fallback.

    Non-standard, unregistered, service extensions can be used by bilateral agreement, these services are indicated by an EHLO message keyword starting with "X", and with any additional parameters or verbs similarly marked.

    SMTP commands are case-insensitive. They are presented here in capitalized form for emphasis only. An SMTP server that requires a specific capitalization method is a violation of the standard.

    List of supporting servers

  • IceWarp
  • Postfix no patches needed for RFC 6531..RFC 6533.
  • Sendmail source code patch necessary for SMTPUTF8 support
  • HMailServer Free mail server for Windows
  • Exim
  • MailEnable Support only in Enterprise Edition
  • MagicMail Pipe-lining not used, check on the latest status of listed features.
  • 8BITMIME

    The 8BITMIME extension was standardized in 1994. It facilitates the transparent exchange of e-mail messages containing octets outside the seven-bit ASCII character set. Prior to the availability of 8BITMIME implementations, mail user agents employed several techniques to cope with the seven-bit limitation, such as binary-to-text encodings (including ones provided by MIME) and UTF-7. However, each of these workarounds inflates the required amount of data for transmission of non-ASCII text. Some non-ESMTP servers allowed the sending of 8-bit characters, but it is risky to send such data to a server whose 8-bit capabilities are unknown.

    In March 2011, 8BITMIME was published as RFC 6152 corresponding to the then new STD 71.

    List of supporting servers

    At least the following servers advertise the 8BITMIME extension:

  • Apache James (since 2.3.0a1)
  • Citadel (since 7.30)
  • Courier Mail Server
  • ESMTP
  • Exim
  • Gmail
  • IceWarp
  • IIS SMTP Service
  • Kerio Connect
  • Lotus Domino
  • Maillennium
  • MailerQ
  • MDaemon Messaging Server
  • MagicMail
  • MailEnable
  • Microsoft Exchange Server (as of Exchange Server 2000)
  • Novell GroupWise
  • OpenSMTPD
  • Oracle Communications Messaging Server
  • Postfix
  • Sendmail (since 6.57)
  • SubEtha
  • The following servers can be configured to advertise 8BITMIME, but do not perform conversion of 8-bit data to 7-bit when connecting to non-8BITMIME relays:

  • Exim and qmail do not translate eight-bit messages to seven-bit when making an attempt to relay 8-bit data to non-8BITMIME peers, as is required by the RFC. This does not cause problems in practice, since virtually all modern mail relays are 8-bit clean.
  • Microsoft Exchange Server 2003 advertises 8BITMIME by default, but relaying to a non-8BITMIME peer results in a bounce. This is allowed by RFC 6152 section 3.
  • As of June 2005, the following servers do not implement the extension:

  • Microsoft Exchange Internet Mail Service (through version 5.5)
  • Netscape Messaging Server 4.15
  • ETRN

    Remote Message Queue Starting is a feature of SMTP that permits a remote host to start processing of the mail queue on a server so it may receive messages destined to it by sending the TURN command. This feature however was deemed insecure and was extended in ESMTP with the ETRN command which operates more securely using an authentication method based on Domain Name System information.

    SMTP-AUTH

    The SMTP-AUTH extension provides an access control mechanism. It consists of an authentication step through which the client effectively logs in to the mail server during the process of sending mail. Servers that support SMTP-AUTH can usually be configured to require clients to use this extension, ensuring the true identity of the sender is known. The SMTP-AUTH extension is defined in RFC 4954.

    SMTP-AUTH can be used to allow legitimate users to relay mail while denying relay service to unauthorized users, such as spammers. It does not necessarily guarantee the authenticity of either the SMTP envelope sender or the RFC 2822 "From:" header. For example, spoofing, in which one sender masquerades as someone else, is still possible with SMTP-AUTH unless the server is configured to limit message from-addresses to addresses this AUTHed user is authorized for.

    The SMTP-AUTH extension also allows one mail server to indicate to another that the sender has been authenticated when relaying mail. In general this requires the recipient server to trust the sending server, meaning that this aspect of SMTP-AUTH is rarely used on the Internet.

    SMTPUTF8

    The SMTPUTF8 extension allows UTF-8 encoding in mailbox names and header fields. This provides the capability for sending email to internationalized addresses such as Pelé@example.com, δοκιμή@παράδειγμα.δοκιμή, and 测试@测试.测试. This extension was added in 2012 by RFC 6531, but is not yet widely supported.

    List of supporting servers

  • Postfix (version 3.0 and later)
  • Momentum (versions 4.1 and 3.6.5, and later)
  • Sendmail (Under development)
  • Exim (experimental as of the 4.86 release)
  • List of supporting local servers

    Local delivery servers (LMTP)

  • None
  • List of supporting clients

  • VMime (Under development)
  • Mutt (maybe, not official support)
  • List of supporting content filters

  • Amavis (SMTP and LMTP) since version 2.10.0
  • References

    Extended SMTP Wikipedia