home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 1400s / rfc1425.txt < prev    next >
Text File  |  1993-02-07  |  21KB  |  563 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                               J. Klensin, WG Chair
  8. Request for Comments: 1425                     United Nations University
  9.                                                         N. Freed, Editor
  10.                                             Innosoft International, Inc.
  11.                                                                  M. Rose
  12.                                             Dover Beach Consulting, Inc.
  13.                                                             E. Stefferud
  14.                                      Network Management Associates, Inc.
  15.                                                               D. Crocker
  16.                                                        The Branch Office
  17.                                                            February 1993
  18.  
  19.  
  20.                         SMTP Service Extensions
  21.  
  22. Status of this Memo
  23.  
  24.    This RFC specifies an IAB standards track protocol for the Internet
  25.    community, and requests discussion and suggestions for improvements.
  26.    Please refer to the current edition of the "IAB Official Protocol
  27.    Standards" for the standardization state and status of this protocol.
  28.    Distribution of this memo is unlimited.
  29.  
  30. 1.  Abstract
  31.  
  32.    This memo defines a framework for extending the SMTP service by
  33.    defining a means whereby a server SMTP can inform a client SMTP as to
  34.    the service extensions it supports. Standard extensions to the SMTP
  35.    service are registered with the Internet Assigned Numbers Authority
  36.    (IANA).  This framework does not require modification of existing
  37.    SMTP clients or servers unless the features of the service extensions
  38.    are to be requested or provided.
  39.  
  40. 2.  Introduction
  41.  
  42.    The Simple Mail Transfer Protocol (SMTP) [1] has provided a stable,
  43.    effective basis for the relay function of message transfer agents.
  44.    Although a decade old, SMTP has proven remarkably resilient.
  45.    Nevertheless, the need for a number of protocol extensions has become
  46.    evident. Rather than describing these extensions as separate and
  47.    haphazard entities, this document enhances SMTP in a straightforward
  48.    fashion that provides a framework in which all future extensions can
  49.    be built in a single consistent way.
  50.  
  51. 3.  Framework for SMTP Extensions
  52.  
  53.    For the purpose of service extensions to SMTP, SMTP relays a mail
  54.    object containing an envelope and a content.
  55.  
  56.  
  57.  
  58. Klensin, Freed, Rose, Stefferud & Crocker                       [Page 1]
  59.  
  60. RFC 1425                SMTP Service Extensions            February 1993
  61.  
  62.  
  63.           (1)  The SMTP envelope is straightforward, and is sent as a
  64.                series of SMTP protocol units: it consists of an
  65.                originator address (to which error reports should be
  66.                directed); a delivery mode (e.g., deliver to recipient
  67.                mailboxes); and, one or more recipient addresses.
  68.  
  69.           (2)  The SMTP content is sent in the SMTP DATA protocol unit
  70.                and has two parts: the headers and the body. The headers
  71.                form a collection of field/value pairs structured
  72.                according to RFC 822 [2], whilst the body, if structured,
  73.                is defined according to MIME [3]. The content is textual
  74.                in nature, expressed using the US ASCII repertoire (ANSI
  75.                X3.4-1986). Although extensions (such as MIME) may relax
  76.                this restriction for the content body, the content
  77.                headers are always encoded using the US ASCII repertoire.
  78.                The algorithm defined in [4] is used to represent header
  79.                values outside the US ASCII repertoire, whilst still
  80.                encoding them using the US ASCII repertoire.
  81.  
  82.    Although SMTP is widely and robustly deployed, some parts of the
  83.    Internet community might wish to extend the SMTP service.  This memo
  84.    defines a means whereby both an extended SMTP client and server may
  85.    recognize each other as such and the server can inform the client as
  86.    to the service extensions that it supports.
  87.  
  88.    It must be emphasized that any extension to the SMTP service should
  89.    not be considered lightly. SMTP's strength comes primarily from its
  90.    simplicity.  Experience with many protocols has shown that:
  91.  
  92.                protocols with few options tend towards ubiquity, whilst
  93.                protocols with many options tend towards obscurity.
  94.  
  95.    This means that each and every extension, regardless of its benefits,
  96.    must be carefully scrutinized with respect to its implementation,
  97.    deployment, and interoperability costs. In many cases, the cost of
  98.    extending the SMTP service will likely outweigh the benefit.
  99.  
  100.    Given this environment, the framework for the extensions described in
  101.    this memo consists of:
  102.  
  103.           (1)  a new SMTP command (section 4)
  104.  
  105.           (2)  a registry of SMTP service extensions (section 5)
  106.  
  107.           (3)  additional parameters to the SMTP MAIL FROM and RCPT TO
  108.                commands (section 6).
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Klensin, Freed, Rose, Stefferud & Crocker                       [Page 2]
  115.  
  116. RFC 1425                SMTP Service Extensions            February 1993
  117.  
  118.  
  119. 4.  The EHLO command
  120.  
  121.    A client SMTP supporting SMTP service extensions should start an SMTP
  122.    session by issuing the EHLO command instead of the HELO command. If
  123.    the SMTP server supports the SMTP service extensions it will give a
  124.    successful response (see section 4.1), a failure response (see 4.2),
  125.    or an error response (4.3). If the SMTP server does not support any
  126.    SMTP service extensions it will generate an error response (see
  127.    section 4.4).
  128.  
  129.    The syntax for this command, using the ABNF notation of [2], is:
  130.  
  131.                ehlo-cmd ::= "EHLO" SP domain CR LF
  132.  
  133.    If successful, the server SMTP responds with code 250.  On failure,
  134.    the server SMTP responds with code 550.  On error, the server SMTP
  135.    responds with one of codes 500, 501, 502, 504, or 421.
  136.  
  137.    This command is issued instead of the HELO command, and may be issued
  138.    at any time that a HELO command would be appropriate.  That is, if
  139.    the EHLO command is issued, and a successful response is returned,
  140.    then a subsequent HELO or EHLO command will result in the server SMTP
  141.    replying with code 503.  A client SMTP must not cache any information
  142.    returned if the EHLO command succeeds. That is, a client SMTP must
  143.    issue the EHLO command at the start of each SMTP session if
  144.    information about extended facilities is needed.
  145.  
  146. 4.1.  Successful response
  147.  
  148.    If the server SMTP implements and is able to perform the EHLO
  149.    command, it will return code 250.  This indicates that both the
  150.    server and client SMTP are in the initial state, that is, there is no
  151.    transaction in progress and all state tables and buffers are cleared.
  152.  
  153.    Normally, this response will be a multiline reply. Each line of the
  154.    response contains a keyword and, optionally, one or more parameters.
  155.    The syntax for a positive response, using the ABNF notation of [2],
  156.    is:
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Klensin, Freed, Rose, Stefferud & Crocker                       [Page 3]
  171.  
  172. RFC 1425                SMTP Service Extensions            February 1993
  173.  
  174.  
  175.          ehlo-ok-rsp  ::=      "250"    domain [ SP greeting ] CR LF
  176.                         / (    "250-"   domain [ SP greeting ] CR LF
  177.                             *( "250-"      ehlo-line           CR LF )
  178.                                "250"    SP ehlo-line           CR LF   )
  179.  
  180.                       ; the usual HELO chit-chat
  181.          greeting     ::= 1*<any character other than CR or LF>
  182.  
  183.          ehlo-line    ::= ehlo-keyword *( SP ehlo-param )
  184.  
  185.          ehlo-keyword ::= (ALPHA / DIGIT) *(ALPHA / DIGIT / "-")
  186.  
  187.                       ; syntax and values depend on ehlo-keyword
  188.          ehlo-param   ::= 1*<any CHAR excluding SP and all
  189.                              control characters (US ASCII 0-31
  190.                              inclusive)>
  191.  
  192.          ALPHA        ::= <any one of the 52 alphabetic characters
  193.                            (A through Z in upper case, and,
  194.                             a through z in lower case)>
  195.  
  196.          DIGIT        ::= <any one of the 10 numeric characters
  197.                            (0 through 9)>
  198.  
  199.          CR           ::= <the carriage-return character
  200.                            (ASCII decimal code 13)>
  201.          LF           ::= <the line-feed character
  202.                            (ASCII decimal code 10)>
  203.          SP           ::= <the space character
  204.                            (ASCII decimal code 32)>
  205.  
  206.    Although EHLO keywords may be specified in upper, lower, or mixed
  207.    case, they must always be recognized and processed in a case-
  208.    insensitive manner. This is simply an extension of practices begun in
  209.    RFC 821.
  210.  
  211.    The IANA maintains a registry of standard SMTP service extensions.
  212.    Associated with each such extension is a corresponding EHLO keyword
  213.    value. Each service extension registered with the IANA is defined by
  214.    a standards-track RFC, and such a definition includes:
  215.  
  216.           (1)  the textual name of the SMTP service extension;
  217.  
  218.           (2)  the EHLO keyword value associated with the extension;
  219.  
  220.           (3)  the syntax and possible values of parameters associated
  221.                with the EHLO keyword value;
  222.  
  223.  
  224.  
  225.  
  226. Klensin, Freed, Rose, Stefferud & Crocker                       [Page 4]
  227.  
  228. RFC 1425                SMTP Service Extensions            February 1993
  229.  
  230.  
  231.           (4)  any additional SMTP verbs associated with the extension
  232.                (additional verbs will usually be, but are not required
  233.                to be, the same as the EHLO keyword value);
  234.  
  235.           (5)  any new parameters the extension associates with the MAIL
  236.                FROM or RCPT TO verbs; and,
  237.  
  238.           (6)  how support for the extension affects the behavior of a
  239.                server and client SMTP.
  240.  
  241.    In addition, any EHLO keyword value that starts with an upper or
  242.    lower case "X" refers to a local SMTP service extension, which is
  243.    used through bilateral, rather than standardized, agreement. Keywords
  244.    beginning with "X" may not be used in a registered service extension.
  245.  
  246.    Any keyword values presented in the EHLO response that do not begin
  247.    with "X" must correspond to an SMTP service extension registered with
  248.    IANA.  A conforming server must not offer non "X" prefixed keyword
  249.    values that are not described in a registered extension.
  250.  
  251.    Additional verbs are bound by the same rules as EHLO keywords;
  252.    specifically, verbs begining with "X" are local extensions that may
  253.    not be standardized and verbs not beginning with "X" must always be
  254.    registered.
  255.  
  256. 4.2.  Failure response
  257.  
  258.    If for some reason the server SMTP is unable to list the service
  259.    extensions it supports, it will return code 554.
  260.  
  261.    In the case of a failure response, the client SMTP should issue
  262.    either the HELO or QUIT command.
  263.  
  264. 4.3.  Error responses from extended servers
  265.  
  266.    If the server SMTP recognizes the EHLO command, but the command
  267.    argument is unacceptable, it will return code 501.
  268.  
  269.    If the server SMTP recognizes, but does not implement, the EHLO
  270.    command, it will return code 502.
  271.  
  272.    If the server SMTP determines that the SMTP service is no longer
  273.    available (e.g., due to imminent system shutdown), it will return
  274.    code 421.
  275.  
  276.    In the case of any error response, the client SMTP should issue
  277.    either the HELO or QUIT command.
  278.  
  279.  
  280.  
  281.  
  282. Klensin, Freed, Rose, Stefferud & Crocker                       [Page 5]
  283.  
  284. RFC 1425                SMTP Service Extensions            February 1993
  285.  
  286.  
  287. 4.4.  Responses from servers without extensions
  288.  
  289.    A server SMTP that conforms to RFC 821 but does not support the
  290.    extensions specified here will not recognize the EHLO command and
  291.    will consequently return code 500, as specified in RFC 821.
  292.  
  293. 5.  Initial IANA Registry
  294.  
  295.    The IANA's initial registry of SMTP service extensions consists of
  296.    these entries:
  297.  
  298.     Service Ext   EHLO Keyword Parameters Verb       Added Behavior
  299.     ------------- ------------ ---------- ---------- ------------------
  300.     Send             SEND         none       SEND    defined in RFC 821
  301.     Send or Mail     SOML         none       SOML    defined in RFC 821
  302.     Send and Mail    SAML         none       SAML    defined in RFC 821
  303.     Expand           EXPN         none       EXPN    defined in RFC 821
  304.     Help             HELP         none       HELP    defined in RFC 821
  305.     Turn             TURN         none       TURN    defined in RFC 821
  306.  
  307.    which correspond to those SMTP commands which are defined as optional
  308.    in [5].  (The mandatory SMTP commands, according to [5], are HELO,
  309.    MAIL, RCPT, DATA, RSET, VRFY, NOOP, and QUIT.)
  310.  
  311. 6.  MAIL FROM and RCPT TO Parameters
  312.  
  313.    It is recognized that several of the extensions planned for SMTP will
  314.    make use of additional parameters associated with the MAIL FROM and
  315.    RCPT TO command. The syntax for these commands, again using the ABNF
  316.    notation of [2] as well as underlying definitions from [1], is:
  317.  
  318.       esmtp-cmd        ::= inner-esmtp-cmd [SP esmtp-parameters] CR LF
  319.       esmtp-parameters ::= esmtp-parameter *(SP esmtp-parameter)
  320.       esmtp-parameter  ::= esmtp-keyword ["=" esmtp-value]
  321.       esmtp-keyword    ::= (ALPHA / DIGIT) *(ALPHA / DIGIT / "-")
  322.  
  323.                            ; syntax and values depend on esmtp-keyword
  324.       esmtp-value      ::= 1*<any CHAR excluding "=", SP, and all
  325.                               control characters (US ASCII 0-31
  326.                               inclusive)>
  327.  
  328.                            ; The following commands are extended to
  329.                            ; accept extended parameters.
  330.       inner-esmtp-cmd  ::= ("MAIL FROM:<" reverse-path ">")   /
  331.                            ("RCPT TO:<" forward-path ">")
  332.  
  333.    All esmtp-keyword values must be registered as part of the IANA
  334.    registration process described above. This definition only provides
  335.  
  336.  
  337.  
  338. Klensin, Freed, Rose, Stefferud & Crocker                       [Page 6]
  339.  
  340. RFC 1425                SMTP Service Extensions            February 1993
  341.  
  342.  
  343.    the framework for future extension; no extended MAIL FROM or RCPT TO
  344.    parameters are defined by this RFC.
  345.  
  346. 6.1.  Error responses
  347.  
  348.    If the server SMTP does not recognize or cannot implement one or more
  349.    of the parameters associated with a particular MAIL FROM or RCPT TO
  350.    command, it will return code 555.
  351.  
  352.    If for some reason the server is temporarily unable to accomodate one
  353.    or more of the parameters associated with a MAIL FROM or RCPT TO
  354.    command, and if the definition of the specific parameter does not
  355.    mandate the use of another code, it should return code 455.
  356.  
  357.    Errors specific to particular parameters and their values will be
  358.    specified in the parameter's defining RFC.
  359.  
  360. 7.  Received: Header Field Annotation
  361.  
  362.    SMTP servers are required to add an appropriate Received: field to
  363.    the headers of all messages they receive. A "with ESMTP" clause
  364.    should be added to this field when any SMTP service extensions are
  365.    used. "ESMTP" is hereby added to the list of standard protocol names
  366.    registered with IANA.
  367.  
  368. 8.  Usage Examples
  369.  
  370.           (1)  An interaction of the form:
  371.  
  372.                S: <wait for connection on TCP port 25>
  373.                C: <open connection to server>
  374.                S: 220 dbc.mtview.ca.us SMTP service ready
  375.                C: EHLO ymir.claremont.edu
  376.                S: 250 dbc.mtview.ca.us says hello
  377.                 ...
  378.  
  379.                indicates that the server SMTP implements only those SMTP
  380.                commands which are defined as mandatory in [5].
  381.  
  382.           (2)  In contrast, an interaction of the form:
  383.  
  384.                S: <wait for connection on TCP port 25>
  385.                C: <open connection to server>
  386.                S: 220 dbc.mtview.ca.us SMTP service ready
  387.                C: EHLO ymir.claremont.edu
  388.                S: 250-dbc.mtview.ca.us says hello
  389.                S: 250-EXPN
  390.                S: 250-HELP
  391.  
  392.  
  393.  
  394. Klensin, Freed, Rose, Stefferud & Crocker                       [Page 7]
  395.  
  396. RFC 1425                SMTP Service Extensions            February 1993
  397.  
  398.  
  399.                S: 250-8BITMIME
  400.                S: 250-XONE
  401.                S: 250 XVRB
  402.                 ...
  403.  
  404.                indicates that the server SMTP also implements the SMTP
  405.                EXPN and HELP commands, one standard service extension
  406.                (8BITMIME), and two non-standard service extensions (XONE
  407.                and XVRB).
  408.  
  409.           (3)  Finally, a server that does not support SMTP service
  410.                extensions would act as follows:
  411.  
  412.                S: <wait for connection on TCP port 25>
  413.                C: <open connection to server>
  414.                S: 220 dbc.mtview.ca.us SMTP service ready
  415.                C: EHLO ymir.claremont.edu
  416.                S: 500 Command not recognized: EHLO
  417.                 ...
  418.  
  419.                The 500 response indicates that the server SMTP does not
  420.                implement the extensions specified here.  The client
  421.                would normally send RSET to reset the connection, and,
  422.                after getting a successful reply, send a HELO command and
  423.                proceed as specified in RFC 821.
  424.  
  425. 9.  Security Considerations
  426.  
  427.    This RFC does not discuss security issues and is not believed to
  428.    raise any security issues not already endemic in electronic mail and
  429.    present in fully conforming implementations of RFC-821.  It does
  430.    provide an announcement of server mail capabilities via the response
  431.    to the EHLO verb. However, all information provided by announcement
  432.    of any of the initial set of service extensions defined by this RFC
  433.    can be readily deduced by selective probing of the verbs required to
  434.    transport and deliver mail. The security implications of service
  435.    extensions described in other RFCs should be dealt with in those
  436.    RFCs.
  437.  
  438. 10.  Acknowledgements
  439.  
  440.    This document represents a synthesis of the ideas of many people and
  441.    reactions to the ideas and proposals of others.  Randall Atkinson,
  442.    Craig Everhart, Risto Kankkunen, and Greg Vaudreuil contributed ideas
  443.    and text sufficient to be considered co-authors.  Other important
  444.    suggestions, text, or encouragement came from Harald Alvestrand, Jim
  445.    Conklin, Mark Crispin, Frank da Cruz, 'Olafur Gudmundsson, Per
  446.    Hedeland, Christian Huitma, Neil Katin, Eliot Lear, Harold A.
  447.  
  448.  
  449.  
  450. Klensin, Freed, Rose, Stefferud & Crocker                       [Page 8]
  451.  
  452. RFC 1425                SMTP Service Extensions            February 1993
  453.  
  454.  
  455.    Miller, Dan Oscarsson, Julian Onions, Rayan Zachariassen, and the
  456.    contributions of the entire IETF SMTP Working Group. Of course, none
  457.    of the individuals are necessarily responsible for the combination of
  458.    ideas represented here. Indeed, in some cases, the response to a
  459.    particular criticism was to accept the problem identification but to
  460.    include an entirely different solution from the one originally
  461.    proposed.
  462.  
  463. 11.  References
  464.  
  465.    [1] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821,
  466.        USC/Information Sciences Institute, August 1982.
  467.  
  468.    [2] Crocker, D., "Standard for the Format of ARPA Internet Text
  469.        Messages", STD 11, RFC 822, UDEL, August 1982.
  470.  
  471.    [3] Borenstein, N., and N. Freed, "Multipurpose Internet Mail
  472.        Extensions", RFC 1341, Bellcore, Innosoft, June 1992.
  473.  
  474.    [4] Moore, K., "Representation of Non-ASCII Text in Internet Message
  475.        Headers", RFC 1342, University of Tennessee, June 1992.
  476.  
  477.    [5] Braden, R., "Requirements for Internet Hosts - Application and
  478.        Support", STD 3, RFC 1123, USC/Information Sciences Institute,
  479.        October 1989.
  480.  
  481. 12.  Chair, Editor, and Authors' Addresses
  482.  
  483.        John Klensin, WG Chair
  484.        United Nations University
  485.        PO Box 500, Charles Street Station
  486.        Boston, MA 02114-0500  USA
  487.  
  488.        Phone: +1 617 227 8747
  489.        Fax: +1 617 491 6266
  490.        Email: klensin@infoods.unu.edu
  491.  
  492.  
  493.        Ned Freed, Editor
  494.        Innosoft International, Inc.
  495.        250 West First Street, Suite 240
  496.        Claremont, CA 91711  USA
  497.  
  498.        Phone: +1 909 624 7907
  499.        Fax: +1 909 621 5319
  500.        Email: ned@innosoft.com
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Klensin, Freed, Rose, Stefferud & Crocker                       [Page 9]
  507.  
  508. RFC 1425                SMTP Service Extensions            February 1993
  509.  
  510.  
  511.        Marshall T. Rose
  512.        Dover Beach Consulting, Inc.
  513.        420 Whisman Court
  514.        Moutain View, CA  94043-2186  USA
  515.  
  516.        Phone: +1 415 968 1052
  517.        Fax: +1 415 968 2510
  518.        Email: mrose@dbc.mtview.ca.us
  519.  
  520.  
  521.        Einar A. Stefferud
  522.        Network Management Associates, Inc.
  523.        17301 Drey Lane
  524.        Huntington Beach, CA, 92647-5615  USA
  525.  
  526.        Phone: +1 714 842 3711
  527.        Fax: +1 714 848 2091
  528.        Email: stef@nma.com
  529.  
  530.  
  531.        David H. Crocker
  532.        The Branch Office
  533.        USA
  534.  
  535.        Email: dcrocker@mordor.stanford.edu
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Klensin, Freed, Rose, Stefferud & Crocker                      [Page 10]
  563.