home *** CD-ROM | disk | FTP | other *** search
/ Handbook of Infosec Terms 2.0 / Handbook_of_Infosec_Terms_Version_2.0_ISSO.iso / text / rfcs / rfc1869.txt < prev    next >
Text File  |  1996-05-07  |  24KB  |  311 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                               J. Klensin, WG Chair Request For Comments: 1869                                           MCI STD: 10                                                 N. Freed, Editor Obsoletes: 1651                             Innosoft International, Inc. Category: Standards Track                                        M. Rose                                             Dover Beach Consulting, Inc.                                                             E. Stefferud                                      Network Management Associates, Inc.                                                               D. Crocker                                                   Brandenburg Consulting                                                            November 1995 
  8.  
  9.                          SMTP Service Extensions 
  10.  
  11. Status of this Memo 
  12.  
  13.    This document specifies an Internet standards track protocol for the    Internet community, and requests discussion and suggestions for    improvements.  Please refer to the current edition of the "Internet    Official Protocol Standards" (STD 1) for the standardization state    and status of this protocol.  Distribution of this memo is unlimited. 
  14.  
  15. 1.  Abstract 
  16.  
  17.    This memo defines a framework for extending the SMTP service by    defining a means whereby a server SMTP can inform a client SMTP as to    the service extensions it supports.  Extensions to the SMTP service    are registered with the IANA. This framework does not require    modification of existing SMTP clients or servers unless the features    of the service extensions are to be requested or provided. 
  18.  
  19. 2.  Introduction 
  20.  
  21.    The Simple Mail Transfer Protocol (SMTP) [1] has provided a stable,    effective basis for the relay function of message transfer agents.    Although a decade old, SMTP has proven remarkably resilient.    Nevertheless, the need for a number of protocol extensions has become    evident. Rather than describing these extensions as separate and    haphazard entities, this document enhances SMTP in a straightforward    fashion that provides a framework in which all future extensions can    be built in a single consistent way. 
  22.  
  23. 3.  Framework for SMTP Extensions 
  24.  
  25.    For the purpose of service extensions to SMTP, SMTP relays a mail    object containing an envelope and a content. 
  26.  
  27.  
  28.  
  29.  Klensin, et al              Standards Track                     [Page 1] 
  30.  RFC 1869                SMTP Service Extensions            November 1995 
  31.  
  32.   (1)   The SMTP envelope is straightforward, and is sent as a        series of SMTP protocol units: it consists of an        originator address (to which error reports should be        directed); a delivery mode (e.g., deliver to recipient        mailboxes); and, one or more recipient addresses. 
  33.  
  34.  (2)   The SMTP content is sent in the SMTP DATA protocol unit        and has two parts: the headers and the body. The        headers form a collection of field/value pairs        structured according to RFC 822 [2], whilst the body,        if structured, is defined according to MIME [3]. The        content is textual in nature, expressed using the US        ASCII repertoire (ANSI X3.4-1986). Although extensions        (such as MIME) may relax this restriction for the        content body, the content headers are always encoded        using the US ASCII repertoire. The algorithm defined in        [4] is used to represent header values outside the US        ASCII repertoire, whilst still encoding them using the        US ASCII repertoire. 
  35.  
  36.    Although SMTP is widely and robustly deployed, some parts of the    Internet community might wish to extend the SMTP service.  This memo    defines a means whereby both an extended SMTP client and server may    recognize each other as such and the server can inform the client as    to the service extensions that it supports. 
  37.  
  38.    It must be emphasized that any extension to the SMTP service should    not be considered lightly. SMTP's strength comes primarily from its    simplicity.  Experience with many protocols has shown that: 
  39.  
  40.      protocols with few options tend towards ubiquity, whilst      protocols with many options tend towards obscurity. 
  41.  
  42.    This means that each and every extension, regardless of its benefits,    must be carefully scrutinized with respect to its implementation,    deployment, and interoperability costs. In many cases, the cost of    extending the SMTP service will likely outweigh the benefit. 
  43.  
  44.    Given this environment, the framework for the extensions described in    this memo consists of: 
  45.  
  46.  (1)   a new SMTP command (section 4) 
  47.  
  48.  (2)   a registry of SMTP service extensions (section 5) 
  49.  
  50.  (3)   additional parameters to the SMTP MAIL FROM and RCPT TO        commands (section 6). 
  51.  
  52.  
  53.  
  54.  Klensin, et al              Standards Track                     [Page 2] 
  55.  RFC 1869                SMTP Service Extensions            November 1995 
  56.  
  57.  4.  The EHLO command 
  58.  
  59.    A client SMTP supporting SMTP service extensions should start an SMTP    session by issuing the EHLO command instead of the HELO command. If    the SMTP server supports the SMTP service extensions it will give a    successful response (see section 4.3), a failure response (see 4.4),    or an error response (4.5). If the SMTP server does not support any    SMTP service extensions it will generate an error response (see    section 4.5). 
  60.  
  61. 4.1.  Changes to STD 10, RFC 821 
  62.  
  63.    This specification is intended to extend STD 10, RFC 821 without    impacting existing services in any way.  The minor changes needed are    enumerated below. 
  64.  
  65. 4.1.1.  First command 
  66.  
  67.    RFC 821 states that the first command in an SMTP session must be the    HELO command. This requirement is hereby amended to allow a session    to start with either EHLO or HELO. 
  68.  
  69. 4.1.2.  Maximum command line length 
  70.  
  71.    This specification extends the SMTP MAIL FROM and RCPT TO to allow    additional parameters and parameter values.  It is possible that the    MAIL FROM and RCPT TO lines that result will exceed the 512 character    limit on command line length imposed by RFC 821.  This limit is    hereby amended to only apply to command lines without any parameters.    Each specification that defines new MAIL FROM or RCPT TO parameters    must also specify maximum parameter value lengths for each parameter    so that implementors of some set of extensions know how much buffer    space must be allocated. The maximum command length that must be    supported by an SMTP implementation with extensions is 512 plus the    sum of all the maximum parameter lengths for all the extensions    supported. 
  72.  
  73. 4.2.  Command syntax 
  74.  
  75.    The syntax for this command, using the ABNF notation of [2], is: 
  76.  
  77.      ehlo-cmd ::= "EHLO" SP domain CR LF 
  78.  
  79.    If successful, the server SMTP responds with code 250. On failure,    the server SMTP responds with code 550. On error, the server SMTP    responds with one of codes 500, 501, 502, 504, or 421. 
  80.  
  81.  
  82.  
  83.  
  84.  
  85. Klensin, et al              Standards Track                     [Page 3] 
  86.  RFC 1869                SMTP Service Extensions            November 1995 
  87.  
  88.     This command is issued instead of the HELO command, and may be issued    at any time that a HELO command would be appropriate.  That is, if    the EHLO command is issued, and a successful response is returned,    then a subsequent HELO or EHLO command will result in the server SMTP    replying with code 503.  A client SMTP must not cache any information    returned if the EHLO command succeeds. That is, a client SMTP must    issue the EHLO command at the start of each SMTP session if    information about extended facilities is needed. 
  89.  
  90. 4.3.  Successful response 
  91.  
  92.    If the server SMTP implements and is able to perform the EHLO    command, it will return code 250.  This indicates that both the    server and client SMTP are in the initial state, that is, there is no    transaction in progress and all state tables and buffers are cleared. 
  93.  
  94.    Normally, this response will be a multiline reply. Each line of the    response contains a keyword and, optionally, one or more parameters.    The syntax for a positive response, using the ABNF notation of [2],    is: 
  95.  
  96.      ehlo-ok-rsp  ::=      "250"    domain [ SP greeting ] CR LF                     / (    "250-"   domain [ SP greeting ] CR LF                         *( "250-"      ehlo-line           CR LF )                            "250"    SP ehlo-line           CR LF   ) 
  97.  
  98.                   ; the usual HELO chit-chat      greeting     ::= 1*<any character other than CR or LF> 
  99.  
  100.      ehlo-line    ::= ehlo-keyword *( SP ehlo-param ) 
  101.  
  102.      ehlo-keyword ::= (ALPHA / DIGIT) *(ALPHA / DIGIT / "-") 
  103.  
  104.                   ; syntax and values depend on ehlo-keyword      ehlo-param   ::= 1*<any CHAR excluding SP and all                          control characters (US ASCII 0-31                          inclusive)> 
  105.  
  106.      ALPHA        ::= <any one of the 52 alphabetic characters                        (A through Z in upper case, and,                         a through z in lower case)>      DIGIT        ::= <any one of the 10 numeric characters                        (0 through 9)> 
  107.  
  108.      CR           ::= <the carriage-return character                        (ASCII decimal code 13)>      LF           ::= <the line-feed character                        (ASCII decimal code 10)> 
  109.  
  110.  
  111.  
  112. Klensin, et al              Standards Track                     [Page 4] 
  113.  RFC 1869                SMTP Service Extensions            November 1995 
  114.  
  115.       SP           ::= <the space character                        (ASCII decimal code 32)> 
  116.  
  117.    Although EHLO keywords may be specified in upper, lower, or mixed    case, they must always be recognized and processed in a case-    insensitive manner. This is simply an extension of practices begun in    RFC 821. 
  118.  
  119.    The IANA maintains a registry of SMTP service extensions.  Associated    with each such extension is a corresponding EHLO keyword value. Each    service extension registered with the IANA must be defined in an RFC.    Such RFCs must either be on the standards-track or must define an    IESG-approved experimental protocol.  The definition must include: 
  120.  
  121.  (1)   the textual name of the SMTP service extension; 
  122.  
  123.  (2)   the EHLO keyword value associated with the extension; 
  124.  
  125.  (3)   the syntax and possible values of parameters associated        with the EHLO keyword value; 
  126.  
  127.  (4)   any additional SMTP verbs associated with the extension        (additional verbs will usually be, but are not required        to be, the same as the EHLO keyword value); 
  128.  
  129.  (5)   any new parameters the extension associates with the        MAIL FROM or RCPT TO verbs; 
  130.  
  131.  (6)   how support for the extension affects the behavior of a        server and client SMTP; and, 
  132.  
  133.  (7)   the increment by which the extension is increasing the        maximum length of the commands MAIL FROM, RCPT TO, or        both, over that specified in RFC 821. 
  134.  
  135.    In addition, any EHLO keyword value that starts with an upper or    lower case "X" refers to a local SMTP service extension, which is    used through bilateral, rather than standardized, agreement. Keywords    beginning with "X" may not be used in a registered service extension. 
  136.  
  137.    Any keyword values presented in the EHLO response that do not begin    with "X" must correspond to a standard, standards-track, or IESG-    approved experimental SMTP service extension registered with IANA.  A    conforming server must not offer non "X" prefixed keyword values that    are not described in a registered extension. 
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  Klensin, et al              Standards Track                     [Page 5] 
  144.  RFC 1869                SMTP Service Extensions            November 1995 
  145.  
  146.     Additional verbs are bound by the same rules as EHLO keywords;    specifically, verbs begining with "X" are local extensions that may    not be registered or standardized and verbs not beginning with "X"    must always be registered. 
  147.  
  148. 4.4.  Failure response 
  149.  
  150.    If for some reason the server SMTP is unable to list the service    extensions it supports, it will return code 554. 
  151.  
  152.    In the case of a failure response, the client SMTP should issue    either the HELO or QUIT command. 
  153.  
  154. 4.5.  Error responses from extended servers 
  155.  
  156.    If the server SMTP recognizes the EHLO command, but the command    argument is unacceptable, it will return code 501. 
  157.  
  158.    If the server SMTP recognizes, but does not implement, the EHLO    command, it will return code 502. 
  159.  
  160.    If the server SMTP determines that the SMTP service is no longer    available (e.g., due to imminent system shutdown), it will return    code 421. 
  161.  
  162.    In the case of any error response, the client SMTP should issue    either the HELO or QUIT command. 
  163.  
  164. 4.6.  Responses from servers without extensions 
  165.  
  166.    A server SMTP that conforms to RFC 821 but does not support the    extensions specified here will not recognize the EHLO command and    will consequently return code 500, as specified in RFC 821.  The    server SMTP should stay in the same state after returning this code    (see section 4.1.1 of RFC 821).  The client SMTP may then issue    either a HELO or a QUIT command. 
  167.  
  168. 4.7.  Responses from improperly implemented servers 
  169.  
  170.    Some SMTP servers are known to disconnect the SMTP transmission    channel upon receipt of the EHLO command. The disconnect can occur    immediately or after sending a response.  Such behavior violates    section 4.1.1 of RFC 821, which explicitly states that disconnection    should only occur after a QUIT command is issued. 
  171.  
  172.    Nevertheless, in order to achieve maxmimum interoperablity it is    suggested that extended SMTP clients using EHLO be coded to check for    server connection closure after EHLO is sent, either before or after 
  173.  
  174.  
  175.  
  176. Klensin, et al              Standards Track                     [Page 6] 
  177.  RFC 1869                SMTP Service Extensions            November 1995 
  178.  
  179.     returning a reply.  If this happens the client must decide if the    operation can be successfully completed without using any SMTP    extensions. If it can a new connection can be opened and the HELO    command can be used. 
  180.  
  181.    Other improperly-implemented servers will not accept a HELO command    after EHLO has been sent and rejected.  In some cases, this problem    can be worked around by sending a RSET after the failure response to    EHLO, then sending the HELO.  Clients that do this should be aware    that many implementations will return a failure code (e.g., 503 Bad    sequence of commands) in response to the RSET.  This code can be    safely ignored. 
  182.  
  183. 5.  Initial IANA Registry 
  184.  
  185.    The IANA's initial registry of SMTP service extensions consists of    these entries: 
  186.  
  187.    Service Ext   EHLO Keyword Parameters Verb       Added Behavior    ------------- ------------ ---------- ---------- ------------------    Send             SEND         none       SEND    defined in RFC 821    Send or Mail     SOML         none       SOML    defined in RFC 821    Send and Mail    SAML         none       SAML    defined in RFC 821    Expand           EXPN         none       EXPN    defined in RFC 821    Help             HELP         none       HELP    defined in RFC 821    Turn             TURN         none       TURN    defined in RFC 821 
  188.  
  189.    which correspond to those SMTP commands which are defined as optional    in [5].  (The mandatory SMTP commands, according to [5], are HELO,    MAIL, RCPT, DATA, RSET, VRFY, NOOP, and QUIT.) 
  190.  
  191. 6.  MAIL FROM and RCPT TO Parameters 
  192.  
  193.    It is recognized that several of the extensions planned for SMTP will    make use of additional parameters associated with the MAIL FROM and    RCPT TO command. The syntax for these commands, again using the ABNF    notation of [2] as well as underlying definitions from [1], is: 
  194.  
  195.      esmtp-cmd        ::= inner-esmtp-cmd [SP esmtp-parameters] CR LF      esmtp-parameters ::= esmtp-parameter *(SP esmtp-parameter)      esmtp-parameter  ::= esmtp-keyword ["=" esmtp-value]      esmtp-keyword    ::= (ALPHA / DIGIT) *(ALPHA / DIGIT / "-") 
  196.  
  197.                           ; syntax and values depend on esmtp-keyword      esmtp-value      ::= 1*<any CHAR excluding "=", SP, and all                              control characters (US ASCII 0-31                              inclusive)> 
  198.  
  199.  
  200.  
  201.  Klensin, et al              Standards Track                     [Page 7] 
  202.  RFC 1869                SMTP Service Extensions            November 1995 
  203.  
  204.                            ; The following commands are extended to                           ; accept extended parameters.      inner-esmtp-cmd  ::= ("MAIL FROM:" reverse-path)   /                           ("RCPT TO:" forward-path) 
  205.  
  206.    All esmtp-keyword values must be registered as part of the IANA    registration process described above. This definition only provides    the framework for future extension; no extended MAIL FROM or RCPT TO    parameters are defined by this RFC. 
  207.  
  208. 6.1.  Error responses 
  209.  
  210.    If the server SMTP does not recognize or cannot implement one or more    of the parameters associated with a particular MAIL FROM or RCPT TO    command, it will return code 555. 
  211.  
  212.    If for some reason the server is temporarily unable to accomodate one    or more of the parameters associated with a MAIL FROM or RCPT TO    command, and if the definition of the specific parameter does not    mandate the use of another code, it should return code 455. 
  213.  
  214.    Errors specific to particular parameters and their values will be    specified in the parameter's defining RFC. 
  215.  
  216. 7.  Received: Header Field Annotation 
  217.  
  218.    SMTP servers are required to add an appropriate Received: field to    the headers of all messages they receive. A "with ESMTP" clause    should be added to this field when any SMTP service extensions are    used. "ESMTP" is hereby added to the list of standard protocol names    registered with IANA. 
  219.  
  220. 8.  Usage Examples 
  221.  
  222.  (1)   An interaction of the form: 
  223.  
  224.        S: <wait for connection on TCP port 25>        C: <open connection to server>        S: 220 dbc.mtview.ca.us SMTP service ready        C: EHLO ymir.claremont.edu        S: 250 dbc.mtview.ca.us says hello         ... 
  225.  
  226.        indicates that the server SMTP implements only those        SMTP commands which are defined as mandatory in [5]. 
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  Klensin, et al              Standards Track                     [Page 8] 
  233.  RFC 1869                SMTP Service Extensions            November 1995 
  234.  
  235.   (2)   In contrast, an interaction of the form: 
  236.  
  237.        S: <wait for connection on TCP port 25>        C: <open connection to server>        S: 220 dbc.mtview.ca.us SMTP service ready        C: EHLO ymir.claremont.edu        S: 250-dbc.mtview.ca.us says hello        S: 250-EXPN        S: 250-HELP        S: 250-8BITMIME        S: 250-XONE        S: 250 XVRB         ... 
  238.  
  239.        indicates that the server SMTP also implements the SMTP        EXPN and HELP commands, one standard service extension        (8BITMIME), and two nonstandard and unregistered        service extensions (XONE and XVRB). 
  240.  
  241.  (3)   Finally, a server that does not support SMTP service        extensions would act as follows: 
  242.  
  243.        S: <wait for connection on TCP port 25>        C: <open connection to server>        S: 220 dbc.mtview.ca.us SMTP service ready        C: EHLO ymir.claremont.edu        S: 500 Command not recognized: EHLO         ... 
  244.  
  245.        The 500 response indicates that the server SMTP does        not implement the extensions specified here.  The        client would normally send a HELO command and proceed        as specified in RFC 821.   See section 4.7 for        additional discussion. 
  246.  
  247. 9.  Security Considerations 
  248.  
  249.    This RFC does not discuss security issues and is not believed to    raise any security issues not already endemic in electronic mail and    present in fully conforming implementations of RFC-821.  It does    provide an announcement of server mail capabilities via the response    to the EHLO verb. However, all information provided by announcement    of any of the initial set of service extensions defined by this RFC    can be readily deduced by selective probing of the verbs required to    transport and deliver mail. The security implications of service    extensions described in other RFCs should be dealt with in those    RFCs. 
  250.  
  251.  
  252.  
  253.  Klensin, et al              Standards Track                     [Page 9] 
  254.  RFC 1869                SMTP Service Extensions            November 1995 
  255.  
  256.  10.  Acknowledgements 
  257.  
  258.    This document represents a synthesis of the ideas of many people and    reactions to the ideas and proposals of others.  Randall Atkinson,    Craig Everhart, Risto Kankkunen, and Greg Vaudreuil contributed ideas    and text sufficient to be considered co-authors.  Other important    suggestions, text, or encouragement came from Harald Alvestrand, Jim    Conklin, Mark Crispin, Frank da Cruz, 'Olafur Gudmundsson, Per    Hedeland, Christian Huitma, Neil Katin, Eliot Lear, Harold A.    Miller, Keith Moore, John Myers, Dan Oscarsson, Julian Onions, Rayan    Zachariassen, and the contributions of the entire IETF SMTP Working    Group. Of course, none of the individuals are necessarily responsible    for the combination of ideas represented here. Indeed, in some cases,    the response to a particular criticism was to accept the problem    identification but to include an entirely different solution from the    one originally proposed. 
  259.  
  260. 11.  References 
  261.  
  262.    [1] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821,        USC/Information Sciences Institute, August 1982. 
  263.  
  264.    [2] Crocker, D., "Standard for the Format of ARPA Internet Text        Messages", STD 11, RFC 822, UDEL, August 1982. 
  265.  
  266.    [3] Borenstein, N., and N. Freed, "Multipurpose Internet Mail        Extensions", RFC 1521, Bellcore, Innosoft, September 1993. 
  267.  
  268.    [4] Moore, K., "Representation of Non-ASCII Text in Internet Message        Headers", RFC 1522, University of Tennessee, September 1993. 
  269.  
  270.    [5] Braden, R., "Requirements for Internet Hosts - Application and        Support", STD 3, RFC 1123, USC/Information Sciences Institute,        October 1989. 
  271.  
  272. 12.  Chair, Editor, and Author Addresses 
  273.  
  274.    John Klensin, WG Chair    MCI    2100 Reston Parkway    Reston, VA 22091 
  275.  
  276.    Phone: +1 703 715-7361    Fax: +1 703 715-7436    EMail: klensin@mci.net 
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  Klensin, et al              Standards Track                    [Page 10] 
  283.  RFC 1869                SMTP Service Extensions            November 1995 
  284.  
  285.     Ned Freed, Editor    Innosoft International, Inc.    1050 East Garvey Avenue South    West Covina, CA 91790    USA 
  286.  
  287.    Phone: +1 818 919 3600    Fax: +1 818 919 3614    EMail: ned@innosoft.com 
  288.  
  289.     Marshall T. Rose    Dover Beach Consulting, Inc.    420 Whisman Court    Moutain View, CA  94043-2186    USA 
  290.  
  291.    Phone: +1 415 968 1052    Fax: +1 415 968 2510    EMail: mrose@dbc.mtview.ca.us 
  292.  
  293.     Einar A. Stefferud    Network Management Associates, Inc.    17301 Drey Lane    Huntington Beach, CA, 92647-5615    USA 
  294.  
  295.    Phone: +1 714 842 3711    Fax: +1 714 848 2091    EMail: stef@nma.com 
  296.  
  297.     Dave Crocker    Brandenburg Consulting    675 Spruce Dr.    Sunnyvale, CA 94086 USA    USA 
  298.  
  299.    Phone: +1 408 246 8253    Fax: +1 408 249 6205    EMail: dcrocker@mordor.stanford.edu 
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309. Klensin, et al              Standards Track                    [Page 11] 
  310.  
  311.