home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / rfc / rfc1845 < prev    next >
Text File  |  1995-09-28  |  15KB  |  396 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                         D. Crocker
  8. Request For Comments: 1845                        Brandenburg Consulting
  9. Category: Experimental                                          N. Freed
  10.                                             Innosoft International, Inc.
  11.                                                    A. Cargille, WG Chair
  12.                                                           September 1995
  13.  
  14.  
  15.                          SMTP Service Extension
  16.                          for Checkpoint/Restart
  17.  
  18. Status of this Memo
  19.  
  20.    This memo defines an Experimental Protocol for the Internet
  21.    community.  This memo does not specify an Internet standard of any
  22.    kind.  Discussion and suggestions for improvement are requested.
  23.    Distribution of this memo is unlimited.
  24.  
  25. Abstract
  26.  
  27.    This memo defines an extension to the SMTP service whereby an
  28.    interrupted SMTP transaction can be restarted at a later time without
  29.    having to repeat all of the commands and message content sent prior
  30.    to the interruption.
  31.  
  32. 1.  Introduction
  33.  
  34.    Although SMTP is widely and robustly deployed, various extensions
  35.    have been requested by parts of the Internet community. In
  36.    particular, when dealing with very large messages over less reliable
  37.    connections it is possible for substantial resources to be consumed
  38.    by repeated unsuccessful attempts to transmit the message in its
  39.    entirety. The original SMTP specification [1] does not provide any
  40.    means to pick up a partially completed transaction after the
  41.    underlying TCP connection has been broken and reestablished.
  42.  
  43.    This memo provides a facility by which a client can uniquely identify
  44.    a particular SMTP transaction. The server then stores this
  45.    identifying information along with all the information it receives as
  46.    the transaction proceeds. If the transaction is interrupted during
  47.    the data transfer phase the SMTP client may establish a new SMTP
  48.    session at a later time and ask the server to continue the
  49.    transaction from the point where the server lost its connection with
  50.    the client. The server then reestablishes the transaction context and
  51.    tells the client where to resume operations. If this is acceptable
  52.    the client resumes operations at this point.
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Crocker, Freed & Cargille     Experimental                      [Page 1]
  59.  
  60. RFC 1845                SMTP Checkpoint/Restart           September 1995
  61.  
  62.  
  63.    This extension may also be used to work around the common timeout
  64.    problem where a client times out waiting for a response from the
  65.    server acknowledging that the message has been accepted. However, use
  66.    of this extension is not an acceptable substitute for proper setting
  67.    of timeout parameters.
  68.  
  69. 2.  Framework for the Checkpointing Extension
  70.  
  71.    The checkpointing extension is laid out as follows:
  72.  
  73.  (1)   the name of the SMTP service extension defined here is
  74.        checkpointing;
  75.  
  76.  (2)   the EHLO keyword value associated with the extension is
  77.        CHECKPOINT;
  78.  
  79.  (3)   no parameter is used with the CHECKPOINT EHLO keyword;
  80.  
  81.  (4)   one optional parameter using the keyword TRANSID is
  82.        added to the MAIL FROM command.  The value associated
  83.        with this parameter, coupled with the name of the
  84.        client taken from EHLO command, forms a globally unique
  85.        value that identifies this particular transaction and
  86.        serves to distinguish it from all others. This value is
  87.        case-sensitive. The syntax of the value is as follows,
  88.        using the ABNF notation of [2]:
  89.  
  90.             transid-value  ::= "<" transid-spec ">"
  91.                                ; transid-value may not be longer than
  92.                                ; 80 characters
  93.             transid-spec   ::= transid-local "@" transid-domain
  94.             transid-domain ::= transid-token
  95.             transid-local  ::= transid-token
  96.             transid-token  ::= transid-atom *("." transid-atom)
  97.             transid-atom   ::= 1*<any (ASCII) CHAR except SPACE,
  98.                                   CTLs, tspecials, or ".">
  99.  
  100.        NOTE: tspecials is defined in [3]. The TRANSID is
  101.        likely to be different from the RFC822 message id,
  102.        since it must uniquely identify the particular copy of
  103.        the message being sent over this SMTP link. However,
  104.        the syntax of transid-value is designed so that any
  105.        TRANSID is both a legal RFC822 msg-id as well as being
  106.        a legal esmtp-value [4].
  107.  
  108.  (5)   The maximum length of a MAIL FROM command line is
  109.        increased by 88 characters by the possible addition of
  110.        the TRANSID keyword and value;
  111.  
  112.  
  113.  
  114. Crocker, Freed & Cargille     Experimental                      [Page 2]
  115.  
  116. RFC 1845                SMTP Checkpoint/Restart           September 1995
  117.  
  118.  
  119.  (6)   no additional SMTP verbs are defined by this extension;
  120.        and,
  121.  
  122.  (7)   the next section specifies how support for the
  123.        extension affects the behavior of a server and client
  124.        SMTP.
  125.  
  126. 3.  The checkpointing service extension
  127.  
  128.    When a client SMTP wishes to use checkpointing to eliminate the need
  129.    to retransmit all message data in its entirety in the event of a
  130.    session interruption, it first issues the EHLO command to the server
  131.    SMTP. If the server SMTP responds with code 250 to the EHLO command,
  132.    and the response includes the EHLO keyword value CHECKPOINT, then the
  133.    server SMTP is indicating that it supports SMTP checkpointing and
  134.    will honor requests to restart interrupted SMTP transactions.
  135.  
  136.    The extended MAIL command is issued by a client SMTP when it wishes
  137.    to enable server checkpointing. The syntax for this command is
  138.    identical to the MAIL command in [1], except that a TRANSID parameter
  139.    must appear after the address.
  140.  
  141.    The complete syntax of this extended command is defined in [4], with
  142.    the esmtp-keyword TRANSID and transid-value parameter as previously
  143.    defined.
  144.  
  145.    The value associated with the TRANSID parameter must be an identifier
  146.    that serves to uniquely identify this particular SMTP transaction.
  147.    Only one TRANSID parameter may be used in a single MAIL command. Care
  148.    must be used in constructing TRANSID values to simultaneously insure
  149.    both uniqueness and the ability to reidentify interrupted
  150.    transactions.
  151.  
  152.    The TRANSID is structured to ensure globally uniqueness without any
  153.    additional registry. The transid-domain part should be a valid domain
  154.    name that uniquely identifies the SMTP client. Note that this is
  155.    usually the same as the domain name given in conjunction with the
  156.    EHLO command, but not always. The EHLO domain name identifies the
  157.    specific host the SMTP connection originated from, whereas the
  158.    transid-domain may refer to a group of hosts that collectively host a
  159.    multi-homed SMTP client. The transid-local part should be an
  160.    identifier that distinguishes this SMTP transaction from any other
  161.    originating from this SMTP client.
  162.  
  163.    Despite the structured nature of the TRANSID the server should treat
  164.    the value as an opaque, case-sensitive string.
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Crocker, Freed & Cargille     Experimental                      [Page 3]
  171.  
  172. RFC 1845                SMTP Checkpoint/Restart           September 1995
  173.  
  174.  
  175.    Note that the contents of the RFC822 message-id header typically are
  176.    NOT appropriate for use as the TRANSID parameter value, since such
  177.    identifiers may be associated with multiple copies of the same
  178.    message -- e.g., as it is split during transmission down different
  179.    network paths -- and hence with multiple distinct SMTP transactions.
  180.  
  181.    A server which supports the checkpointing extension will then retain
  182.    the transaction identifer as well as the most recent state of the
  183.    transaction in non-volatile storage. This information should deleted
  184.    only when the transaction is known to be complete from the client's
  185.    perspective. Completion is assured only when the client either
  186.    explicitly aborts the transaction, starts a new transaction, or
  187.    requests that the connection be closed with a QUIT command.
  188.  
  189.    In the event of an interruption prior to completing a transaction
  190.    this preserved state will remain for some period of time defined by
  191.    the operational policies of the server administrator. It is
  192.    recommended that transaction state information be preserved for at
  193.    least 48 hours, although no specific time is required.
  194.  
  195.    When a client detects that a transaction has been interrupted, it
  196.    then must wait for some period before reconnecting. This period must
  197.    be long enough for server connections to time out and for the
  198.    transaction state associated with such connections to be released for
  199.    use by a new connection. The Internet Host Requirements [5] also
  200.    impose restriction on how quickly reconnection attempts can be made
  201.    (section 5.3.1.1).
  202.  
  203.    Once the necessary period has elapsed the client first checks the DNS
  204.    as described in [6] and determine the set of acceptable IP addresses
  205.    the message can be transferred to. If the IP address used to connect
  206.    to the original server is still on this list it should be tried
  207.    first, since this server is most likely to be capable of restarting
  208.    the transaction. If this connection attempt fails the client must
  209.    then proceed as described in [6] to try all the remaining IP
  210.    addresses and restart the transaction there. If the attempt to
  211.    restart fails on one of the other servers the client is required to
  212.    retransmit the transaction in its entirety at that point.  Waiting
  213.    for a server with an interrupted transaction state to come back
  214.    online is not acceptable.
  215.  
  216.    Note: Multi-homed SMTP servers do exist, which means that it is
  217.    entirely possible for a transaction to restart on a different server
  218.    host.
  219.  
  220.    Once the connection is made the client issues the same MAIL command
  221.    with exactly the same transaction identifier. If the transaction was
  222.    interrupted during or at the end of the transfer of actual message
  223.  
  224.  
  225.  
  226. Crocker, Freed & Cargille     Experimental                      [Page 4]
  227.  
  228. RFC 1845                SMTP Checkpoint/Restart           September 1995
  229.  
  230.  
  231.    data, the server first reestablishes its context to a point close as
  232.    possible to the point of interruption and then responds with the
  233.    status message:
  234.  
  235.      355 octet-offset is the transaction offset
  236.  
  237.    The actual status text can vary. However the octet-offset field is
  238.    required to be the first thing on the first line of the reply, it
  239.    must be separated from any following text by linear whitespace, and
  240.    it is structured as follows:
  241.  
  242.      octet-offset ::= 1*DIGIT
  243.  
  244.    The octet-offset represents an offset, counting from zero, to the
  245.    particular octet in the actual message data the server expects to see
  246.    next. (This is also a count of how many octets the server has
  247.    received and stored successfully.) This offset does NOT account for
  248.    envelope data, i.e., MAIL FROM and RCPT TO commands. A value of 0
  249.    would indicate that the client needs to start sending the message
  250.    from the beginning, a value of 1 would indicate that the client
  251.    should skip one octet, and so on.
  252.  
  253.    The SMTP canonical format for messages is used when this offset is
  254.    computed.  Any octets added by any SMTP data-stuffing algorithm do
  255.    not count as part of this offset. In the case of data transferred
  256.    with the DATA command the offset must also correspond to the
  257.    beginning of a line.
  258.  
  259.    Once this context is reestablished the client issues another data
  260.    transfer command (e.g., DATA) and sends the remaining message data.
  261.    Once this data is terminated the transaction completes in the normal
  262.    fashion and the server deletes the transaction context from non-
  263.    volatile storage.
  264.  
  265.    Note that the semantics of the octet-offset immediately suggest a
  266.    particularly simple implementation strategy, where the client
  267.    retransmits the message data as it normally would but suppresses
  268.    output of the first octet-offset octets of material. The semantics
  269.    used here are intentionally designed to make such implementation
  270.    possible, but care must be taken to insure that such an
  271.    implementation strategy does not impose a significant performance
  272.    penalty on the client.
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Crocker, Freed & Cargille     Experimental                      [Page 5]
  283.  
  284. RFC 1845                SMTP Checkpoint/Restart           September 1995
  285.  
  286.  
  287. 5.  Usage Example
  288.  
  289.    The following dialogue illustrates the use of the checkpointing
  290.    service extension:
  291.  
  292. S: <wait for connection on TCP port 25>
  293. C: <open connection to server>
  294. S: 220 dbc.mtview.ca.us SMTP service ready
  295. C: EHLO ymir.claremont.edu
  296. S: 250-dbc.mtview.ca.us says hello
  297. S: 250 CHECKPOINT
  298. C: MAIL FROM:<ned@ymir.claremont.edu> TRANSID=<12345@claremont.edu>
  299. S: 250 <ned@ymir.claremont.edu>... Sender and TRANSID ok
  300. C: RCPT TO:<mrose@dbc.mtview.ca.us>
  301. S: 250 <mrose@dbc.mtview.ca.us>... Recipient ok
  302. C: DATA
  303. S: 354 Send checkpointed message, ending in CRLF.CRLF
  304. <some amount of message data transmitted>
  305. <session is interrupted and TCP connection is broken>
  306.  
  307. Some time later a new connection is established:
  308. S: <wait for connection on TCP port 25>
  309. C: <open connection to server>
  310. S: 220 dbc.mtview.ca.us SMTP service ready
  311. C: EHLO ymir.claremont.edu
  312. S: 250-dbc.mtview.ca.us says hello
  313. S: 250 CHECKPOINT
  314. C: MAIL FROM:<ned@ymir.claremont.edu> TRANSID=<12345@claremont.edu>
  315. S: 355 6135 is the transaction offset
  316. C: DATA
  317. S: 354 Send previously checkpointed message starting at octet 6135
  318. C: <message data minus first 6135 octets sent>
  319. C: .
  320. S: 250 OK
  321. C: QUIT
  322. S: 221 Goodbye
  323.  
  324. 6.  Security Considerations
  325.  
  326.    This RFC does not discuss security issues and is not believed to
  327.    raise any security issues not already endemic in electronic mail and
  328.    present in fully conforming implementations of [1].
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Crocker, Freed & Cargille     Experimental                      [Page 6]
  339.  
  340. RFC 1845                SMTP Checkpoint/Restart           September 1995
  341.  
  342.  
  343. 7.  References
  344.  
  345.    [1] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821,
  346.        USC/Information Sciences Institute, August 1982.
  347.  
  348.    [2] Crocker, D., "Standard for the Format of ARPA Internet Text
  349.        Messages", STD 11, RFC 822, UDEL, August 1982.
  350.  
  351.    [3] Borenstein, N., and N. Freed, "Multipurpose Internet Mail
  352.        Extensions", RFC 1521, Bellcore, Innosoft, September 1993.
  353.  
  354.    [4] Rose, M., Stefferud, E., Crocker, D., Klensin, J., and N. Freed,
  355.        "SMTP Service Extensions", RFC 1651, Dover Beach Consulting,
  356.        Inc., Network Management Associates, Inc., Silicon Graphics,
  357.        Inc., MCI, Innosoft, July 1994.
  358.  
  359.    [5] Braden, R., Editor, "Requirements for Internet Hosts -
  360.        Application and Support", STD 3, RFC 1123, USC/Information
  361.        Sciences Institute, October 1989.
  362.  
  363.    [6] Partridge, C., "Mail Routing and the Domain System", STD 14, RFC
  364.        974, BBN, January 1986.
  365.  
  366. 8.  Authors' Addresses
  367.  
  368.        Dave Crocker
  369.        Brandenburg Consulting
  370.        675 Spruce Dr.
  371.        Sunnyvale, CA 94086 USA
  372.        USA
  373.  
  374.        Phone: +1 408 246 8253
  375.        Fax: +1 408 249 6205
  376.        EMail: dcrocker@mordor.stanford.edu
  377.  
  378.  
  379.        Ned Freed
  380.        Innosoft International, Inc.
  381.        1050 East Garvey Avenue South
  382.        West Covina, CA 91790
  383.        USA
  384.  
  385.        Phone: +1 818 919 3600
  386.        Fax: +1 818 919 3614
  387.        EMail: ned@innosoft.com
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Crocker, Freed & Cargille     Experimental                      [Page 7]
  395.  
  396.