home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 700s / rfc753.txt < prev    next >
Text File  |  1992-10-14  |  93KB  |  3,644 lines

  1.  
  2.                                                               March 1979
  3.  
  4. IEN: 85
  5. RFC: 753
  6.                                     
  7.                                     
  8.                                     
  9.                                     
  10.                                     
  11.                                     
  12.                        INTERNET MESSAGE PROTOCOL
  13.                                     
  14.                                     
  15.                                     
  16.                            Jonathan B. Postel
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.                                March 1979
  35.                                     
  36.                                     
  37.                                     
  38.                                     
  39.                      Information Sciences Institute
  40.                    University of Southern California
  41.                            4676 Admiralty Way
  42.                    Marina del Rey, California  90291
  43.                                     
  44.                              (213) 822-1511
  45.  
  46.  
  47. < INC-PROJECT, MAIL-MAR-79.NLS.38, >, 31-Mar-79 19:50 JBP ;;;;
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102. [Page 0]                                                          Postel
  103.  
  104.  
  105. March 1979                                                              
  106.                                                Internet Message Protocol
  107.  
  108.  
  109.  
  110.                            TABLE OF CONTENTS
  111.  
  112.     PREFACE ........................................................ iii
  113.  
  114. 1.  INTRODUCTION ..................................................... 1
  115.  
  116.   1.1.  Motivation ................................................... 1
  117.   1.2.  Scope ........................................................ 1
  118.   1.3.  The Internetwork Environment ................................. 2
  119.   1.4.  Operation .................................................... 2
  120.   1.5.  Interfaces ................................................... 3
  121.  
  122. 2.  FUNCTIONAL DESCRIPTION ........................................... 5
  123.  
  124.   2.1.  Relation to Other Protocols .................................. 5
  125.   2.2.  Terminology  ................................................. 5
  126.   2.3.  Assumptions .................................................. 6
  127.   2.4.  General Specification ........................................ 7
  128.   2.5.  Mechanisms .................................................. 11
  129.  
  130. 3.  DETAILED SPECIFICATION .......................................... 13
  131.  
  132.   3.1.  Overview of Message Structure ............................... 13
  133.   3.2.  Data Elements ............................................... 13
  134.   3.3.  Message Objects ............................................. 16
  135.   3.4.  Command ..................................................... 23
  136.   3.5.  Document .................................................... 31
  137.   3.6.  Message Structure ........................................... 33
  138.   3.7.  MPM Organization ............................................ 36
  139.   3.8.  Interfaces .................................................. 39
  140.  
  141. 4.  EXAMPLES & SCENARIOS ............................................ 41
  142.  
  143.   Example 1:  Message Format ........................................ 41
  144.   Example 2:  Delivery and Acknowledgment ........................... 43
  145.  
  146. GLOSSARY ............................................................ 49
  147.  
  148. REFERENCES .......................................................... 51
  149.  
  150. APPENDICES .......................................................... 53
  151.  
  152.   
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161. Postel                                                          [Page i]
  162.  
  163.  
  164.                                                               March 1979
  165. Internet Message Protocol
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220. [Page ii]                                                         Postel
  221.  
  222.  
  223. March 1979                                                              
  224.                                                Internet Message Protocol
  225.  
  226.  
  227.  
  228.                                 PREFACE
  229.  
  230.  
  231.  
  232. This is the first edition of this specification and should be treated as
  233. a request for comments, advice, and suggestions.  A great deal of prior
  234. work has been done on computer aided message systems and some of this is
  235. listed in the reference section.  This specification was shaped by many
  236. discusions with members of the ARPA research community, and others
  237. interested in the development of computer aided message systems.  This
  238. document was prepared as part of the ARPA sponsored Internetwork
  239. Concepts Research Project at ISI, with the assistance of Greg Finn, Alan
  240. Katz, Paul Mockapetris, and Mamie Chew.
  241.  
  242.                                                               Jon Postel
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279. Postel                                                        [Page iii]
  280.  
  281.  
  282.                                                               March 1979
  283. Internet Message Protocol
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. [Page iv]                                                         Postel
  339.  
  340.  
  341. March 1979                                                              
  342. IEN: 85                                                        J. Postel
  343. RFC: 753                                                         USC-ISI
  344.                                                               March 1979
  345.  
  346.  
  347.  
  348.  
  349.                        INTERNET MESSAGE PROTOCOL
  350.  
  351.  
  352.  
  353.                             1.  INTRODUCTION
  354.  
  355. This document describes an internetwork message system.  The system is
  356. designed to transmit messages between message processing modules
  357. according to formats and procedures specified in this document.  The
  358. message processing modules are processes in host computers.  Message
  359. processing modules are located in different networks and together
  360. constitute an internetwork message delivery system.
  361.  
  362. This document is intended to provide all the information necessary to
  363. implement a compatible cooperating module of this internetwork message
  364. system.
  365.  
  366. 1.1.  Motivation
  367.  
  368.   As computer supported message processing activities grow on individual
  369.   host computers and in networks of computers, there is a natural desire
  370.   to provide for the interconnection and interworking of such systems.
  371.   This specification describes the formats and procedures of a general
  372.   purpose internetwork message system, which can be used as a standard
  373.   for the interconnection of individual message systems, or as a message
  374.   system in its own right.
  375.  
  376.   We also provide for the communication of data items beyond the scope
  377.   of contemporary message systems.  Messages can include typed segments
  378.   which could represent drawings, or facsimile images, or digitized
  379.   speech.  One can imagine message stations equipped with speakers and
  380.   microphones (or telephone hand sets) where the body of a message or a
  381.   portion of it is recorded digitized speech.  The output terminal could
  382.   include a graphics display, and the message might present a drawing on
  383.   the display, and verbally (via the speaker) describe certain features
  384.   of the drawing.  This specification provides basic data elements for
  385.   the transmission of structured binary data, as well as providing for
  386.   text transmission.
  387.  
  388. 1.2.  Scope
  389.  
  390.   The Internet Message Protocol is intended to be used for the
  391.   transmission of messages between networks.  It may also be used for
  392.   the local message system of a network or host.  This specification was
  393.   developed in the context of the ARPA work on the interconnection of
  394.   networks, but it is anticipated that it has a more general scope.
  395.  
  396.  
  397. Postel                                                          [Page 1]
  398.  
  399.  
  400.                                                               March 1979
  401. Internet Message Protocol
  402. Introduction
  403.  
  404.  
  405.  
  406.   The focus here is on the internal mechanisms to transmit messages,
  407.   rather than the external interface to users.  It is assumed that a
  408.   number of user interface programs will exist.  These will be both new
  409.   programs designed to work with system and old programs designed to
  410.   work with earlier systems.
  411.  
  412. 1.3.  The Internetwork Environment
  413.  
  414.   The internetwork message environment consists of processes which run
  415.   in hosts which are connected to networks which are interconnected by
  416.   gateways.  Each individual network consists of many different hosts.
  417.   The networks are tied together through gateways.  The gateways are
  418.   essentially hosts on two (or more) networks and are not assumed to
  419.   have much storage capacity or to "know" which hosts are on the
  420.   networks to which they are attached [5].
  421.  
  422. 1.4.  Operation
  423.  
  424.   The model of operation is that this protocol is implemented in a
  425.   process.  Such a process is called a Message Processing Module or MPM.
  426.   The MPMs exchange messages by establishing full duplex communication
  427.   and sending the messages in a fixed format described in this document.
  428.   The MPM may also communicate other information by means of commands
  429.   described here.
  430.  
  431.   A message is formed by a user interacting with a User Interface
  432.   Program or UIP.  The user may utilize several commands to create
  433.   various fields of the message and may invoke an editor program to
  434.   correct or format some or all of the message.  Once the user is
  435.   satisfied with the messages it is "sent" by placing it in a data
  436.   structure shared with the MPM.
  437.  
  438.   The MPM discovers the unprocessed input data (either by a specific
  439.   request or by a general background search), examines it, and using
  440.   routing tables determines which outgoing link to use.  The destination
  441.   may be another user on this host, a user on another host in this
  442.   network, or a user in another network.
  443.  
  444.   In the first case, another user on this host, the MPM places the
  445.   message in a data structure shared with the destination user, where
  446.   that user's UIP will look for incoming messages.
  447.  
  448.   In the second case, the user on another host in this network, the MPM
  449.   transmits the message to the MPM on that host.  That MPM then repeats
  450.   the routing decision, and discovering the destination is local to it,
  451.   places the messages in the data structure shared with the destination
  452.   user.
  453.  
  454.  
  455.  
  456. [Page 2]                                                          Postel
  457.  
  458.  
  459. March 1979                                                              
  460.                                                Internet Message Protocol
  461.                                                             Introduction
  462.  
  463.  
  464.  
  465.   In the third case, the user on a host in another network, the MPM
  466.   transmits the messages to an MPM in that network if it knows how to
  467.   establish a connection directly to it, otherwise the MPM transmits the
  468.   message to an MPM that is "closer" to the destination.  An MPM might
  469.   not know of direct connections to MPMs in all other networks, but it
  470.   must be able to select a next MPM to handle the message for each
  471.   possible destination network.
  472.  
  473.   A MPM might know a way to establish direct connections to each of a
  474.   few MPMs in other nearby networks, and send all other messages to a
  475.   particular big brother MPM that has a wider knowledge of the internet
  476.   environment.
  477.  
  478.   A individual network's message system may be quite different from the
  479.   internet message system.  In this case, intranet messages will be
  480.   delivered using the network's own message system.  If a message is
  481.   addressed outside the network, it is given to a MPM which then sends
  482.   it through the appropriate gateways via internet procedures and format
  483.   to (or toward) the MPM in the destination network.  Eventually, the
  484.   message gets to a MPM on the network of the recipient of the message.
  485.   The message is then sent via the local message system to that host.
  486.  
  487.   When local message protocols are used, special conversion programs are
  488.   required to transform local messages to internet format when they are
  489.   going out, and to transform internet messages to local format when
  490.   they come into the local environment.  Such transformations are
  491.   potentially information lossy.  The internet message format attempts
  492.   to provide features to capture all the information any local message
  493.   system might use.  However, a particular local message system is
  494.   unlikely to have features equivalent to all the possible features of
  495.   the internet message system.  Thus, in some cases the transformation
  496.   of an internet message to a local message discard of some of the
  497.   information.  For example, if an internet message carrying mixed text
  498.   and speech data in the body is to be delivered in a local system which
  499.   only carries text, the speech data may be replaced by the text string
  500.   "There was some speech here".  Such discarding of information is to be
  501.   avoided when at all possible, and to be defered as long as possible,
  502.   still the possibility remains, that in some cases, it is the only
  503.   reasonable thing to do.
  504.  
  505. 1.5.  Interfaces
  506.  
  507.   The MPM calls on a reliable communication procedure to communicate
  508.   with other MPMs.  This is a Transport Level protocol such as the TCP
  509.   [20].  The interface to such a procedure conventionally provides calls
  510.   to open and close connections, send and receive data on a connection,
  511.   and some means to signal and be notified of special conditions (i.e.,
  512.   interrupts).
  513.  
  514.  
  515. Postel                                                          [Page 3]
  516.  
  517.  
  518.                                                               March 1979
  519. Internet Message Protocol
  520. Introduction
  521.  
  522.  
  523.  
  524.   The MPM receives input and produces output through data structures
  525.   that are produced and consumed respectively by user interface (or
  526.   other) programs.
  527.  
  528.   
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  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.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574. [Page 4]                                                          Postel
  575.  
  576.  
  577. March 1979                                                              
  578.                                                Internet Message Protocol
  579.  
  580.  
  581.  
  582.                        2.  FUNCTIONAL DESCRIPTION
  583.  
  584. 2.1.  Terminology
  585.  
  586.   The basic unit transferred between networks is called a message.  A
  587.   message is made up of a transaction identifier (a number which
  588.   uniquely identifies the message), a command list (which contains the
  589.   necessary information for delivery), and the document list.  The
  590.   document list consists of a header and a body, which contains the
  591.   actual data of the message.
  592.  
  593.   For a personal letter the document body corresponds to the contents
  594.   the a letter, the document header corresponds to the the address and
  595.   return address on the envelope.
  596.  
  597.   For an inter-office memo the document body corresponds to the text,
  598.   the document header corresponds to the header of the memo.
  599.  
  600.   The commands correspond to the information used by the Post Office or
  601.   the mail room to route the letter or memo.
  602.  
  603.   The messages are routed by a process called the message processing
  604.   module or MPM.  Messages are created and consumed by User Interface
  605.   Programs (UIPs) in conjunction with users.
  606.  
  607.   Please see the Glossary section for a more complete list of
  608.   terminology.
  609.  
  610. 2.2.  Assumptions
  611.  
  612.   The following assumptions are made about the internetwork environment:
  613.  
  614.   It is in general not known what format intranet addresses will assume.
  615.   Since no standard addressing scheme would suit all networks, it is
  616.   safe to assume there will be several and that they will change with
  617.   time.  Thus, frequent software modification throughout all internet
  618.   MPMs would be required if such MPMs were to know about the formats on
  619.   many networks.  Therefore, each MPM which handles internet messages is
  620.   required to know only the minimum necessary to deliver them.
  621.  
  622.   We require each MPM to know completely only the addressing format of
  623.   its own network.  In addition, the MPM must be able to select an
  624.   output link for each message addressed to another network or host.
  625.   This does not preclude more intelligent behavior on the part of a
  626.   given MPM, but at least this minimum is necessary.  Each network has a
  627.   unique name and number.
  628.  
  629.   Each MPM will have a unique internet address.  This feature will
  630.  
  631.  
  632.  
  633. Postel                                                          [Page 5]
  634.  
  635.  
  636.                                                               March 1979
  637. Internet Message Protocol
  638. Functional Description
  639.  
  640.  
  641.  
  642.   enable every MPM to place a unique "handling-stamp" on a message which
  643.   passes through it en-route to delivery.
  644.  
  645. 2.3.  General Specification
  646.  
  647.   There are several aspects to a distributed service to be specified.
  648.   First there is the service to be provided, that is, the
  649.   characteristics of the service as seen by its users.  Second there is
  650.   the service it uses, that is, the characteristics it assumes to be
  651.   provided by some lower level service.  And, third there is the
  652.   protocol used between the modules of the distributed service.
  653.  
  654.        User                                          User       
  655.           \                                          /          
  656.            \                                        /           
  657.             \                                      /            
  658.          --+----------------------------------------+-- Service 
  659.            !   \                                /   ! Interface 
  660.            !  +--------+                +--------+  !           
  661.            !  ! Module ! <--Protocol--> ! Module !  !           
  662.            !  +--------+                +--------+  !           
  663.            !        \                       /       !           
  664.            !        +-----------------------+       !           
  665.            !        ! Communication Service !       !           
  666.            !        +-----------------------+       !           
  667.            !                                        !           
  668.            +----------------------------------------+           
  669.  
  670.                             Message Service
  671.  
  672.                                Figure 1.
  673.  
  674.   The User/Message Service Interface
  675.  
  676.     The service the message delivery system provides is to accept
  677.     messages conforming to a specified format and to attempt to deliver
  678.     those messages, and to report on the success or failure of the
  679.     delivery attempt.  This service is provided in the context of an
  680.     interconnected system of networks, and may involve relaying a
  681.     message through several intermediate MPMs utilizing different
  682.     communication services.
  683.  
  684.   The Message/Communication Service Interface
  685.  
  686.     The message delivery system calls on a communication service to
  687.     transfer information from one MPM to another.  There may be
  688.     different communication services used between different pairs of
  689.  
  690.  
  691.  
  692. [Page 6]                                                          Postel
  693.  
  694.  
  695. March 1979                                                              
  696.                                                Internet Message Protocol
  697.                                                   Functional Description
  698.  
  699.  
  700.  
  701.     MPMs, though all communication services must meet the following
  702.     service characteristics.
  703.  
  704.     It is assumed that the communication service provides a reliable two
  705.     way data stream.  Such a data stream can usually be obtained in
  706.     computer networks from the transport level protocol, for example,
  707.     the Transmission Control Protocol (TCP) [20].  In any case the
  708.     properties the communication service must provide are:
  709.  
  710.       o  Logical connections for two way simultaneous data flow of
  711.          arbitrary data (i.e., no forbidden codes).  Data is delivered
  712.          in the order sent with no gaps.
  713.  
  714.       o  Simple commands to open and close the connections, and to send
  715.          and receive data on the connections.
  716.  
  717.       o  A way to signal and be notified "out-of-band" (such as TCP's
  718.          urgent) is available so that some messages can be labeled "more
  719.          important" than others.
  720.  
  721.       o  Controlled flow of data so that data is not transmitted faster
  722.          that the receiver chooses to consume it (on the average).
  723.  
  724.       o  Transmission errors are corrected without user notification or
  725.          involvement.  Complete breakdown on communication is reported
  726.          to the user.
  727.  
  728.   The Message-Message Protocol
  729.  
  730.     The protocol used between the distributed modules of the message
  731.     delivery system, that is, the MPMs is a small set of commands which
  732.     convey requests and replies.  These commands are encoded in a highly
  733.     structured and rigidly specified format.
  734.  
  735. 2.4.  Mechanisms
  736.  
  737.   MPMs are processes which use some communication service.  A pair of
  738.   MPMs which can communicate reside in a common interprocess
  739.   communication environment.  A MPM might exist in two (or more)
  740.   interprocess communication environments, and such an MPM might act to
  741.   relay messages between MPMs in the environments.
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751. Postel                                                          [Page 7]
  752.  
  753.  
  754.                                                               March 1979
  755. Internet Message Protocol
  756. Functional Description
  757.  
  758.  
  759.  
  760.      User                                                    User 
  761.        \                                                      /   
  762.         \                                                    /    
  763.          \                                                  /     
  764.       +---------------------------------------------------------+ 
  765.       !    \                                              /     ! 
  766.       !  +-----+                +-----+                +-----+  ! 
  767.       !  ! MPM ! <--Protocol--> ! MPM ! <--Protocol--> ! MPM !  ! 
  768.       !  +-----+                +-----+                +-----+  ! 
  769.       !     !                    /   \                    !     ! 
  770.       !  +-----------------------+   +-----------------------+  ! 
  771.       !  !Communication Service A!   !Communication Service B!  ! 
  772.       !  +-----------------------+   +-----------------------+  ! 
  773.       !                                                         ! 
  774.       +---------------------------------------------------------+ 
  775.  
  776.                  Message Service with Internal Relaying
  777.  
  778.                                Figure 2.
  779.  
  780.   The transfer of data between UIPs and MPMs is conceived of as the
  781.   exchange of data structures which encode messages.  The transfer of
  782.   data between MPMs is also in terms of the transmission of structured
  783.   data.
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810. [Page 8]                                                          Postel
  811.  
  812.  
  813. March 1979                                                              
  814.                                                Internet Message Protocol
  815.                                                   Functional Description
  816.  
  817.  
  818.  
  819.                     +-----+     DATA       +-----+         
  820.              USER-->! UIP !-->STRUCTURES-->! MPM !-->other 
  821.                     +-----+    +-----+     +-----+    MPMs 
  822.                                !     !                     
  823.                                !  +-----+                  
  824.                                +--!     !                  
  825.                                   !  +-----+               
  826.                                   +--!     !               
  827.                                      !     !               
  828.                                      +-----+               
  829.  
  830.                      +-----+     DATA       +-----+        
  831.              other-->! MPM !-->STRUCTURES-->! UIP !-->USER 
  832.              MPMs    +-----+    +-----+     +-----+        
  833.                                 !     !                    
  834.                                 !  +-----+                 
  835.                                 +--!     !                 
  836.                                    !  +-----+              
  837.                                    +--!     !              
  838.                                       !     !              
  839.                                       +-----+              
  840.  
  841.                               Message Flow
  842.  
  843.                                Figure 3.
  844.  
  845.   In the following, a message will be described as a structured data
  846.   object represented in a particular kind of typed data elements.  This
  847.   is how a message is presented when transmitted between MPMs or
  848.   exchanged between an MPM and a UIP.  Internal to a MPM (or a UIP), a
  849.   message may be represented in any convenient form.  As the following
  850.   figure shows, when a message is ready for transmission, it moves from
  851.   the processing routines to be encoded in the typed data elements and
  852.   then to a data compression routine, and is finally transmitted.  On
  853.   the receiving side, the message is first decompressed then decoded
  854.   from the data element representation to the local representation for
  855.   the processing routines.
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869. Postel                                                          [Page 9]
  870.  
  871.  
  872.                                                               March 1979
  873. Internet Message Protocol
  874. Functional Description
  875.  
  876.  
  877.  
  878.           +------------------------------------------------+ 
  879.           !                                                ! 
  880.           !  processing      DATA         DATA             ! 
  881.           !  routines   ---> ENCODER ---> COMPRESSOR --->  ! 
  882.           !                                                ! 
  883.           +------------------------------------------------+ 
  884.                              Send MPM                        
  885.                                                              
  886.           +------------------------------------------------+ 
  887.           !                                                ! 
  888.           !      DATA              DATA         processing ! 
  889.           ! ---> DECOMPRESSOR ---> DECODER ---> routines   ! 
  890.           !                                                ! 
  891.           +------------------------------------------------+ 
  892.                             Receive MPM                      
  893.  
  894.                              Detailed View
  895.  
  896.                                Figure 4.
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. [Page 10]                                                         Postel
  929.  
  930.  
  931. March 1979                                                              
  932.                                                Internet Message Protocol
  933.                                                   Functional Description
  934.  
  935.  
  936.  
  937. 2.5.  Relation to Other Protocols
  938.  
  939.   The following diagram illustrates the place of the message protocol in
  940.   the protocol hierarchy:
  941.  
  942.                                     
  943.    +------+ +-----+ +-------+ +-----+     +-----+                   
  944.    !Telnet! ! FTP ! !Message! !Voice! ... !     ! Application Level 
  945.    +------+ +-----+ +-------+ +-----+     +-----+                   
  946.            \   !   /             !           !                      
  947.             +-----+           +-----+     +-----+                   
  948.             ! TCP !           ! RTP ! ... !     ! Host Level        
  949.             +-----+           +-----+     +-----+                   
  950.                !                 !           !                      
  951.               +-------------------------------+                     
  952.               !       Internet Protocol       !   Gateway Level     
  953.               +-------------------------------+                     
  954.                               !                                     
  955.                  +---------------------------+                      
  956.                  !   Local Network Protocol  !    Network Level     
  957.                  +---------------------------+                      
  958.                               !                                     
  959.  
  960.  
  961.  
  962.                          Protocol Relationships
  963.  
  964.                                Figure 5.
  965.  
  966.   The message protocol interfaces on one side to user interface programs
  967.   and on the other side to a reliable transport protocol such as TCP.
  968.  
  969.   
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987. Postel                                                         [Page 11]
  988.  
  989.  
  990.                                                               March 1979
  991. Internet Message Protocol
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046. [Page 12]                                                         Postel
  1047.  
  1048.  
  1049. March 1979                                                              
  1050.                                                Internet Message Protocol
  1051.  
  1052.  
  1053.  
  1054.                        3.  DETAILED SPECIFICATION
  1055.  
  1056. The presentation of the information in this section is difficult since
  1057. everything depends on everything, and since this is a linear media it
  1058. has to come in some order.  In this attempt, a very brief overview of
  1059. the message structure is given, then a radical switch is made to
  1060. defining the basic building blocks, and finally using the building
  1061. blocks to reach the overall structure again.
  1062.  
  1063. 3.1.  Overview of Message Structure
  1064.  
  1065.   In general a message is composed of three parts:  the identification,
  1066.   the command, and the document.  Each part is in turn composed of
  1067.   message objects.
  1068.  
  1069.   The identification part is composed of a transaction number assigned
  1070.   by the originating MPM, and the internet host number of that MPM.
  1071.  
  1072.   The command part is composed of  an operation type, an operation code,
  1073.   an argument list, an error list, the destination mailbox, and a stamp.
  1074.   The stamp is a list of the MPMs that have handled this message.
  1075.  
  1076.   The document part is composed of a header and a body.  The message
  1077.   delivery system does not depend on the contents of the document part,
  1078.   but this specification does make some recommendations for the document
  1079.   header.
  1080.  
  1081.   The following sections define the representation of a message as a
  1082.   structured object composed of other objects.  Objects in turn are
  1083.   represented using a set of basic data elements.
  1084.  
  1085. 3.2.  Data Elements
  1086.  
  1087.   The data elements defined here are similar to the data structure and
  1088.   encoding used in NSW [18].
  1089.  
  1090.   Each of the diagrams which follow represent a sequence of octets.
  1091.   Field boundaries are denoted by the "!" character, octet boundaries by
  1092.   the "+" character. The diagrams are presented in left to right order.
  1093.   Each element begins with a one octet code.
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105. Postel                                                         [Page 13]
  1106.  
  1107.  
  1108.                                                               March 1979
  1109. Internet Message Protocol
  1110. Specification
  1111.  
  1112.  
  1113.  
  1114.   
  1115.   Code  Type          Representation
  1116.   ----  ----          --------------
  1117.  
  1118.   
  1119.                       +------+
  1120.     0  No Operation   !  1   !
  1121.                       +------+
  1122.  
  1123.   
  1124.                       +------+------+------+------+------
  1125.     1  Padding        !  0   !     octet count    ! Data ...
  1126.                       +------+------+------+------+------
  1127.  
  1128.   
  1129.                       +------+------+
  1130.     2  Boolean        !  2   ! 1/0  !
  1131.                       +------+------+
  1132.  
  1133.   
  1134.                       +------+------+------+
  1135.     3  Index          !  3   !     Data    !
  1136.                       +------+------+------+
  1137.  
  1138.   
  1139.                       +------+------+------+------+------+
  1140.     4  Integer        !  4   !            Data           !
  1141.                       +------+------+------+------+------+
  1142.  
  1143.   
  1144.                       +------+------+------+------+------
  1145.     5  Bit String     !  5   !      bit count     ! Data ...
  1146.                       +------+------+------+------+------
  1147.  
  1148.   
  1149.                       +------+------+------+------+------
  1150.     6  Text String    !  6   !     octet count    !  Data ...
  1151.                       +------+------+------+------+------
  1152.  
  1153.   
  1154.                       +------+------+------+------+------+------+-----
  1155.     7  List           !  7   !     octet count    !  item count ! Data
  1156.                       +------+------+------+------+------+------+-----
  1157.  
  1158.   
  1159.                       +------+------+------+------+------
  1160.     8  Proplist       !  8   !     octet count    ! Data ...
  1161.                       +------+------+------+------+------
  1162.  
  1163.  
  1164. [Page 14]                                                         Postel
  1165.  
  1166.  
  1167. March 1979                                                              
  1168.                                                Internet Message Protocol
  1169.                                                            Specification
  1170.  
  1171.  
  1172.  
  1173.   Element code 0 (NOP) is an empty data element used for padding when it
  1174.   is necessary. It is ignored.
  1175.  
  1176.   Element code 1 (PAD) is used to transmit large amounts of data with a
  1177.   message for test or padding purposes.  No action is taken with this
  1178.   data but the count of dummy octets must be correct to indicate the
  1179.   next element code.
  1180.  
  1181.   Element code 2 (BOOLEAN) is a boolean data element which has the value
  1182.   1 for True and 0 for False.
  1183.  
  1184.   Element code 3 (INDEX) is a 16-bit unsigned integer datum. Element
  1185.   code 3 occupies only 3 octets.
  1186.  
  1187.   Element code 4 (INTEGER) is a signed 32-bit integer datum. This will
  1188.   always occupy five octets.  Representation is two's complement.
  1189.  
  1190.   Element code 5 (BITSTR) is a bit string element for binary data.  The
  1191.   bit string is padded on the right with zeros to fill out the last
  1192.   octet if the bit string does not end on an octet boundary.  This data
  1193.   type must have the bit-count in the two octet count field instead of
  1194.   the number of octets.
  1195.  
  1196.   Element code 6 (TEXT) is used for the representation of text.  Seven
  1197.   bit ASCII characters are used, right justified in the octet.  The high
  1198.   order bit in the octet is zero.
  1199.  
  1200.   Element code 7 (LIST) can be used to create structures composed of
  1201.   other elements.  The item-count contains the number of elements which
  1202.   follow.  Any element may be used including List itself.  The octet
  1203.   count specifies the number of octets in the whole list.  A null or
  1204.   empty List, one with no elements, has an item-count of zero (0).
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223. Postel                                                         [Page 15]
  1224.  
  1225.  
  1226.                                                               March 1979
  1227. Internet Message Protocol
  1228. Specification
  1229.  
  1230.  
  1231.  
  1232.   Element code 8 (PROPLIST) is the Property-List element.  It has the
  1233.   following form:
  1234.  
  1235.     
  1236.     +------+------+------+------+------+
  1237.     !   8  !     octet          ! pair !
  1238.     !      !           count    ! count!
  1239.     +------+------+------+------+------+
  1240.                          +------+------+------+---------+---------+
  1241.                          ! name !    value    ! name    ! value   !
  1242.              repeated    ! count!    count    !      ...!      ...!
  1243.                          +------+------+------+---------+---------+
  1244.  
  1245.   The Property-List structure consists of a set of unordered name/value
  1246.   pairs.  The pairs are a one octet name count and a two octet value
  1247.   count followed by the name and value strings.  The counts specify the
  1248.   length in octets of the name and value strings.  Each string has a
  1249.   length in octets which agrees with its respective count.  The count of
  1250.   octets until the next pair in the property list is  1 + 2 + name count
  1251.   + value count octets.  The entire Property-List is of course equal in
  1252.   length to the octet count of the element itself.  Immediately
  1253.   following the octet count for the entire element is a one octet pair
  1254.   count field which contains the total number of name/value pairs in the
  1255.   Proplist.
  1256.  
  1257. 3.3.  Message Objects
  1258.  
  1259.   In the composition of messages we use a set of objects such as
  1260.   address, or date.  These objects are encoded in the basic data
  1261.   elements.  The message objects are built of data elements.
  1262.  
  1263.   While data elements are typed, message objects are not.  This is
  1264.   because messages are structured to the extent that only one kind of
  1265.   message object may occur in any position of a message structure.
  1266.  
  1267.   The following is a list of some of the objects used in messages.  The
  1268.   object descriptions are grouped by the section of the message in which
  1269.   they normally occur.
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282. [Page 16]                                                         Postel
  1283.  
  1284.  
  1285. March 1979                                                              
  1286.                                                Internet Message Protocol
  1287.                                                            Specification
  1288.  
  1289.  
  1290.  
  1291.   Identification
  1292.  
  1293.     Internet Host Number (ihn)
  1294.  
  1295.       This identifies a host in the internetwork environment.  When used
  1296.       as a part of tid, it identifies the originating host of a message.
  1297.       The ihn is a 32 bit number, the higher order 8 bits identify the
  1298.       network, and the lower order 24 bits identify the host on that
  1299.       network.
  1300.  
  1301.       INTEGER
  1302.  
  1303.     Transaction Identifier (tid)
  1304.  
  1305.       This is the transaction identifier associated with a particular
  1306.       command.  It is a list of the transaction number and the internet
  1307.       host number of the originating host.
  1308.  
  1309.       LIST ( tn , ihn )
  1310.  
  1311.     Transaction Number (tn)
  1312.  
  1313.       This is a number which is uniquely associated with this
  1314.       transaction by  the originating host.  It identifies the
  1315.       transaction.  (A transaction is a message and acknowledgment, this
  1316.       is discussed in more detail in later sections.)  A tn must be
  1317.       unique for the time which the message (a request or reply)
  1318.       containing it could be active in the network.
  1319.  
  1320.       INDEX
  1321.  
  1322.   Command
  1323.  
  1324.     Address
  1325.  
  1326.       This is very similar to Mailbox in that it also is the "address"
  1327.       of a user.  However, Address is intended to contain the minimum
  1328.       information necessary for delivery, and no more.
  1329.  
  1330.       PROPLIST ( --- )
  1331.  
  1332.     Answer
  1333.  
  1334.       A yes (true) or no (false) answer to a question.
  1335.  
  1336.       BOOLEAN
  1337.  
  1338.  
  1339.  
  1340.  
  1341. Postel                                                         [Page 17]
  1342.  
  1343.  
  1344.                                                               March 1979
  1345. Internet Message Protocol
  1346. Specification
  1347.  
  1348.  
  1349.  
  1350.     Arguments
  1351.  
  1352.       This is the argument to many of the operations.  It consists of a
  1353.       List of different data types.  The List will have form and data
  1354.       relevant with the particular operation.
  1355.  
  1356.       LIST ( --- )
  1357.  
  1358.     Command-Type
  1359.  
  1360.       Gives the type of a command (e.g., request, reply, alarm).
  1361.  
  1362.       INDEX
  1363.  
  1364.     Error-List
  1365.  
  1366.       The error list contains information concerning an error which has
  1367.       occured.  It is a List comprised of the two objects error-class
  1368.       and error-string.
  1369.  
  1370.       LIST ( error class, error string )
  1371.  
  1372.     Error-Class
  1373.  
  1374.       A code for the class of the error.
  1375.  
  1376.       INDEX
  1377.  
  1378.     Error-String
  1379.  
  1380.       A text string explaining the error.
  1381.  
  1382.       TEXT
  1383.  
  1384.     How-Delivered
  1385.  
  1386.       A comment on the delivery of a messages, for instance a message
  1387.       could be delivered, forwarded, or turned over to general delivery.
  1388.  
  1389.       LIST ( TEXT )
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400. [Page 18]                                                         Postel
  1401.  
  1402.  
  1403. March 1979                                                              
  1404.                                                Internet Message Protocol
  1405.                                                            Specification
  1406.  
  1407.  
  1408.  
  1409.     Mailbox
  1410.  
  1411.       This is the "address" of a user of the internetwork mail system.
  1412.       Mailbox contains information such as net, host, location, and
  1413.       local user-id of the recipient of the message.  Some information
  1414.       contained in Mailbox may not be necessary for delivery.
  1415.  
  1416.       As an example, when one sends a message to someone for the first
  1417.       time, he may include many items which are not necessary simply to
  1418.       insure delivery.  However, once he gets a reply to this message,
  1419.       the reply could contain an Address (as opposed to Mailbox) which
  1420.       the user will use from then on.
  1421.  
  1422.         A mailbox is a PROPLIST.  A mailbox might contain the following
  1423.         name-value pairs:
  1424.  
  1425.           name    element  description
  1426.           ----    -------  -----------
  1427.           IA      INTEGER  internet address
  1428.           NET     TEXT     network name
  1429.           HOST    TEXT     host name
  1430.           USER    TEXT     user name
  1431.           CITY    TEXT     city
  1432.           COUNTRY TEXT     country
  1433.           STATE   TEXT     state
  1434.           ZIP     TEXT     zip code
  1435.           PHONE   TEXT     phone number
  1436.  
  1437.       PROPLIST ( --- )
  1438.  
  1439.     Operation
  1440.  
  1441.       This names the operation or procedure to be performed.
  1442.  
  1443.       TEXT
  1444.  
  1445.     Options
  1446.  
  1447.       REGULAR for normal delivery, FORWARD for message forwarding,
  1448.       GENDEL for general delivery, or other options which may be defined
  1449.       later.
  1450.  
  1451.       LIST ( TEXT, ... )
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459. Postel                                                         [Page 19]
  1460.  
  1461.  
  1462.                                                               March 1979
  1463. Internet Message Protocol
  1464. Specification
  1465.  
  1466.  
  1467.  
  1468.     Reasons
  1469.  
  1470.       These could be mailbox does not exist, mailbox full, etc.
  1471.  
  1472.       LIST ( TEXT )
  1473.  
  1474.     Stamp
  1475.  
  1476.       Each MPM that handles the message must add a unique identifier
  1477.       (ihn, see above) to the list.  This will prevent messages from
  1478.       being sent back and forth through the internet mail system without
  1479.       eventually either being delivered or returned to the sender.
  1480.  
  1481.       LIST ( ihn, ihn, ... )
  1482.  
  1483.     Trail
  1484.  
  1485.       When a message is sent through the internetwork environment, it
  1486.       acquires a list of MPMs that have handled the message in "Stamp".
  1487.       This list is then carried as "Trail" upon reply or acknowledgment
  1488.       of that message. More simply, requests and replies always have a
  1489.       "Stamp" and each MPM adds its ihn to this "Stamp."  Replies, in
  1490.       addition, have a "Trail" which is the complete "Stamp" of the
  1491.       original message.
  1492.  
  1493.       LIST ( ihn, ihn, ... )
  1494.  
  1495.     Type
  1496.  
  1497.       The command type, e.g., request or reply.
  1498.  
  1499.       INDEX
  1500.  
  1501.   Document
  1502.  
  1503.     In this section, we define some objects useful in message document
  1504.     headers.  The ones we use are taken from the current ARPANET message
  1505.     syntax standard [6,8].
  1506.  
  1507.     CC
  1508.  
  1509.       When copies of a message are sent to others in addition to the
  1510.       addresses in the To object, those to whom the copies are sent will
  1511.       have their addresses recorded here.  CC will be a single TEXT
  1512.       element.
  1513.  
  1514.       TEXT
  1515.  
  1516.  
  1517.  
  1518. [Page 20]                                                         Postel
  1519.  
  1520.  
  1521. March 1979                                                              
  1522.                                                Internet Message Protocol
  1523.                                                            Specification
  1524.  
  1525.  
  1526.  
  1527.     Date
  1528.  
  1529.       The date and time are represented according to the International
  1530.       Standards Organization (ISO) recommendations [13,14,15].  Taken
  1531.       together the ISO recommendations 2014, 3307, and 4031 result in
  1532.       the following representation of the date and time:
  1533.  
  1534.         yyyy-mm-dd-hh:mm:ss,fff+hh:mm
  1535.  
  1536.       Where yyyy is the 4 digit year, mm is the two digit month, dd is
  1537.       the two digit day, hh is the two digit hour in 24 hour time, mm is
  1538.       the two digit minute, ss is the two digit second, and fff is the
  1539.       decimal fraction of the second.  To this basic date and time is
  1540.       appended the offset from Greenwich as plus or minus hh hours and
  1541.       mm minutes.
  1542.  
  1543.       TEXT
  1544.  
  1545.     Document-Body
  1546.  
  1547.       The document body will contain that portion of the message
  1548.       commonly thought of as the text portion.  It will be composed of a
  1549.       list of elements.  This will allow transmission of data other than
  1550.       pure text if such capabilities are needed.  We can, for instance,
  1551.       envision digital voice communication through the transmission of
  1552.       BITSTR element, or transmission of graphic data, etc.  Information
  1553.       regarding control of such features could be included in the header
  1554.       for cooperating sites, or in the body itself but such protocols
  1555.       would depend upon agreement among those sites involved.  It is
  1556.       expected of course that the majority of messages will contain body
  1557.       portions comprised of TEXT elements.
  1558.  
  1559.       LIST ( --- )
  1560.  
  1561.     Document-Header
  1562.  
  1563.       The document header contains the memo header presented to the
  1564.       user.  In principle this may be of any style or structure.  In
  1565.       this specification it is recommended that a PROPLIST be used and
  1566.       that the name-value pairs correspond to the header fields of
  1567.       RFC 733 [6].
  1568.  
  1569.       PROPLIST ( --- )
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577. Postel                                                         [Page 21]
  1578.  
  1579.  
  1580.                                                               March 1979
  1581. Internet Message Protocol
  1582. Specification
  1583.  
  1584.  
  1585.  
  1586.     From
  1587.  
  1588.       The From is meant to be the name of the author of a document.  It
  1589.       will be one TEXT element.
  1590.  
  1591.       TEXT
  1592.  
  1593.     Reply-To
  1594.  
  1595.       Sometimes it will be desired to direct the replies of a message to
  1596.       some address other than the From or the Sender.  In such a case
  1597.       the Reply-To object can be used.
  1598.  
  1599.       TEXT
  1600.  
  1601.     Sender
  1602.  
  1603.       The Sender will contain the address of the individual who sent the
  1604.       message. In some cases this is NOT the same as the author of the
  1605.       message. Under such a condition, the author should be specified in
  1606.       the From object.  The Sender is a single TEXT element.
  1607.  
  1608.       TEXT
  1609.  
  1610.     Subject
  1611.  
  1612.       The subject of the message.
  1613.  
  1614.       TEXT
  1615.  
  1616.     To
  1617.  
  1618.       To identifies the addressees of the message.  The To object is one
  1619.       TEXT element.
  1620.  
  1621.       TEXT
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636. [Page 22]                                                         Postel
  1637.  
  1638.  
  1639. March 1979                                                              
  1640.                                                Internet Message Protocol
  1641.                                                            Specification
  1642.  
  1643.  
  1644.  
  1645. 3.4.  Command
  1646.  
  1647.   This section describes the commands which processes in the internet
  1648.   message system can use to communicate.  Several aspects of the command
  1649.   structure are based on the NSW Transaction Protocol [19].  The
  1650.   commands come in pairs, with each request having a corresponding
  1651.   reply.
  1652.  
  1653.    A command is a list:
  1654.  
  1655.     LIST ( mailbox, stamp, type, operation, arguments, error-list )
  1656.  
  1657.   The arguments are described generally here and more specifically, if
  1658.   necessary, in the description of each command.
  1659.  
  1660.     mailbox:  PROPLIST
  1661.  
  1662.       This is the "to" specification of the message.  Mailbox takes the
  1663.       form of a property list of general information, some of which is
  1664.       the essential information for delivery, and some of which could be
  1665.       extra information which may be helpful for delivery.  Mailbox is
  1666.       different from address in that address is a very specific list
  1667.       without extra information.
  1668.  
  1669.     stamp:  LIST ( INTEGER, ...  )
  1670.  
  1671.       This is a list of the MPMs that have handled the message.  Each
  1672.       MPM must add its 32 bit Internet Host Number (ihn) to the LIST.
  1673.  
  1674.     type: INDEX
  1675.  
  1676.       type=1 a REQUEST operation.
  1677.  
  1678.       type=2 a REPLY operation.
  1679.  
  1680.       type=3 an ALARM operation. (A high priority message.)
  1681.  
  1682.       type=4 a RESPONSE to an alarm operation.
  1683.  
  1684.     operation: TEXT
  1685.  
  1686.       Operation is the name of the operation or procedure to be
  1687.       performed.  This string must be interpreted in an upper/lower case
  1688.       independent manner.
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695. Postel                                                         [Page 23]
  1696.  
  1697.  
  1698.                                                               March 1979
  1699. Internet Message Protocol
  1700. Specification
  1701.  
  1702.  
  1703.  
  1704.     arguments: LIST
  1705.  
  1706.       This is a list of arguments to the above operation.
  1707.  
  1708.     error-list:  LIST
  1709.  
  1710.       If message is type 1 or 3 (a request or an alarm):
  1711.  
  1712.         LIST ( )  (a zero length list)
  1713.  
  1714.       If message is a type 2 or 4 (a response or response to alarm)
  1715.  
  1716.         LIST ( error-class, error-string ) indicates what,if any, error
  1717.         occured
  1718.  
  1719.       error-class: INDEX
  1720.  
  1721.         =0: indicates success, no error
  1722.         =1: partial results returned.
  1723.           This error class is used when several steps are performed by
  1724.           one operation and some of them fail.
  1725.         =2: failure, resources unavailable.
  1726.         =3: failure, user error.
  1727.         =4: failure, MPM error. Recoverable.
  1728.         =5: failure, MPM error. Fatal.
  1729.         =6: User abort requested
  1730.  
  1731.       error-string: TEXT
  1732.  
  1733.         This is a human readable character string describing the error.
  1734.  
  1735.     Possible errors:
  1736.  
  1737.               error-string                  error-class
  1738.  
  1739.       No errors                                  0
  1740.       Command not implemented                    2
  1741.       Syntax error, command unrecognized         3
  1742.       Syntax error, in arguments                 3
  1743.       Server error, try again later              4
  1744.       No service available                       5
  1745.       User requested abort                       6
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754. [Page 24]                                                         Postel
  1755.  
  1756.  
  1757. March 1979                                                              
  1758.                                                Internet Message Protocol
  1759.                                                            Specification
  1760.  
  1761.  
  1762.  
  1763.   command:  DELIVER
  1764.  
  1765.     type:  1
  1766.  
  1767.     function:  Sends message to a mailbox
  1768.  
  1769.     reply:  The reply is ACKNOWLEDGE
  1770.  
  1771.     arguments:  LIST ( options )
  1772.  
  1773.       options:  one or more of the following
  1774.  
  1775.         "REGULAR"  regular delivery
  1776.  
  1777.         "FORWARD"  message forwarding
  1778.  
  1779.         "GENDEL"   general delivery
  1780.  
  1781.         other options which may be defined later
  1782.  
  1783.     argument structure:
  1784.  
  1785.       LIST ( LIST ( TEXT, ... ))
  1786.  
  1787.  
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813. Postel                                                         [Page 25]
  1814.  
  1815.  
  1816.                                                               March 1979
  1817. Internet Message Protocol
  1818. Specification
  1819.  
  1820.  
  1821.  
  1822.   command:  ACKNOWLEDGE
  1823.  
  1824.     type:  2
  1825.  
  1826.     function:  reply to DELIVER
  1827.  
  1828.     arguments: LIST ( tid, trail, answer, reasons, how-delivered )
  1829.  
  1830.       tid:  tid of the originating message
  1831.  
  1832.       trail:   the stamp from the deliver command
  1833.  
  1834.       answer:  yes if delivered successfully,
  1835.                no if error in delivery.
  1836.  
  1837.       reasons:  if the answer is yes, the reason is "ok", if the answer
  1838.       is no the reason could be one of "no such user", "no such host",
  1839.       "no such network", "address ambiguous", or a similar response
  1840.  
  1841.       how-delivered:  one or more of the following:
  1842.  
  1843.         "FORWARD"  message was accepted for forwarding
  1844.  
  1845.         "GENDEL"   message was accepted for general delivery
  1846.  
  1847.         "ACCEPT"   message was accepted for normal delivery
  1848.  
  1849.         other types of delivery may be defined later
  1850.  
  1851.     argument structure:
  1852.  
  1853.       LIST ( LIST ( INDEX, INTEGER ),
  1854.              LIST ( INTEGER, ...  ),
  1855.              BOOLEAN,
  1856.              LIST ( TEXT ),
  1857.              LIST ( TEXT ))
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872. [Page 26]                                                         Postel
  1873.  
  1874.  
  1875. March 1979                                                              
  1876.                                                Internet Message Protocol
  1877.                                                            Specification
  1878.  
  1879.  
  1880.  
  1881.   command:  PROBE
  1882.  
  1883.     type:  1
  1884.  
  1885.     function:  finds out if specified mailbox (specified in mailbox of
  1886.     the command) exists at a host
  1887.  
  1888.     reply:  the reply is RESPONSE
  1889.  
  1890.     arguments:  LIST ( --none-- )
  1891.  
  1892.     argument structure:
  1893.  
  1894.       LIST ( )
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931. Postel                                                         [Page 27]
  1932.  
  1933.  
  1934.                                                               March 1979
  1935. Internet Message Protocol
  1936. Specification
  1937.  
  1938.  
  1939.  
  1940.   command:  RESPONSE
  1941.  
  1942.     type:  2
  1943.  
  1944.     function:  reply to PROBE
  1945.  
  1946.     arguments:  LIST ( tid, trail, answer, address OR reasons )
  1947.  
  1948.       tid:  the tid which came from the originating PROBE
  1949.  
  1950.       trail:  the stamp which came from the originating PROBE
  1951.  
  1952.       answer:  Yes if mailbox found, or no for invalid mailbox
  1953.  
  1954.       if answer is yes the fourth argument is address
  1955.       if answer is no it is reasons
  1956.  
  1957.       address:  a specific address in the network
  1958.  
  1959.       reasons:  a reason why mailbox is invalid
  1960.  
  1961.         Possible reasons include:
  1962.  
  1963.           "Mailbox doesn't exist"
  1964.  
  1965.           "Mailbox full"
  1966.  
  1967.           "Mailbox has moved, try this new location", address
  1968.  
  1969.             address is a new address to try
  1970.  
  1971.     argument structure:
  1972.  
  1973.       if answer is yes
  1974.  
  1975.         LIST ( LIST ( INDEX, INTEGER ),
  1976.                LIST ( INTEGER, ... ),
  1977.                BOOLEAN,
  1978.                PROPLIST )
  1979.  
  1980.       if answer is no
  1981.  
  1982.         LIST ( LIST ( INDEX, INTEGER ),
  1983.                LIST ( INTEGER, ... ),
  1984.                BOOLEAN,
  1985.                LIST ( TEXT ))
  1986.  
  1987.  
  1988.  
  1989.  
  1990. [Page 28]                                                         Postel
  1991.  
  1992.  
  1993. March 1979                                                              
  1994.                                                Internet Message Protocol
  1995.                                                            Specification
  1996.  
  1997.  
  1998.  
  1999.     command:  CANCEL
  2000.  
  2001.       type:  3
  2002.  
  2003.       function:  abort request for specified transaction
  2004.  
  2005.       reply:  The reply is CANCELED
  2006.  
  2007.       arguments:  LIST ( tid )
  2008.  
  2009.         tid of transaction to be cancelled
  2010.  
  2011.       argument structure:
  2012.  
  2013.         LIST ( LIST ( INDEX, INTEGER ))
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049. Postel                                                         [Page 29]
  2050.  
  2051.  
  2052.                                                               March 1979
  2053. Internet Message Protocol
  2054. Specification
  2055.  
  2056.  
  2057.  
  2058.     command:  CANCELED
  2059.  
  2060.       type:  4
  2061.  
  2062.       function:  reply to CANCEL
  2063.  
  2064.       arguments:  LIST ( tid, trail, answer )
  2065.  
  2066.         tid:  tid of transaction to be cancelled
  2067.  
  2068.         trail:  the stamp of the CANCEL command
  2069.  
  2070.         answer:  yes if the command was canceled, no if not.
  2071.  
  2072.       argument structure:
  2073.  
  2074.         LIST ( LIST ( INDEX, INTEGER ),
  2075.                LIST ( INTEGER, ... ),
  2076.                BOOLEAN )
  2077.  
  2078.  
  2079.  
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108. [Page 30]                                                         Postel
  2109.  
  2110.  
  2111. March 1979                                                              
  2112.                                                Internet Message Protocol
  2113.                                                            Specification
  2114.  
  2115.  
  2116.  
  2117.   To summarize again, a command consists of a LIST of the following
  2118.   objects:
  2119.  
  2120.     name        element
  2121.     ----        -------
  2122.     mailbox     PROPLIST
  2123.     stamp       LIST ( INTEGER, ... )
  2124.     type        INDEX
  2125.     operation   TEXT
  2126.     arguments   LIST ( --- )
  2127.     error       LIST ( INDEX, TEXT )
  2128.  
  2129. 3.5.  Document
  2130.  
  2131.   The actual document follows the command list.  It contains a header
  2132.   which usually contains such information as From, To, Date, CC, etc.;
  2133.   and the actual body of the message.  The message delivery system does
  2134.   not depend on the document.  The following section should be taken as
  2135.   a recommendation for common practice, not as a requirement.
  2136.  
  2137.   Document Header
  2138.  
  2139.     For the same reason that it is impossible to for see the many forms
  2140.     that intranet addresses will take, standardizing of document headers
  2141.     would also be a mistake. The approach we suggest is to lay the
  2142.     groundwork for a set of basic document header functions and provide
  2143.     for enough extensibility to allow nets to add whatever header
  2144.     features they desire.  Features added in this fashion, however, may
  2145.     not be understood by other networks.  It is suggested that subset
  2146.     defined here be implemented by all networks.
  2147.  
  2148.     This subset is taken from the current ARPANET standard for message
  2149.     headers in the text oriented computer message system [6,8].
  2150.  
  2151.     The document header will precede the document body portion of the
  2152.     message and will consist of a proplist data element.  The document
  2153.     header is meant to be used by individual networks to tailor the
  2154.     header to suit their individual needs.  As an example, consider the
  2155.     ARPA network.  Typically, the receiver's name is taken to be his
  2156.     network address.  It often prints in the document header in just
  2157.     that form: Frank@SITEX.  Such a salutation is unacceptable in some
  2158.     more formal modes of communication.  Some network might choose to
  2159.     place into header proplist the name-value pair ("SALUTATION:", "Mr.
  2160.     Frank Hacker").  Upon receipt of the message, the document handling
  2161.     program would then be able to scan the header proplist looking for
  2162.     such a pair and so be able to correctly address the recipient by
  2163.     name instead of by network address.  However, other networks or
  2164.  
  2165.  
  2166.  
  2167. Postel                                                         [Page 31]
  2168.  
  2169.  
  2170.                                                               March 1979
  2171. Internet Message Protocol
  2172. Specification
  2173.  
  2174.  
  2175.  
  2176.     sites within the network may not understand such specific
  2177.     information.  Under such a condition it should be ignored.
  2178.  
  2179.     The minimum header is a PROPLIST of the following name-value pairs:
  2180.  
  2181.       Name     Value
  2182.       ----     -----
  2183.       DATE     TEXT
  2184.       FROM     TEXT
  2185.  
  2186.     A normal header is a PROPLIST containing the following name-value
  2187.     pairs:
  2188.  
  2189.       Name     Value
  2190.       ----     -----
  2191.       DATE     TEXT
  2192.       SENDER   TEXT
  2193.       FROM     TEXT
  2194.       TO       TEXT
  2195.       CC       TEXT
  2196.       SUBJECT  TEXT
  2197.  
  2198.   Document Body
  2199.  
  2200.     The Body of the message is just a sequence of data elements which
  2201.     contains the actual document.  Much of the time this will be a
  2202.     single TEXT element, but for some applications other data elements
  2203.     may be utilized.
  2204.  
  2205.     LIST ( --- )
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226. [Page 32]                                                         Postel
  2227.  
  2228.  
  2229. March 1979                                                              
  2230.                                                Internet Message Protocol
  2231.                                                            Specification
  2232.  
  2233.  
  2234.  
  2235. 3.6.  Message Structure
  2236.  
  2237.   An internet message is composed of three parts.  The first is the tid
  2238.   which identifies the transaction; the second is the Command List; and
  2239.   the third part is the Document List, which is itself comprised of a
  2240.   Document-Header and a Document-Body.
  2241.  
  2242.   When shipped between two MPMs, a message will take the form of a LIST:
  2243.  
  2244.     Message is:
  2245.  
  2246.       LIST ( tid, Command-List, Document-List )
  2247.  
  2248.     It is convenient to batch several messages together shipping them as
  2249.     a unit from one MPM to another.  Such a group of messages is called
  2250.     a message-bag.
  2251.  
  2252.     A message-bag will be a LIST of Messages, each Message is of the
  2253.     form described above.
  2254.  
  2255.       Thus, a message-bag is:
  2256.  
  2257.         LIST ( Message1, Message2, ... )
  2258.  
  2259.   Message Sharing
  2260.  
  2261.     When messages are batched for delivery, it may often be the case
  2262.     that the same Document will be sent to more than one recipient.
  2263.     Since the Document portion can usually be expected to be the major
  2264.     parts of the message, much repeated data would be sent if a copy of
  2265.     the Mail for each recipient were to be shipped in the message-bag.
  2266.  
  2267.     To avoid this redundancy, messages are assembled in the message-bag
  2268.     so that actual data appears first and references to it appear later
  2269.     in the message-bag.  Since each message has a unique tid, the
  2270.     references will indicate the tid of the actual data.  In this sense,
  2271.     all references to copied data may be thought of as pointing earlier
  2272.     in the message-bag.  The data to be retrieved can be thought of as
  2273.     indexed by tid.  Note that the semantics require such references to
  2274.     point to data already seen.
  2275.  
  2276.     When a portion is Shared, that portion is determined by its position
  2277.     within a message, i.e., if the Command list was to be Shared, then
  2278.     its position within a Message would contain the tid of the message
  2279.     already seen whose Command list was identical to it.  The same is
  2280.     true of the Document Header and the Document Body.  Only a complete
  2281.     Command, Header, or Body may be Shared, never a partial one.
  2282.  
  2283.  
  2284.  
  2285. Postel                                                         [Page 33]
  2286.  
  2287.  
  2288.                                                               March 1979
  2289. Internet Message Protocol
  2290. Specification
  2291.  
  2292.  
  2293.  
  2294.     If an encryption scheme is used, that portion of the message which
  2295.     is encrypted can not be shared.  This is due to the fact that
  2296.     encrypting keys will be specific between two individuals.
  2297.  
  2298.   Internal Message Organization
  2299.  
  2300.     The tid
  2301.  
  2302.       This is the transaction identifier.  It is assigned by the
  2303.       originating MPM.
  2304.  
  2305.     The Command List
  2306.  
  2307.       The command-list is a LIST which contains two elements, content
  2308.       and command.
  2309.  
  2310.       Content is one item of element type INDEX.  If content=0, the item
  2311.       is not shared and the next element of the LIST is the command.  If
  2312.       content=1 the item is shared.  In this case, the second element
  2313.       will contain the tid of the command to share from.  The tid must
  2314.       be of a prior message in the current message-bag.  Other values of
  2315.       content may be defined later for different data structures.
  2316.  
  2317.       Thus, command-list is:
  2318.  
  2319.         LIST ( content, tid )       if content=1
  2320.  
  2321.       Or,
  2322.  
  2323.         LIST ( content, command )    if content=0
  2324.  
  2325.       content is:
  2326.  
  2327.         INDEX     which is 0 if there is no sharing
  2328.                     and is 1 if sharing occurs
  2329.  
  2330.       tid is:
  2331.  
  2332.         the tid of the message to be shared from
  2333.  
  2334.       command is:
  2335.  
  2336.         LIST ( mailbox, stamp, type, operation, arguments, error-list )
  2337.  
  2338.     The document-list
  2339.  
  2340.       The document portion of an internet message is optional and when
  2341.       present is comprised of a LIST containing two elements:
  2342.  
  2343.  
  2344. [Page 34]                                                         Postel
  2345.  
  2346.  
  2347. March 1979                                                              
  2348.                                                Internet Message Protocol
  2349.                                                            Specification
  2350.  
  2351.  
  2352.  
  2353.         document-list is:
  2354.  
  2355.           LIST ( header-list, body-list )
  2356.  
  2357.       While either the header-list or the body-list may be shared, both
  2358.       elements must appear in the m.
  2359.  
  2360.     The document-header
  2361.  
  2362.       The header-list will be a List which will always contain two
  2363.       elements.  The first element will be content to indicate whether
  2364.       or not the header is to be shared.  The second element will either
  2365.       be the tid of the header to be copied (if content=1) or it will be
  2366.       the document-header (which is a PROPLIST) containing the actual
  2367.       header information (if content=0). The tid must point to a
  2368.       document-header already seen in the message-bag.
  2369.  
  2370.       The header-list is either:
  2371.  
  2372.         LIST ( content, tid )                if content=1
  2373.  
  2374.       Or,
  2375.  
  2376.         LIST ( content, document-header )     if content=0
  2377.  
  2378.       document-header is:
  2379.  
  2380.         PROPLIST which contains header information
  2381.  
  2382.     The document-body
  2383.  
  2384.       The body-list will be a LIST of two elements.  The first element
  2385.       will again be content, indicating whether or not the body is to be
  2386.       shared.  If it is shared, the second element will be tid
  2387.       indicating which body to copy.  This tid must be of a message
  2388.       already seen in the message-bag.  If content indicates no sharing,
  2389.       then the second item is a document-body.
  2390.  
  2391.       body-list is:
  2392.  
  2393.         LIST ( content, tid )           if content=1
  2394.  
  2395.       Or,
  2396.  
  2397.         LIST ( content, document-body )  if content=0
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403. Postel                                                         [Page 35]
  2404.  
  2405.  
  2406.                                                               March 1979
  2407. Internet Message Protocol
  2408. Specification
  2409.  
  2410.  
  2411.  
  2412.       document-body is:
  2413.  
  2414.         LIST ( items comprising the body ... )
  2415.  
  2416.   Message Fields
  2417.  
  2418.     message := ( tid, command-list, document-list )
  2419.  
  2420.     tid := ( tn, ihn )
  2421.  
  2422.     command-list := ( content, command )
  2423.  
  2424.     command := ( mailbox, stamp, type, operation,
  2425.                  arguments, error-list )
  2426.  
  2427.     document-list := ( header-list, body-list )
  2428.  
  2429.     header-list := ( content, document-header )
  2430.  
  2431.     body-list := ( content, document-body )
  2432.  
  2433. 3.7.  MPM Organization
  2434.  
  2435.   Introduction
  2436.  
  2437.     The heart of the internet message system is the MPM which is
  2438.     responsible for routing and delivering message between the networks.
  2439.     Each network must have at least one MPM.  These MPMs are connected
  2440.     together, and internet mail is always transferred along channels
  2441.     between them.  The system interfaces with the already existent local
  2442.     message system.
  2443.  
  2444.     Since the local network message system may be very different from
  2445.     the internet system, special programs may be necessary to convert
  2446.     incoming internet messages to the local format.  Likewise, messages
  2447.     outgoing to other networks may be converted to the internet format.
  2448.  
  2449.   The MPM
  2450.  
  2451.     Messages in the internet mail system are shipped in "bags," each bag
  2452.     containing one or more messages.  Each bag is addressed to a
  2453.     specific MPM and contains messages for the hosts on that MPM's
  2454.     network.
  2455.  
  2456.     Each MPM is expected to implement functions which will allow it to
  2457.     deliver local messages it receives and to forward non-local ones to
  2458.     other MPMs presumably closer to the message's destination.
  2459.  
  2460.  
  2461.  
  2462. [Page 36]                                                         Postel
  2463.  
  2464.  
  2465. March 1979                                                              
  2466.                                                Internet Message Protocol
  2467.                                                            Specification
  2468.  
  2469.  
  2470.  
  2471.     Loosely, each MPM can be separated into five components:
  2472.  
  2473.       1--Acceptor
  2474.  
  2475.         Receives incoming Message-Bags, from other MPMs, from UIPs, or
  2476.         from conversion programs.
  2477.  
  2478.       2--Message-Bag Processor
  2479.  
  2480.         Splits a Bag into these three portions:
  2481.  
  2482.           a.    Local Host Messages
  2483.           b.    Local Net Messages
  2484.           c.    Foreign Net Messages
  2485.  
  2486.       3--Local Net Delivery
  2487.  
  2488.         Delivers local net and local host messages, may call on
  2489.         conversion program.
  2490.  
  2491.       4--Foreign Net Router
  2492.  
  2493.         Creation of new Message-Bags for forwarding to other MPMs,
  2494.         determines route.
  2495.  
  2496.       5--Foreign Net Shipper
  2497.  
  2498.         Activates foreign shipping channels and ships Message-Bag to
  2499.         foreign MPMs. Performs data compression while shipping bags.
  2500.  
  2501.     All of these components can be thought of as independent.  Of the
  2502.     five, the Acceptor, the Local-Net Delivery, and the Message-Bag
  2503.     Processor are fully self-contained and communicate with each other
  2504.     only through a queue, the Bag-Input Queue.  The function of the
  2505.     Acceptor is to await incoming Message-Bags and to insert them into
  2506.     the Bag-Input Queue.
  2507.  
  2508.     That queue is the input to the Message-Bag Processor component which
  2509.     will separate and deliver suitable portions of the Message-Bags it
  2510.     retrieves from the queue to one of three queues:
  2511.  
  2512.       a.    Local-Host Queue
  2513.       b.    Local-Net Queue
  2514.       c.    Foreign Net Queue
  2515.  
  2516.     When a MPM decides to forward a message to another MPM, it must add
  2517.     its own identification (i.e., its ihn) to the stamp field of the
  2518.     command.  The stamp then becomes a record of the route the message
  2519.  
  2520.  
  2521. Postel                                                         [Page 37]
  2522.  
  2523.  
  2524.                                                               March 1979
  2525. Internet Message Protocol
  2526. Specification
  2527.  
  2528.  
  2529.  
  2530.     has taken.  An MPM should examine the stamp field to see if the
  2531.     message is in a routing loop.  Some commands require the return of
  2532.     the stamp as a trail in the matching reply command.
  2533.  
  2534.     All of these queues have as elements complete Message-Bags (some of
  2535.     which may have been portions of the original Bag).
  2536.  
  2537.     The Local-Host and Local-Net queues serve as input to the Local-Net
  2538.     Delivery process.  This component is responsible for delivering
  2539.     messages to its local host and other hosts on its local net to which
  2540.     it is connected.  It must be capable of handling whatever error
  2541.     conditions the local net might return, including the ability to
  2542.     retransmit.  It may call on conversion program to reformat the
  2543.     messages into a form the local protocol will accept.  This will
  2544.     probably involve such things as copying shared information.
  2545.  
  2546.     The other two processes are more closely coupled.  The Foreign Net
  2547.     Router takes its input Bags from the Foreign Net Queue.  From the
  2548.     internal information it contains, it determines which one of the
  2549.     MPMs to which it is connected should receive the Bag.
  2550.  
  2551.     It then places the Bag along with the routing information into the
  2552.     Shippable Mail Queue.  The Foreign Net Shipper retrieves it from
  2553.     that queue and transmits it across a channel to the intended foreign
  2554.     MPM.
  2555.  
  2556.     The Foreign Net Router should be capable of receiving external input
  2557.     to its routing information table.  This may come from the Foreign
  2558.     Net Shipper in the case of a channel going down, requiring a
  2559.     decision to either postpone delivery or to determine a new route.
  2560.  
  2561.     The Router is responsible for maintaining sufficient topological
  2562.     information to determine where to forward any incoming Message-Bag.
  2563.     Decisions concerning the return of undeliverable Bags are made by
  2564.     the Router.
  2565.  
  2566.     It should be stressed here that message delivery should be reliable.
  2567.     In the event that delivery is impossible, the message should be
  2568.     returned to the sender along with information regarding the reason
  2569.     for not delivering it.
  2570.  
  2571.   Implementation Recommendations
  2572.  
  2573.     Transaction numbers can be assigned sequentially with wrap around
  2574.     when the highest value is reached.  This should ensure that no
  2575.     message with a particular transaction number from this source is in
  2576.     the network when another instance of this transaction number is
  2577.     chosen.
  2578.  
  2579.  
  2580. [Page 38]                                                         Postel
  2581.  
  2582.  
  2583. March 1979                                                              
  2584.                                                Internet Message Protocol
  2585.                                                            Specification
  2586.  
  2587.  
  2588.  
  2589. 3.8.  Interfaces
  2590.  
  2591.   User Interface
  2592.  
  2593.     It is assumed that the interface between the MPM and the UIP
  2594.     provides for passing data structures which represent the document
  2595.     portion of the message.  In addition this interface must pass the
  2596.     delivery address information (which becomes the information in the
  2597.     mailbox field of the command).  It is weakly assumed that the
  2598.     information is passed between the UIP and the MPM via shared files,
  2599.     but this is not the only possible mechanism.  These two processes
  2600.     may be more strongly coupled (e.g., by sharing memory), or less
  2601.     strongly coupled (e.g., by communicating via logical channels).
  2602.  
  2603.   Communication Interface
  2604.  
  2605.     It is assumed here that the MPM use an underlying communication
  2606.     system, and TCP [20] has been taken as the model.  Again, this is
  2607.     not intended to limit the implementation choices, other forms of
  2608.     interprocess communication are allowed and other types of physical
  2609.     interconnection are permitted.  One might even use dial telephone
  2610.     calls to interconnect MPMs (using suitable protocols to provide
  2611.     reliable communication).
  2612.  
  2613.   
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639. Postel                                                         [Page 39]
  2640.  
  2641.  
  2642.                                                               March 1979
  2643. Internet Message Protocol
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.  
  2657.  
  2658.  
  2659.  
  2660.  
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.  
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698. [Page 40]                                                         Postel
  2699.  
  2700.  
  2701. March 1979                                                              
  2702.                                                Internet Message Protocol
  2703.  
  2704.  
  2705.  
  2706.                         4.  EXAMPLES & SCENARIOS
  2707.  
  2708. Example 1:  Message Format
  2709.  
  2710.   Suppose we want to send the following message:
  2711.  
  2712.     Date: 1979-03-29-11:46-08:00
  2713.     From: Jon Postel <Postel@ISIB>
  2714.     Subject: Meeting Thursday
  2715.     To: Dave Crocker <DCrocker@Rand-Unix>
  2716.     CC: Mamie
  2717.      
  2718.     Dave:
  2719.      
  2720.     Please mark your calendar for our meeting Thursday at 3 pm.
  2721.      
  2722.     --jon.
  2723.  
  2724.   It will be encoded in the structured format.  The following will
  2725.   present successive steps in the top down generation of this message.
  2726.  
  2727.     1.  message
  2728.  
  2729.     2.  ( tid, command-list, document-list )
  2730.  
  2731.     3.  ( ( tn, ihn ),
  2732.         ( content, command ),
  2733.         ( header-list, body-list ) )
  2734.  
  2735.     4.  ( ( tn, ihn ),
  2736.           ( content,
  2737.             ( mailbox, stamp, type, operation,
  2738.               arguments, error-list ) ),
  2739.           ( ( content, document-header ),
  2740.             ( content, document-body ) ) )
  2741.  
  2742.     5.  ( ( 37, 167772404 ),
  2743.         ( 0, (
  2744.                ( IA: 167772359, NET: arpa, HOST: rand-unix,
  2745.                  USER: DCrocker ),
  2746.                ( 167772404 ),
  2747.                1
  2748.                DELIVER
  2749.                ( ( REGULAR ) ),
  2750.                ( ) ) ),
  2751.         ( ( 0, (
  2752.                  Date: 1979-03-29-11:46-08:00
  2753.                  From: Jon Postel <Postel@ISIB>
  2754.                  Subject: Meeting Thursday
  2755.  
  2756.  
  2757. Postel                                                         [Page 41]
  2758.  
  2759.  
  2760.                                                               March 1979
  2761. Internet Message Protocol
  2762. Examples & Scenarios
  2763.  
  2764.  
  2765.  
  2766.                  To: Dave Crocker <DCrocker@Rand-Unix>
  2767.                  CC: Mamie ) ),
  2768.           ( 0, ( Dave:
  2769.                   
  2770.                  Please mark your calendar for our meeting
  2771.                  Thursday at 3 pm.
  2772.                   
  2773.                  --jon. ) ) ) )
  2774.  
  2775.  
  2776.     6.  LIST( LIST( INDEX=37, INTEGER=167772404 ),
  2777.               LIST( INDEX=0,
  2778.     command         LIST( PROPLIST( IA: 167772359,
  2779.                                     NET: arpa,
  2780.     mailbox                         HOST: rand-unix,
  2781.                                     USER: DCrocker ),
  2782.     stamp                 LIST( INTEGER=167772404 ),
  2783.     type                  INDEX=1
  2784.     operation             TEXT="DELIVER"
  2785.     arguments             LIST( LIST( TEXT="REGULAR" )),
  2786.     error-list            LIST( ) ) ),
  2787.               LIST( LIST( INDEX=0,
  2788.     document-header       PROPLIST(
  2789.                             DATE: 1979-03-29-11:46-08:00
  2790.                             FROM: Jon Postel <Postel@ISIB>
  2791.                             SUBJECT: Meeting Thursday
  2792.                             TO: Dave Crocker <DCrocker@Rand-Unix>
  2793.                             CC: Mamie ) ),
  2794.                     LIST( INDEX=0,
  2795.     document-body         LIST( TEXT=
  2796.                             "Dave:
  2797.                              
  2798.                             Please mark your calendar for
  2799.                             our meeting Thursday at 3 pm.
  2800.                              
  2801.                             --jon." ) ) ) )
  2802.     
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816. [Page 42]                                                         Postel
  2817.  
  2818.  
  2819. March 1979                                                              
  2820.                                                Internet Message Protocol
  2821.                                                     Examples & Scenarios
  2822.  
  2823.  
  2824.  
  2825. Example 2:  Delivery and Acknowledgment
  2826.  
  2827.   The following is four views of the message of example 1 during the
  2828.   successive transmission from the origination MPM, through a relay MPM,
  2829.   to the destination MPM, and the return of the acknowledgment, through
  2830.   a relay MPM, to the originating MPM.
  2831.  
  2832.   +-----------------------------------------------------------------+ 
  2833.   !                          1         2                            ! 
  2834.   ! sending --> originating --> relay --> destination --> receiving ! 
  2835.   !   user          MPM          MPM          MPM            user   ! 
  2836.   !                                                                 ! 
  2837.   !                          4         3                            ! 
  2838.   !             originating <-- relay <-- destination               ! 
  2839.   !                 MPM          MPM          MPM                   ! 
  2840.   +-----------------------------------------------------------------+ 
  2841.  
  2842.                            Transmission Path
  2843.  
  2844.                                Figure 6.
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868.  
  2869.  
  2870.  
  2871.  
  2872.  
  2873.  
  2874.  
  2875. Postel                                                         [Page 43]
  2876.  
  2877.  
  2878.                                                               March 1979
  2879. Internet Message Protocol
  2880. Examples & Scenarios
  2881.  
  2882.  
  2883.  
  2884.   1.  Between the originating MPM and the relay MPM.
  2885.  
  2886.         LIST( LIST( INDEX=37, INTEGER=167772404 ),
  2887.               LIST( INDEX=0,
  2888.     command         LIST( PROPLIST( IA: 167772359,
  2889.                                     NET: arpa,
  2890.     mailbox                         HOST: rand-unix,
  2891.                                     USER: DCrocker ),
  2892.     stamp                 LIST( INTEGER=167772404 ),
  2893.     type                  INDEX=1
  2894.     operation             TEXT="DELIVER"
  2895.     arguments             LIST( LIST( TEXT="REGULAR" )),
  2896.     error-list            LIST( ) ) ),
  2897.               LIST( LIST( INDEX=0,
  2898.     document-header       PROPLIST(
  2899.                             DATE: 1979-03-29-11:46-08:00
  2900.                             FROM: Jon Postel <Postel@ISIB>
  2901.                             SUBJECT: Meeting Thursday
  2902.                             TO: Dave Crocker <DCrocker@Rand-Unix>
  2903.                             CC: Mamie ) ),
  2904.                     LIST( INDEX=0,
  2905.     document-body         LIST( TEXT=
  2906.                             "Dave:
  2907.                              
  2908.                             Please mark your calendar for
  2909.                             our meeting Thursday at 3 pm.
  2910.                              
  2911.                             --jon." ) ) ) )
  2912.  
  2913.       The originating MPM sends the message of example 1 to a relay MPM.
  2914.  
  2915.  
  2916.  
  2917.  
  2918.  
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.  
  2927.  
  2928.  
  2929.  
  2930.  
  2931.  
  2932.  
  2933.  
  2934. [Page 44]                                                         Postel
  2935.  
  2936.  
  2937. March 1979                                                              
  2938.                                                Internet Message Protocol
  2939.                                                     Examples & Scenarios
  2940.  
  2941.  
  2942.  
  2943.   2.  Between the relay MPM and the destination MPM.
  2944.  
  2945.         LIST( LIST( INDEX=37, INTEGER=167772404 ),
  2946.               LIST( INDEX=0,
  2947.     command         LIST( PROPLIST( IA: 167772359,
  2948.                                     NET: arpa,
  2949.     mailbox                         HOST: rand-unix,
  2950.                                     USER: DCrocker ),
  2951.     stamp                 LIST( INTEGER=167772404,
  2952.                                 INTEGER=167772246 ),
  2953.     type                  INDEX=1
  2954.     operation             TEXT="DELIVER"
  2955.     arguments             LIST( LIST( TEXT="REGULAR" )),
  2956.     error-list            LIST( ) ) ),
  2957.               LIST( LIST( INDEX=0,
  2958.     document-header       PROPLIST(
  2959.                             DATE: 1979-03-29-11:46-08:00
  2960.                             FROM: Jon Postel <Postel@ISIB>
  2961.                             SUBJECT: Meeting Thursday
  2962.                             TO: Dave Crocker <DCrocker@Rand-Unix>
  2963.                             CC: Mamie ) ),
  2964.                     LIST( INDEX=0,
  2965.     document-body         LIST( TEXT=
  2966.                             "Dave:
  2967.                              
  2968.                             Please mark your calendar for
  2969.                             our meeting Thursday at 3 pm.
  2970.                              
  2971.                             --jon." ) ) ) )
  2972.  
  2973.       The relay MPM adds its ihn to the stamp, but otherwise the message
  2974.       is unchanged.
  2975.  
  2976.  
  2977.  
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993. Postel                                                         [Page 45]
  2994.  
  2995.  
  2996.                                                               March 1979
  2997. Internet Message Protocol
  2998. Examples & Scenarios
  2999.  
  3000.  
  3001.  
  3002.   3.  Between the destination MPM and the relay MPM.
  3003.  
  3004.         LIST( LIST( INDEX=1993, INTEGER=167772359 ),
  3005.               LIST( INDEX=0,
  3006.     command         LIST( PROPLIST( IA: 167772404,
  3007.     mailbox                         USER: *MPM* ),
  3008.     stamp                 LIST( INTEGER=167772359 ),
  3009.     type                  INDEX=2
  3010.     operation             TEXT="ACKNOWLEDGE"
  3011.     arguments             LIST( LIST( INDEX=37,
  3012.      tid                              INTEGER=167772404 ),
  3013.                                 LIST( INTEGER=167772404,
  3014.      trail                            INTEGER=167772246,
  3015.                                       INTEGER=167772359 ),
  3016.      answer                     BOOLEAN=TRUE,
  3017.      reason                     LIST( TEXT="OK" ),
  3018.      how-delivered              LIST( TEXT="ACCEPT" ) ),
  3019.     error-list            LIST( INDEX=0,
  3020.                                 TEXT="No Errors") ),
  3021.     document  LIST( ) )
  3022.  
  3023.       The destination MPM delivers the message to the user's UIP, and
  3024.       composes an acknowledgment.  The acknowledgment is addressed to
  3025.       the originating MPM.  Note that the trail is the stamp of the
  3026.       incoming message plus the ihn of the destination MPM.
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052. [Page 46]                                                         Postel
  3053.  
  3054.  
  3055. March 1979                                                              
  3056.                                                Internet Message Protocol
  3057.                                                     Examples & Scenarios
  3058.  
  3059.  
  3060.  
  3061.   4.  Between the relay MPM and the originating MPM.
  3062.  
  3063.         LIST( LIST( INDEX=1993, INTEGER=167772359 ),
  3064.               LIST( INDEX=0,
  3065.     command         LIST( PROPLIST( IA: 167772404,
  3066.     mailbox                         USER: *MPM* ),
  3067.     stamp                 LIST( INTEGER=167772359
  3068.                                 INTEGER=167772246),
  3069.     type                  INDEX=2
  3070.     operation             TEXT="ACKNOWLEDGE"
  3071.     arguments             LIST( LIST( INDEX=37,
  3072.      tid                              INTEGER=167772404 ),
  3073.                                 LIST( INTEGER=167772404,
  3074.      trail                            INTEGER=167772246,
  3075.                                       INTEGER=167772359 ),
  3076.      answer                     BOOLEAN=TRUE,
  3077.      reason                     LIST( TEXT="OK" ),
  3078.      how-delivered              LIST( TEXT="ACCEPT" ) ),
  3079.     error-list            LIST( INDEX=0,
  3080.                                 TEXT="No Errors") ),
  3081.     document  LIST( ) )
  3082.  
  3083.       The relay MPM adds its ihn to the stamp and forwards the
  3084.       acknowledgment.
  3085.  
  3086.   
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111. Postel                                                         [Page 47]
  3112.  
  3113.  
  3114.                                                               March 1979
  3115. Internet Message Protocol
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.  
  3129.  
  3130.  
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170. [Page 48]                                                         Postel
  3171.  
  3172.  
  3173. March 1979                                                              
  3174.                                                Internet Message Protocol
  3175.  
  3176.  
  3177.  
  3178.                                 GLOSSARY
  3179.  
  3180.  
  3181.  
  3182. 1822
  3183.           BBN Report 1822, "The Specification of the Interconnection of
  3184.           a Host and an IMP".  The specification of interface between a
  3185.           host and the ARPANET.
  3186.  
  3187. Command List
  3188.           The part of a message used by the MPMs to determine the
  3189.           processing action to be taken.
  3190.  
  3191. datagram
  3192.           A logical unit of data, in particular an internet datagram is
  3193.           the unit of data transfered between the internet module and a
  3194.           higher level module.
  3195.  
  3196. Destination
  3197.           The destination address, an internet header datagram protocol
  3198.           field.
  3199.  
  3200. Document List
  3201.           The part of the message created by or delivered to a user.
  3202.  
  3203. header
  3204.           Control information at the beginning of a message, segment,
  3205.           datagram, packet or block of data.
  3206.  
  3207. IMP
  3208.           The Interface Message Processor, the packet switch of the
  3209.           ARPANET.
  3210.  
  3211. Internet Address
  3212.           A four octet (32 bit) source or destination address consisting
  3213.           of a Network field and a Local Address field.
  3214.  
  3215. internet datagram
  3216.           The unit of data exchanged between a pair of internet modules
  3217.           (includes the internet header).
  3218.  
  3219. Local Address
  3220.           The address of a host within a network.  The actual mapping of
  3221.           an internet local address on to the host addresses in a
  3222.           network is quite general, allowing for many to one mappings.
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229. Postel                                                         [Page 49]
  3230.  
  3231.  
  3232.                                                               March 1979
  3233. Internet Message Protocol
  3234. Glossary
  3235.  
  3236.  
  3237.  
  3238. message
  3239.           The unit of information transmitted between users of message
  3240.           systems.  As transmitted between MPMs a message consists of a
  3241.           Transaction Identifier, a Command List, and a Document List.
  3242.  
  3243. module
  3244.           An implementation, usually in software, of a protocol or other
  3245.           procedure.
  3246.  
  3247. MPM
  3248.           A Message Processing Module, the process which implements this
  3249.           internet message protocol.
  3250.  
  3251. octet
  3252.           An eight bit byte.
  3253.  
  3254. Rest
  3255.           The 3 octet (24 bit) local address portion of an Internet
  3256.           Address.
  3257.  
  3258. RTP
  3259.           Real Time Protocol:  A host-to-host protocol for communication
  3260.           of time critical information.
  3261.  
  3262. Source
  3263.           The source address, an internet header field.
  3264.  
  3265. TCP
  3266.           Transmission Control Protocol:  A host-to-host protocol for
  3267.           reliable communication in internetwork environments.
  3268.  
  3269. Transaction Identifier
  3270.           The unique identifier of a message.
  3271.  
  3272. Type of Service
  3273.           An internet datagram protocol header field which indicates the
  3274.           type (or quality) of service for this internet packet.
  3275.  
  3276. UIP
  3277.           A User Interface Program, a program which presents message
  3278.           data to a user and accepts message data from a user.  A
  3279.           program which interacts with the user in the composition and
  3280.           examination of messages.
  3281.  
  3282. XNET
  3283.           A cross-net debugging protocol.
  3284.     
  3285.  
  3286.  
  3287.  
  3288. [Page 50]                                                         Postel
  3289.  
  3290.  
  3291. March 1979                                                              
  3292.                                                Internet Message Protocol
  3293.  
  3294.  
  3295.  
  3296.                                REFERENCES
  3297.  
  3298.  
  3299.  
  3300. [1]   Barber, D., and J. Laws, "A Basic Mail Scheme for EIN," INWG 192,
  3301.       February 1979.
  3302.  
  3303. [2]   Bhushan, A., K. Progran, R. Tomlinson, and J. White,
  3304.       "Standardizing Network Mail Headers," RFC 561, NIC 18516, 5
  3305.       September 1973.
  3306.  
  3307. [3]   Bolt Beranek and Newman, "Specification for the Interconnection of
  3308.       a Host and an IMP," BBN Technical Report 1822, May 1978 (Revised).
  3309.  
  3310. [4]   Braaten, O., "Introduction to a Mail Protocol," Norwegian
  3311.       Computing Center, INWG 180, August 1978.
  3312.  
  3313. [5]   Cerf, V., "The Catenet Model for Internetworking," Information
  3314.       Processing Techniques Office, Defense Advanced Research Projects
  3315.       Agency, IEN 48, July 1978.
  3316.  
  3317. [6]   Crocker, D., J. Vittal, K. Progran, and D. Henderson, "Standard
  3318.       for the Format of ARPA Network Text Messages," RFC 733, NIC 41952,
  3319.       21 November 1977.
  3320.  
  3321. [7]   Crocker, D., E. Szurkowski, and D. Farber, "Components of a
  3322.       Channel-independent Memo Transmission System," Department of
  3323.       Electrical Engineering, University of Delaware,, February 1979.
  3324.  
  3325. [8]   Feinler, E. and J. Postel, eds., "ARPANET Protocol Handbook,"
  3326.       NIC 7104, for the Defense Communications Agency by the Network
  3327.       Information Center of SRI International, Menlo Park, California,
  3328.       Revised January 1978.
  3329.  
  3330. [9]   Harrenstien, K., "Field Addressing," ARPANET Message, SRI
  3331.       International, October 1977.
  3332.  
  3333. [10]  Haverty, J., "MSDTP -- Message Services Data Transmission
  3334.       Protocol," RFC 713, NIC 34739, April 1976.
  3335.  
  3336. [11]  Haverty, J., "Thoughts on Interactions in Distributed Services,"
  3337.       RFC 722, NIC 36806, 16 September 1976.
  3338.  
  3339. [12]  Haverty, J., D. Henderson, and D. Oestreicher, "Proposed
  3340.       Specification of an Inter-site Message Protocol," 8 July 1975.
  3341.  
  3342. [13]  ISO-2014, "Writing of calendar dates in all-numeric form,"
  3343.       Recommendation 2014, International Organization for
  3344.       Standardization, 1975.
  3345.  
  3346.  
  3347. Postel                                                         [Page 51]
  3348.  
  3349.  
  3350.                                                               March 1979
  3351. Internet Message Protocol
  3352. References
  3353.  
  3354.  
  3355.  
  3356. [14]  ISO-3307, "Information Interchange -- Representations of time of
  3357.       the day," Recommendation 3307, International Organization for
  3358.       Standardization, 1975.
  3359.  
  3360. [15]  ISO-4031, "Information Interchange -- Representation of local time
  3361.       differentials," Recommendation 4031, International Organization
  3362.       for Standardization, 1978.
  3363.  
  3364. [16]  Myer, T., and D. Henderson, "Message Transmission Protocol,"
  3365.       RFC 680, NIC 32116, 30 April 1975.
  3366.  
  3367. [17]  Postel, J.  "Internetwork Datagram Protocol, Version 4," USC
  3368.       Information Sciences Institute, IEN 80, February 1979.
  3369.  
  3370. [18]  Postel, J.  "NSW Data Representation (NSWB8)," IEN 39, May 1978.
  3371.  
  3372. [19]  Postel, J.  "NSW Transaction Protocol (NSWTP)," IEN 38, May 1978.
  3373.  
  3374. [20]  Postel, J.  "Transmission Control Protocol, TCP, Version 4," USC
  3375.       Information Sciences Institute, IEN 81, February 1979.
  3376.  
  3377. [21]  Postel, J., "Assigned Numbers," RFC 750, NIC 45500,
  3378.       26 September 1978.
  3379.  
  3380. [22]  Postel, J., "Message System Transition Plan," JBP 64,
  3381.       USC-Information Sciences Institute, February 1979.
  3382.  
  3383. [23]  Rivest, R. L.  "A Method for Obtaining Digital Signatures and
  3384.       Public-Key Cryptosystems"  Communications of the ACM, Vol. 21,
  3385.       Number 2, February 1978.
  3386.  
  3387. [24]  Shoch, J., "A Note On Inter-Network Naming, Addressing, and
  3388.       Routing," Xerox Palo Alto Research Center, IEN 19, January 1978.
  3389.  
  3390. [25]  Thomas, R., "Providing Mail Services for NSW Users," BBN NSW
  3391.       Working Note 24, Bolt Beranek and Newman, October 1978.
  3392.  
  3393. [26]  White, J., "A Proposed Mail Protocol," RFC 524, NIC 17140, 13 June
  3394.       1973.
  3395.  
  3396. [27]  White, J., "Description of a Multi-Host Journal," NIC 23144,
  3397.       30 May 1974.
  3398.  
  3399. [28]  White, J., "Journal Subscription Service," NIC 23143, 28 May 1974.
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406. [Page 52]                                                         Postel
  3407.  
  3408.  
  3409. March 1979                                                              
  3410.                                                Internet Message Protocol
  3411.  
  3412.  
  3413.  
  3414.                                APPENDICES
  3415.  
  3416. A.  Encryption
  3417.  
  3418.   It would be straightforward to add the capability to have the document
  3419.   portion of messages either wholly or partially encrypted.  The
  3420.   approach is to define an additional basic data element to carry
  3421.   encrypted data.  The data within this element could be composed of
  3422.   other elements, but that could only be perceived after the data was
  3423.   decrypted.
  3424.  
  3425.   
  3426.                       +------+------+------+------+-------
  3427.     9  Encrypt        !  9   !     octet count    ! Data ...
  3428.                       +------+------+------+------+--------
  3429.  
  3430.   Element code 9 (ENCRYPT) is Encrypt.  The format is the one octet type
  3431.   code, the three octet type count, and count octets of data.  Use of
  3432.   this element indicates that the data it contains is encrypted. The
  3433.   encryption scheme is yet to be decided but will probably be the Public
  3434.   Key Encryption technique [23] due to the capacity for coded
  3435.   signatures.
  3436.  
  3437.   To process this, the user is asked for the appropriate key the first
  3438.   time an encryption block is seen for a particular message.  The
  3439.   encrypted data is then decrypted.  The data thus revealed will be in
  3440.   the form of complete data type fields.  Encryption cannot occur over a
  3441.   partial field.  The revealed data is then processed normally.
  3442.  
  3443.   Note that there is no reason why all fields of a document could not be
  3444.   encrypted including all document header information such as From,
  3445.   Date, etc.
  3446.  
  3447.  
  3448.  
  3449.  
  3450.  
  3451.  
  3452.  
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465. Postel                                                         [Page 53]
  3466.  
  3467.  
  3468.                                                               March 1979
  3469. Internet Message Protocol
  3470. Appendices
  3471.  
  3472.  
  3473.  
  3474. B.  Data Compression
  3475.  
  3476.   When message-bags are shipped between MPMs the data should be
  3477.   compressed according to the following scheme:
  3478.  
  3479.     shipping-unit := compression-type message-bag
  3480.  
  3481.     compression-type := A one octet compression type indicator.
  3482.  
  3483.       compression-type value   description
  3484.       ----------------------   -----------
  3485.                  0             no compression used
  3486.                  1             basic compression
  3487.  
  3488.     basic compression
  3489.  
  3490.       This basic compression procedure is the same as that defined for
  3491.       use with the ARPANET FTP [8].  Three types of compression-units
  3492.       may be formed, sequence-units, replication-units, and
  3493.       filler-units.  The data is formed into a series of
  3494.       compression-units independent of the structure or object and
  3495.       element boundaries.
  3496.  
  3497.       sequence-unit
  3498.  
  3499.         A sequence-unit is a one octet flag and count followed by that
  3500.         many data octets.
  3501.  
  3502.           +-+-------+--------+--------+----
  3503.           !0!   n   !     n data octets ...
  3504.           +-+-------+--------+--------+----
  3505.  
  3506.         The flag and count octet has its high order bit zero and the
  3507.         remaining bits indicate the count (in the range 0 to 127) of
  3508.         following data octets.
  3509.  
  3510.       replication-unit
  3511.  
  3512.         A replication-unit is a one octet flag and count followed by one
  3513.         data octet, which is to be replicated count times.
  3514.  
  3515.           +--+------+--------+
  3516.           !10!   n  !   data !
  3517.           +--+------+--------+
  3518.  
  3519.         The flag and count octet has its high order two bits equal
  3520.         one-zero and the remaining six bits indicate the count (in the
  3521.         range 0 to 63) of number of time to replicate the data octet.
  3522.  
  3523.  
  3524. [Page 54]                                                         Postel
  3525.  
  3526.  
  3527. March 1979                                                              
  3528.                                                Internet Message Protocol
  3529.                                                               Appendices
  3530.  
  3531.  
  3532.  
  3533.       filler-unit
  3534.  
  3535.         A filler-unit is a one octet flag and count, indicating that a
  3536.         filler octet is to be inserted count times.
  3537.  
  3538.           +--+------+
  3539.           !11!   n  !
  3540.           +--+------+
  3541.  
  3542.         The flag and count octet has its high order two bits equal
  3543.         one-one and the remaining six bits indicate the count (in the
  3544.         range 0 to 63) of number of time to insert the filler octet.
  3545.  
  3546.         The filler octet is zero, the octet with all bits zero.
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583. Postel                                                         [Page 55]
  3584.  
  3585.  
  3586.                                                               March 1979
  3587. Internet Message Protocol
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.  
  3597.  
  3598.  
  3599.  
  3600.  
  3601.  
  3602.  
  3603.  
  3604.  
  3605.  
  3606.  
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.  
  3642. [Page 56]                                                         Postel
  3643.  
  3644.