home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_j_p / draft-ietf-mixer-bodymap-07.txt < prev    next >
Text File  |  1997-04-30  |  95KB  |  3,089 lines

  1.  
  2. draft               X.400/MIME body mapping             May 96
  3.  
  4.  
  5.       Mapping between X.400 and RFC-822/MIME Message Bodies
  6.  
  7.                  Tue Apr 29 22:53:15 MET DST 1997
  8.  
  9.  
  10.                      Harald Tveit Alvestrand
  11.                              UNINETT
  12.                   Harald.T.Alvestrand@uninett.no
  13.  
  14.  
  15.  
  16.     Status of this Memo
  17.  
  18.  
  19.  
  20.     The name of this draft is draft-ietf-mixer-bodymap-07.txt.
  21.  
  22.     The following text is required for all drafts:
  23.  
  24.          This document is an Internet Draft.  Internet Drafts
  25.          are working documents of the Internet Engineering
  26.          Task Force (IETF), its Areas, and its Working Groups.
  27.          Note that other groups may also distribute working
  28.          documents as Internet Drafts.
  29.  
  30.          Internet Drafts are draft documents valid for a
  31.          maximum of six months. Internet Drafts may be
  32.          updated, replaced, or obsoleted by other documents at
  33.          any time.  It is not appropriate to use Internet
  34.          Drafts as reference material or to cite them other
  35.          than as a "working draft" or "work in progress."
  36.  
  37.          Please check the I-D abstract listing contained in
  38.          each Internet Draft directory to learn the current
  39.          status of this or any other Internet Draft.
  40.  
  41.  
  42.     This document describes the translation of message body
  43.     parts between X.400 and MIME.
  44.  
  45.     Please send comments to the MIXER mailing list:
  46.     <ietf-mixer@innosoft.com>
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. Alvestrand                Exp Nov 96                  [Page 1]
  56.  
  57. draft               X.400/MIME body mapping             May 96
  58.  
  59.  
  60.     1.  Introduction
  61.  
  62.     This document is a companion to [MIXER], which defines the
  63.     principles and translation of headers for interworking
  64.     between MIME-based RFC-822 mail and X.400 mail.
  65.  
  66.     This document defines how to map body parts of X.400
  67.     messages into MIME entities and vice versa, including the
  68.     handling of multipart messages and forwarded messages.
  69.  
  70.     A table of contents that should be quite useful for
  71.     locating specific sections is given in the back of the
  72.     document.
  73.  
  74.  
  75.     1.1.  Glossary
  76.  
  77.     The following terms are defined in this document:
  78.  
  79.     Body part
  80.          Part of a message that has a unique type. This term
  81.          comes from X.400; the corresponding term in MIME (RFC
  82.          2046) is limited to use in parts of a multipart
  83.          message; the term "body" may correspond better.
  84.  
  85.     Content-type
  86.          Type information indicating what the content of a
  87.          body part actually is. This term comes from MIME; the
  88.          corresponding X.400 term is "body part type".
  89.  
  90.     Mapping
  91.          (noun): A description of how to transform an X.400
  92.          body part into a MIME body part, or how to transform
  93.          a MIME body part into an X.400 body part.
  94.  
  95.     Equivalence
  96.          A set of two mappings that taken together provide a
  97.          lossless conversion between an X.400 body part and a
  98.          MIME body part
  99.  
  100.     Encapsulation
  101.          The process of wrapping something from one of the
  102.          mail systems in such a way that it can be carried
  103.          inside the other mail system. When encapsulating, it
  104.          is not expected that the other mail system can make
  105.  
  106.  
  107.  
  108.  
  109.  
  110. Alvestrand                Exp Nov 96                  [Page 2]
  111.  
  112. draft               X.400/MIME body mapping             May 96
  113.  
  114.  
  115.          reasonable sense of the body part, but a gateway back
  116.          into the first system will always be able to convert
  117.          the body part without loss back to its original
  118.          format.
  119.  
  120.     HARPOON encapsulation
  121.          The encapsulating of a MIME body part by putting it
  122.          inside an IA5 body with all headers and encoding
  123.          intact. First described in RFC 1496 [HARPOON].
  124.  
  125.     Tunneling
  126.          What happens when one gateway encapsulates a message
  127.          and sends it to another gateway that decapsulates it.
  128.          The hope is that this will cause minimal damage to
  129.          the message in transit.
  130.  
  131.     DISCUSSION
  132.          At many points in this document, the author has found
  133.          it useful to include material that explains part of
  134.          the reasoning behind the specification. These
  135.          sections all start with DISCUSSION: and continue to
  136.          the next numbered section heading; they do not
  137.          dictate any additional requirements on a gateway.
  138.  
  139.  
  140.     The words MUST, SHOULD and MAY, when capitalized, are used
  141.     as defined in RFC 2119 [MUST].
  142.  
  143.  
  144.     2.  Basic rules for body part conversion
  145.  
  146.     The basic approach for translating body parts is described
  147.     in section 2.1 and 2.2.
  148.  
  149.     Chapter 3 gives details on "encapsulation", which allows
  150.     you to be certain that no information is lost even when
  151.     unknown types are encountered.
  152.  
  153.     Chapter 6 gives the core mappings for various body parts.
  154.  
  155.     The conformance requirements in chapter 8 describe what
  156.     the minimum conformance for a MIXER gateway is with
  157.     respect to body part conversion.
  158.  
  159.     DISCUSSION:
  160.  
  161.  
  162.  
  163.  
  164.  
  165. Alvestrand                Exp Nov 96                  [Page 3]
  166.  
  167. draft               X.400/MIME body mapping             May 96
  168.  
  169.  
  170.     At the moment both the MIME and the X.400 worlds seem to
  171.     be in a stable state of flux with regards to carrying
  172.     around stuff that is not text.
  173.     In such a situation, there is little chance of defining a
  174.     mapping between them that is the best for all people, all
  175.     of the time.
  176.     For this reason, this specification allows a gateway
  177.     considerable latitude in deciding exactly what conversion
  178.     to apply.
  179.  
  180.     The decision taken by the gateway may be based on various
  181.     information sources:
  182.  
  183.      (1)   If the gateway knows what body parts or content
  184.            types the recipient is able to handle, or has
  185.            registered a particular set of preferences for a
  186.            user, and knows how to convert the message
  187.            reasonably to those body parts, the gateway may
  188.            choose to convert body parts in the message to
  189.            those types only.
  190.  
  191.      (2)   If the gateway gets indications (via special
  192.            headers or heading-extensions defined for the
  193.            purpose) that the sender wanted a particular
  194.            representation on the "other side", and the gateway
  195.            is able to satisfy the request, it may do so. Such
  196.            a mechanism is defined in chapter 4 of this
  197.            document.
  198.  
  199.      (3)   If the gateway gets a message that might be
  200.            appropriate to send as one out of several types,
  201.            but where the typing information does not tell you
  202.            which one to use (like an X.400 BP14, FTAM "just a
  203.            file", or MIME application/octet-stream), it may
  204.            apply heuristics like looking at content or looking
  205.            at filenames to figure out how to deal with the
  206.            message.
  207.  
  208.      (4)   If the gateway knows that the next hop for the
  209.            message has limited capabilities (like X.400/84),
  210.            it may choose to perform conversions appropriate
  211.            for that medium.
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220. Alvestrand                Exp Nov 96                  [Page 4]
  221.  
  222. draft               X.400/MIME body mapping             May 96
  223.  
  224.  
  225.  
  226.      (5)   Where no mapping is known by  the  gateway,  it
  227.            may  choose  to  drop the body part, reject the
  228.            message, or encapsulate the body  part  as  de=AD
  229.            scribed  in  chapter 3.  The choice may be con=AD
  230.            figurable, but a conformant MIXER gateway  MUST
  231.            be able to be configured for encapsulation.
  232.  
  233.  
  234.     In many cases, a message that goes SMTP->X.400->SMTP will
  235.     arrive without loss of information.
  236.  
  237.     In some cases, the reverse translation may not be
  238.     possible, or two gateways may choose to apply different
  239.     translations, based on the criteria above, leading to an
  240.     apparently inconsistent service.
  241.  
  242.     In addition, service will vary because some gateways will
  243.     have implemented conversions not implemented by other
  244.     gateways.
  245.  
  246.     This is believed to be unavoidable.
  247.  
  248.  
  249.     2.1.  Generating the IPM Body from MIME
  250.  
  251.     When converting the body of a message from MIME to X.400,
  252.     the following steps are taken:
  253.  
  254.     If the header does not contain a 822.MIME-Version field,
  255.     then generate an IPMS.Body with a single IPMS.BodyPart of
  256.     type IPMS.IA5TextBodyPart containing the body of the RFC
  257.     822 message with
  258.     IPMS.IA5TextBodyPart.parameters.repertoire set to the
  259.     default (IA5).
  260.  
  261.     If 822.MIME-Version is present, the body is analyzed as a
  262.     MIME message and the body is converted according to the
  263.     mappings configured and implemented in the gateway.
  264.  
  265.  
  266.     2.2.  Generating the MIME Body from the IPMS.Body
  267.  
  268.     When converting the body of a message from X.400 to MIME,
  269.     the following steps are taken:
  270.  
  271.  
  272.  
  273.  
  274.  
  275. Alvestrand                Exp Nov 96                  [Page 5]
  276.  
  277. draft               X.400/MIME body mapping             May 96
  278.  
  279.  
  280.     If there is more than one body part, and the first body
  281.     part is IA5 and starts with the string "RFC-822-Headers:"
  282.     as the first line, then the remainder of this body part
  283.     shall be appended to the RFC 822 header.  This relies upon
  284.     the theory that this body part has been generated
  285.     according to Appendix B of MIXER.  A gateway shall check
  286.     the consistency and syntax of this body part, to ensure
  287.     that the resulting message is conformant with RFC 822.
  288.  
  289.     If the remaining IPMS.Body consists of a single
  290.     IPMS.Bodypart, there are three possibilities.
  291.  
  292.  
  293.      (1)   If it is of type IPMS.IA5Text, and the first line
  294.            is "MIME-Version: 1.0", it is assumed to be a
  295.            HARPOON-encapsulated body part. The complete body
  296.            content is then appended to the headers; the
  297.            separating blank line is inside the message. If an
  298.            RFC 822 syntax error is discovered inside the
  299.            message, it may be mapped directly as described
  300.            below instead.
  301.  
  302.  
  303.      (2)   If it is of type IPMS.IA5Text, then this is mapped
  304.            directly and the default MIME encoding (7bit) is
  305.            used, unless very long lines or non-ASCII or
  306.            control characters are found in the body part, in
  307.            which case Quoted-Printable SHOULD be used.
  308.  
  309.  
  310.      (3)   All other types are mapped according to the
  311.            mappings configured and implemented in the gateway.
  312.  
  313.  
  314.     If the IPMS.Body contains multiple IPMS.Bodypart fields,
  315.     then a MIME message of content type multipart is
  316.     generated.  If all of the body parts are messages, then
  317.     this is multipart/digest.  Otherwise it is
  318.     multipart/mixed.  The components of the multipart are
  319.     generated in the same order as in the IPMS.Body.
  320.  
  321.     Each component is mapped according to the mappings
  322.     configured and implemented in the gateway; any IA5 body
  323.     parts are checked to see if they are HARPOON mappings, as
  324.     described above.
  325.  
  326.  
  327.  
  328.  
  329.  
  330. Alvestrand                Exp Nov 96                  [Page 6]
  331.  
  332. draft               X.400/MIME body mapping             May 96
  333.  
  334.  
  335.  
  336.     2.3.  Mapping the EMA FTBP parameters
  337.  
  338.     DISCUSSION:
  339.  
  340.     EMA has defined a profile for use of the File Transfer
  341.     Body Part (FTBP). [MAWG]
  342.  
  343.  
  344.     New mappings are expected to use this as the mechanism for
  345.     carrying body parts, and since it is important to have a
  346.     consistent mapping for the special FTBP parameters, these
  347.     are defined here.
  348.  
  349.     The mapping of the body will depend on the content-type in
  350.     MIME and on the application-reference in FTBP, and is not
  351.     specified here.
  352.  
  353.     However, in many cases, we expect that the translation
  354.     will involve simply copying the octets from one format to
  355.     the other; that is, "no conversion".
  356.  
  357.  
  358.  
  359.     2.3.1.  Mapping GraphicStrings
  360.  
  361.     Some parameters of the EMA Profile are encoded as ASN.1
  362.     GraphicStrings, which are troublesome because they can
  363.     contain any ISO registered graphic character set.
  364.     To map these to ASCII for use in mail headers, the gateway
  365.     may either:
  366.  
  367.      (1)   Use the RFC 2047 [MIME-HDR] encoding mechanism to
  368.            create appropriate encoded-words for the headers
  369.            involved. Note that in some cases, such as within
  370.            Content-Disposition filenames, the encoded-words
  371.            must be in quotes, which is not the normal usage of
  372.            encoded-words.
  373.  
  374.      (2)   Apply the normalization procedure given in Appendix
  375.            A to identify the ASCII characters of the string,
  376.            and replace all non-ASCII characters with the
  377.            question mark (?).
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385. Alvestrand                Exp Nov 96                  [Page 7]
  386.  
  387. draft               X.400/MIME body mapping             May 96
  388.  
  389.  
  390.     Both procedures are valid for MIXER gateways; the
  391.     simplified procedure of ignoring escape sequences and bit-
  392.     stripping the result is NOT valid.
  393.  
  394.  
  395.     2.3.2.  Mapping specific parameters
  396.  
  397.     The following parameters are mapped in both directions:
  398.  
  399.  
  400.     Content-ID
  401.  
  402.          The mapping of this element is complex.
  403.  
  404.          The Content-ID is encoded as an IPM.MessageIdentifier
  405.          and entered into the
  406.          FTBP.FileTransferParameters.related-stored-file.
  407.          file-identifier.cross-reference.message-reference.
  408.  
  409.          FTBP.FileTransferParameters.related-stored-file.
  410.          relationship.descriptive-relationship is set to the
  411.          string "Internet MIME Body Part".
  412.  
  413.          FTBP.FileTransferParameters.related-stored-file.
  414.          file-identifier.cross-reference.application-
  415.          crossreference is set to a null OCTET STRING.
  416.  
  417.          The reverse mapping is only performed if the
  418.          FTBP.FileTransferParameters.related-stored-file.
  419.          relationship.descriptive-relationship has the string
  420.          value "Internet MIME Body Part".
  421.  
  422.  
  423.  
  424.     Content-Description
  425.  
  426.          The value of this field is mapped to and from the
  427.          first string in
  428.          FTBP.FileTransferParameters.environment.user-visible-
  429.          string.
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440. Alvestrand                Exp Nov 96                  [Page 8]
  441.  
  442. draft               X.400/MIME body mapping             May 96
  443.  
  444.  
  445.  
  446.     Content-Disposition
  447.  
  448.          This field is defined in [CDISP]. It has multiple
  449.          components; the handling  of  each  component  is
  450.          given below.
  451.  
  452.  
  453.          The "disposition" component is ignored on MIME ->
  454.          X.400 mapping, and is always "attachment" on X.400 ->
  455.          MIME mapping.
  456.  
  457.  
  458.     C-D: filename
  459.  
  460.          The filename component of the C-D header is mapped to
  461.          and from FileTransferParameters.file-
  462.          attributes.pathname.
  463.  
  464.          The EBNF.disposition-type is ignored when creating
  465.          the FTBP pathname, and always set to "attachment"
  466.          when creating the Content-Disposition header.  For
  467.          example:
  468.  
  469.            Content-Disposition: attachment; filename=3Ddodo.doc
  470.  
  471.          or
  472.  
  473.            Content-Disposition: attachment; filename=3D/etc/passwd
  474.  
  475.          The filename will be carried as a single incomplete-
  476.          pathname string. No special significance is assumed
  477.          for the characters "/" and "\". Note that normal
  478.          security precautions MUST be taken in using a
  479.          filename on a local file system; this should be
  480.          obvious from the second example.
  481.  
  482.          This is done to be conformant with the EMA Profile.
  483.  
  484.  
  485.     C-D: Creation-date
  486.  
  487.          Mapped to and from FileTransferParameters.file-
  488.          attributes.date-and-time-of-creation
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495. Alvestrand                Exp Nov 96                  [Page 9]
  496.  
  497. draft               X.400/MIME body mapping             May 96
  498.  
  499.  
  500.          For this and all other date fields, the RFC-822 date
  501.          format is used (822.date-time). Note that the
  502.          parameter syntax of [CDISP] requires that all dates
  503.          be quoted!
  504.  
  505.  
  506.     C-D: Modification-date
  507.  
  508.          Mapped to and from FileTransferParameters.file-
  509.          attributes.date-and-time-of-last-modification
  510.  
  511.  
  512.  
  513.     C-D: Read-date
  514.  
  515.          Mapped to and from FileTransferParameters.file-
  516.          attributes.date-and-time-of-last-read-access
  517.  
  518.  
  519.     C-D: Size
  520.  
  521.          Mapped to and from FileTransferParameters.file-
  522.          attributes.object-size. If the value is "no-value-
  523.          available", the component is NOT generated.
  524.  
  525.  
  526.     Other RFC-822 headers
  527.  
  528.          Mapped to  extension in
  529.          FTBP.FileTransferParameters.extensions using the
  530.          rfc-822-field HEADING-EXTENSION from [MIXER].
  531.  
  532.  
  533.     NOTE:
  534.          The set of headers that are mapped will depend on the
  535.          placement of the body part (single body part or
  536.          multipart).
  537.          When it is the only body of a message, headers
  538.          starting with "content-" SHOULD be put into the FTAM
  539.          extension, and all other headers should be put into
  540.          the IPMS extension for the message.
  541.          When it is a single bodypart of a multipart, ALL
  542.          headers on the body part are included, since there is
  543.          nowhere else to put them. Note that only headers that
  544.          start with "content-" have defined semantics in this
  545.  
  546.  
  547.  
  548.  
  549.  
  550. Alvestrand                Exp Nov 96                 [Page 10]
  551.  
  552. draft               X.400/MIME body mapping             May 96
  553.  
  554.  
  555.          case.
  556.  
  557.  
  558.     EMA NOTE
  559.  
  560.          The EMA profile, version 1.5, specifies that handling
  561.          of extensions is Optional for reception. This means
  562.          that some non-MIXER gateways may not implement
  563.          handling of this field, and some UAs may not have the
  564.          possibility of showing the content of this field to
  565.          the user.
  566.  
  567.          An alternative approach using
  568.          FTBP.FileTransferParameters.environment.user-visible-
  569.          string was suggested to EMA, and the EMA MAWG
  570.          recommended in its April 1996 conference that the
  571.          IETF MIXER group should rather choose this approach.
  572.  
  573.  
  574.     2.3.3.  Summary of FTBP elements generated
  575.  
  576.     This is a summary of the preceding section, and does not
  577.     add new information.
  578.  
  579.     The following elements of the FTBP parameters are mapped
  580.     or used (the rightmost column gives their status in the
  581.     EMA profile; M=3DMandatory, O=3DOptional, R=3DRecommended for
  582.     Origination/Receipt):
  583.  
  584.     FileTransferParameters                                             M/M
  585.       Related-Stored-File                                              O/O
  586.         file-identifier
  587.           cross-reference
  588.             application-crossreference         NULL
  589.             message-reference                  Content-ID
  590.         descriptive-relationship               Used as marker
  591.       contents-type                    Must be unstructured-binary     M/M
  592.       environment                                                      M/M
  593.         application-reference                  Selects mapping         M/M
  594.         user-visible-string                    Content-description     R/M
  595.       file-attributes
  596.         pathname                               C-D: Filename           R/M
  597.         date-and-time-of-creation              C-D: Creation-Date      O/O
  598.         date-and-time-of-last-modification     C-D: Modification-Date  R/M
  599.         date-and-time-of-last-read-access      C-D: Read-Date          O/O
  600.  
  601.  
  602.  
  603.  
  604.  
  605. Alvestrand                Exp Nov 96                 [Page 11]
  606.  
  607. draft               X.400/MIME body mapping             May 96
  608.  
  609.  
  610.         object-size                            C-D: Size               R/M
  611.       extensions                     Other headers       O/O
  612.  
  613.  
  614.     All other elements of the FTBP parameters are discarded.
  615.  
  616.     NOTE: There is ongoing work on defining a more complete
  617.     mapping between FTBP headers and a set of RFC-822 headers.
  618.     A gateway MAY choose to support the larger set once it is
  619.     available, but MUST support this limited set.
  620.  
  621.  
  622.     2.4.  Information that is lost when mapping
  623.  
  624.     MIME defines fields which add information to MIME
  625.     contents.  Two of these are "Content-ID", and "Content-
  626.     Description", which have special rules here, but MIME
  627.     allows new fields to be defined at any time.
  628.  
  629.     The possibilities are limited about what one can do with
  630.     this information:
  631.  
  632.      (1)   When using encapsulation, the information can be
  633.            preserved
  634.  
  635.      (2)   When using mapping to FTBP, the information can be
  636.            preserved in the FileTransferParameters.extensions
  637.            defined for that purpose.
  638.  
  639.      (3)   When mapping to a single-body message, the
  640.            information can be preserved as P22 header
  641.            extensions
  642.  
  643.      (4)   When mapping to other body part types, the
  644.            information must be discarded.
  645.  
  646.  
  647.  
  648.     3.  Encapsulation of body parts
  649.  
  650.     Where no mapping is possible, the gateway may choose any
  651.     of the following alternatives:
  652.  
  653.     -    Discard the body part, leaving a "marker" saying what
  654.          happened
  655.  
  656.  
  657.  
  658.  
  659.  
  660. Alvestrand                Exp Nov 96                 [Page 12]
  661.  
  662. draft               X.400/MIME body mapping             May 96
  663.  
  664.  
  665.     -    Reject the message
  666.  
  667.     -    "Encapsulate" the body part, by wrapping it in a body
  668.          part defined for that purpose in the other mail
  669.          system
  670.  
  671.     The choice to be made should be configurable in the
  672.     gateway, and may depend on both policy and knowledge of
  673.     the recipient's capabilities.
  674.  
  675.  
  676.     3.1.  Encapsulation of MIME in X.400
  677.  
  678.     Four body parts are defined here to encapsulate MIME body
  679.     parts in X.400.
  680.  
  681.     This externally-defined body part is backwards compatible
  682.     with RFC 1494. The FTBP body part is compatible with the
  683.     EMA MAWG document [MAWG], version 1.5, but has some
  684.     extensions, in particular the one for extra headers.
  685.  
  686.     The imagined scenarios for each body part are:
  687.  
  688.     FTBP For use when sending to recipients that can handle
  689.          generic FTBP, and for tunnelling MIME to a MIME UA
  690.  
  691.     BP15 For use when tunnelling MIME to a MIME UA through an
  692.          X.400(88) network, or to UAs that have been written
  693.          to RFC 1494
  694.  
  695.     IA5  For use when tunneling MIME to a MIME UA through an
  696.          X.400 network, where some of the links may involve
  697.          X.400(84).
  698.  
  699.     BP14 For use when the recipient may be an X.400(84) UA
  700.          with BP14 handling capability, and the loss of
  701.          information in headers is not regarded as important.
  702.  
  703.     but the gateway is free to use any method it finds
  704.     appropriate in any situation.
  705.  
  706.     FTBP is expected to be the most useful body part in
  707.     sending to X.400(92) systems, while the BP14 content
  708.     passing is primarily useful for sending to X.400(84)
  709.     systems.
  710.  
  711.  
  712.  
  713.  
  714.  
  715. Alvestrand                Exp Nov 96                 [Page 13]
  716.  
  717. draft               X.400/MIME body mapping             May 96
  718.  
  719.  
  720.     3.1.1.  FTBP encapsulating body part
  721.  
  722.     This body part utilizes the fundamental assumption in MIME
  723.     that all message content can be legally and completely
  724.     represented by a single octet stream, the "canonical
  725.     format".
  726.  
  727.     The FTBP encapsulating body part is defined by the
  728.     application-reference id-mime-ftbp-data; all headers are
  729.     mapped to the FTBP headers, including putting the
  730.     "Content-type:" header inside the FTBP ExtensionsField.
  731.  
  732.  
  733.     Translation from the MIME body part is done by:
  734.  
  735.     -    Undoing the content-transfer-encoding
  736.  
  737.     -    Setting the "FileTransferData.FTdata.value.octet-
  738.          aligned" to the resulting string of octets
  739.  
  740.     -    Putting the appropriate parameters into the headers.
  741.  
  742.     Reversing the translation is done by:
  743.  
  744.     -    Extracting the headers
  745.  
  746.     -    Applying an appropriate content-transfer-encoding to
  747.          the body. If this is for some reason different from
  748.          the content-transfer-encoding: header retrieved from
  749.          the headers, the old one must be deleted.
  750.  
  751.     This mapping is lossless, and therefore counts as "no
  752.     conversion".
  753.  
  754.     Note that this mapping does not work with multipart types;
  755.     the multipart must first be mapped to a
  756.     ForwardedIPMessage.
  757.  
  758.  
  759.     3.1.2.  BP15 encapsulating body part
  760.  
  761.     This section defines an extended body part, based on body
  762.     part 15, which may be used to hold any MIME content.
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770. Alvestrand                Exp Nov 96                 [Page 14]
  771.  
  772. draft               X.400/MIME body mapping             May 96
  773.  
  774.  
  775.  
  776.         mime-body-part EXTENDED-BODY-PART-TYPE
  777.               PARAMETERS MimeParameters
  778.                        IDENTIFIED BY id-mime-bp-parameters
  779.               DATA            OCTET STRING
  780.               ::=3D id-mime-bp-data
  781.  
  782.         MimeParameters ::=3D
  783.              SEQUENCE {
  784.                          content-type       IA5String,
  785.                          content-parameters SEQUENCE OF
  786.                                             SEQUENCE {
  787.                                                 parameter          IA5Stri=
  788. ng,
  789.                                                 parameter-value    IA5Stri=
  790. ng
  791.                                             }
  792.                          other-header-fields RFC822FieldList
  793.                      }
  794.  
  795.  
  796.     The OBJECT IDENTIFIERS id-mime-bp-parameter and id-mime-
  797.     bp-data are defined in Appendix B.  A MIME content is
  798.     mapped onto this body part.  The MIME headers of the body
  799.     part are mapped as follows:
  800.  
  801.     RFC822FieldList is defined in Appendix L of [MIXER].
  802.  
  803.  
  804.     Content-Type:
  805.          The "type/subtype" string is mapped to
  806.          MimeParameters.content-type.
  807.  
  808.          For each "parameter=3Dvalue" string create a
  809.          MimeParameters.content-parameters element. The
  810.          MimeParameters.content-Parameters.parameter field is
  811.          set to the parameter and the MimeParameters.content-
  812.          parameters.parameter-value field is set to the value.
  813.  
  814.          Quoting is preserved in the parameter-value.
  815.  
  816.  
  817.     Other
  818.          Take all other headers and create
  819.          MimeParameters.other-header-fields.
  820.  
  821.          The MIME-version, content-type and content-transfer-
  822.  
  823.  
  824.  
  825.  
  826.  
  827. Alvestrand                Exp Nov 96                 [Page 15]
  828.  
  829. draft               X.400/MIME body mapping             May 96
  830.  
  831.  
  832.          encoding fields are NOT copied.
  833.  
  834.  
  835.     NOTE:
  836.          The set of headers that are mapped will depend on the
  837.          placement of the body part (single body part or
  838.          multipart).
  839.          When it is the only body of a message, headers
  840.          starting with "content-" SHOULD be put into the
  841.          other-header-fields, and all other headers should be
  842.          put into the IPMS extension for the message.
  843.          When it is a single bodypart of a multipart, ALL
  844.          headers on the body part are included, since there is
  845.          nowhere else to put them. Note that only headers that
  846.          start with "content-" have defined semantics in this
  847.          case.
  848.  
  849.  
  850.     The body is mapped as follows:
  851.  
  852.     Convert the MIME body part into its canonical form, as
  853.     specified in Appendix H of MIME [MIME].  This canonical
  854.     form is used to generate the mime-body-part.data octet
  855.     string.
  856.  
  857.     The Parameter mapping may be used independently of the
  858.     body part mapping (e.g., in order to use a different
  859.     encoding for a mapped MIME body part).
  860.  
  861.     This body part contains all of the MIME information, and
  862.     so can be mapped back to MIME without loss of information.
  863.  
  864.     The OID id-mime-bp-data is added to the Encoded
  865.     Information Types of the envelope.
  866.  
  867.     This body part is completely compatible with RFC 1494.
  868.  
  869.     When converting back to a MIME body part, the gateway is
  870.     responsible for:
  871.  
  872.  
  873.      (1)   Selecting an appropriate content-transfer-encoding,
  874.            and deleting any content-transfer-encoding header
  875.            from the other-header-fields
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882. Alvestrand                Exp Nov 96                 [Page 16]
  883.  
  884. draft               X.400/MIME body mapping             May 96
  885.  
  886.  
  887.      (2)   Adding quotes to any parameters that need them (but
  888.            not adding quotes to parameters that are already
  889.            quoted)
  890.  
  891.      (3)   Removing any content-type field that is left in the
  892.            RFC822FieldList of the message that is redundant or
  893.            conflicting with the one from the mime-body-part
  894.  
  895.      (4)   Make sure that on multipart messages, the boundary
  896.            string actually used is reflected in the boundary=3D
  897.            parameter of the content-type header, and does not
  898.            occur within the body of the message.
  899.  
  900.  
  901.     3.1.3.  Encapsulation using IA5 (HARPOON)
  902.  
  903.     This approach is the one taken in RFC 1496 - HARPOON - for
  904.     tunneling any MIME body part through X.400/84 networks. It
  905.     has proven rather unhelpful for bringing information to
  906.     X.400 users, but preserves all the information of a MIME
  907.     body part.
  908.  
  909.     The following IA5Text body part is made:
  910.  
  911.  
  912.     -    Content =3D IA5String
  913.  
  914.     -    First bytes of content: (the description is in US
  915.          ASCII, with C escape sequences used to represent
  916.          control characters):
  917.  
  918.          MIME-version: <version>\r\n
  919.          Content-type: <the proper MIME content type>\r\n
  920.          Content-transfer-encoding: <7bit, quoted-printable or base64>\r\n
  921.          <Possibly other Content headings here, terminated by\r\n>
  922.          \r\n
  923.          <Here follows the bytes of the content, encoded
  924.          in the proper encoding>
  925.  
  926.  
  927.     All implementations MUST place the MIME-version: header
  928.     first in the body part. Headers that are placed by [MIXER]
  929.     into other parts of the message MUST NOT be placed in the
  930.     MIME body part.
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937. Alvestrand                Exp Nov 96                 [Page 17]
  938.  
  939. draft               X.400/MIME body mapping             May 96
  940.  
  941.  
  942.     This encapsulation may also be applied to subtypes of
  943.     multipart, creating a single IA5 body part that contains a
  944.     single multipart/*, which in turn may contain multiple
  945.     MIME body parts.
  946.  
  947.  
  948.     3.1.4.  Content passing using BP14
  949.  
  950.     This is described in this section because it is at the
  951.     same conceptual level as encapsulation. It is a lossy
  952.     transformation; it is impossible to reconstruct the MIME
  953.     type information from it.
  954.  
  955.     Nevertheless, there is a demand for such functionality.
  956.  
  957.     This "encapsulation" simply strips off all headers, undoes
  958.     the content-transfer-encoding, and creates a
  959.     BilaterallyDefined body part (BP14) from the resulting
  960.     octet stream.
  961.  
  962.     No reverse translation is defined; when a BP14 arrives at
  963.     a MIXER gateway, it will be turned into an
  964.     application/octet-stream according to chap. 6.3
  965.  
  966.  
  967.     3.2.  Encapsulating X.400 Body Parts in MIME
  968.  
  969.     This section specifies a generic mechanism to map X.400
  970.     body parts to a MIME content.  This allows for the body
  971.     part to be tunneled through MIME.   It may also be used
  972.     directly by an appropriately configured MIME UA.
  973.  
  974.     This content-type is defined to carry any X.400 extended
  975.     body part.  The mapping of all standard X.400 body parts
  976.     is defined in this document.  The content-type field is
  977.     "application/x400-bp".  The parameter is defined by the
  978.     EBNF:
  979.  
  980.             mime-parameter =3D  "bp-type=3D" ( object-identifier / 1*DIGIT=
  981.  )
  982.  
  983.     If the body is a basic body part, the bp-type parameter is
  984.     set to the number of the body part's context-specific tag,
  985.     that is, the tag of the IPMS.Body.BodyPart component.
  986.  
  987.     If the body is an Extended Body Part, the EBNF.object-
  988.  
  989.  
  990.  
  991.  
  992.  
  993. Alvestrand                Exp Nov 96                 [Page 18]
  994.  
  995. draft               X.400/MIME body mapping             May 96
  996.  
  997.  
  998.     identifier is set to the OBJECT IDENTIFIER from
  999.     IPMS.body.externally-defined.data.direct-reference.
  1000.  
  1001.     For example, a basic VideotexBodyPart will have
  1002.  
  1003.           Content-type=3Dapplication/x400-bp; bp-type=3D6
  1004.  
  1005.     whilst a Extended Videotex body part will have
  1006.  
  1007.           Content-type=3Dapplication/x400-bp; bp-type=3D2.6.1.4.5
  1008.  
  1009.     The body contains the raw ASN.1 IPM body octet stream,
  1010.     that is, the BER encoding of the IPM.Body.BodyPart,
  1011.     including the initial tag octet.  The content may use a
  1012.     content-transfer-encoding of either base64 or quoted-
  1013.     printable when carried in 7-bit MIME.  It is recommended
  1014.     to use the one which gives the more compact encoding of
  1015.     the data.  If this cannot be determined, Base64 is
  1016.     recommended.  No attempt is made to turn the parameters of
  1017.     Extended Body Parts into MIME parameters, as this cannot
  1018.     be done in a general manner.
  1019.  
  1020.     For extended body parts, the
  1021.  
  1022.  
  1023.     3.3.  Encapsulating FTBP body parts in MIME
  1024.  
  1025.     The File Transfer Body Part is believed to be important in
  1026.     the future as "the" means of carrying well-identified data
  1027.     in X.400 networks.
  1028.  
  1029.     They also share the property (at lest when limited to the
  1030.     EMA MAWG functional profile) of having a well-defined data
  1031.     part that is always representable as a sequence of bytes.
  1032.  
  1033.     This conversion will have to fail, and the x400-bp
  1034.     encapsulation used instead, if:
  1035.  
  1036.     -    FileTransferData has more than one element
  1037.  
  1038.     -    Contents-type is not unstructured-binary
  1039.  
  1040.     -    Parameters that are not mappable, but important, are
  1041.          present (like Compression, which EMA doesn't
  1042.          recommend).
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048. Alvestrand                Exp Nov 96                 [Page 19]
  1049.  
  1050. draft               X.400/MIME body mapping             May 96
  1051.  
  1052.  
  1053.     Otherwise, it can be encapsulated in MIME by:
  1054.  
  1055.     -    Creating the "content-type" value by forming the
  1056.          string "application/x-ftbp." and appending the
  1057.          numbers of the OID found in
  1058.          FileTransferParameters.environment.application-
  1059.          reference.registered-identifier
  1060.  
  1061.     -    Mapping all other parameters according to the
  1062.          standard FTBP parameter mapping
  1063.  
  1064.     -    Applying an appropriate content-transfer-encoding to
  1065.          the data contained in FileTransferData.value.encoding
  1066.  
  1067.     DISCUSSION:
  1068.  
  1069.     The choice of the somewhat strange, and by necessity
  1070.     unregistered, MIME type "application/x-ftbp.n.n.n.n" is
  1071.     because for any concrete example of this usage, it will be
  1072.     easy to configure any MIME reader to take advantage of the
  1073.     identification. If the MIME type registration rules are
  1074.     ever changed to allow the registration of a namespace,
  1075.     rather than just of names, the "x-" can be deleted, and
  1076.     the types can be "application/ftbp.n.n.n.n".
  1077.  
  1078.  
  1079.  
  1080.  
  1081.     4.  User control over the gateway choice
  1082.  
  1083.     In some cases, the gateway may make an inappropriate
  1084.     choice when deciding what to do about a particular body
  1085.     part.
  1086.  
  1087.     To allow an escape clause, this chapter defines a way in
  1088.     which the user can signal the gateway what action it finds
  1089.     most appropriate.
  1090.  
  1091.     The headers given here override any "conversion
  1092.     prohibited" and "conversion with loss prohibited" on the
  1093.     message.
  1094.  
  1095.     It is still the gateway's responsibility that the
  1096.     generated messages conform to the destination domain's
  1097.     syntax rules.
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103. Alvestrand                Exp Nov 96                 [Page 20]
  1104.  
  1105. draft               X.400/MIME body mapping             May 96
  1106.  
  1107.  
  1108.     DISCUSSION:
  1109.  
  1110.     The intent of this mechanism is to allow the sender to
  1111.     efficiently get a message through to a single recipient
  1112.     when the sender has information about the recipient that
  1113.     the gateway does not have.
  1114.  
  1115.     It is not a part of the minimum functionality listed in
  1116.     chapter 8; a gateway does not have to implement this spec
  1117.     to be MIXER conformant, but if implemented, it should be
  1118.     done like this.
  1119.  
  1120.     The additional complexity, both in user interface and in
  1121.     protocol, of making this field selectable per recipient
  1122.     was not thought worthwhile;
  1123.  
  1124.  
  1125.     4.1.  Conversion from MIME to X.400
  1126.  
  1127.  
  1128.     The header field described below specifies explicit MIXER
  1129.     conversion. Comments are allowed within the field
  1130.     according to the usual RFC 822 convention.
  1131.  
  1132.     If "x400-object-id" is omitted, "tunnel" is assumed.
  1133.  
  1134.     mime-to-x400 =3D "Wanted-X400-Conversion" ":"
  1135.                     [ mime-from ]  [ x400-object-id ]
  1136.                     "in" x400-encoding
  1137.  
  1138.     x400-object-id =3D  "to" ( object-identifier-2 / "tunnel" )
  1139.     x400-encoding =3D "bp14" / "bp15" / "ftbp" / "ia5"
  1140.     mime-from =3D "from" mime-type
  1141.     mime-type =3D word
  1142.  
  1143.     There is no way to ask for a different conversion based on
  1144.     MIME parameters or bodypart content.
  1145.  
  1146.     Examples:
  1147.  
  1148.     Wanted-X400-Conversion: from application/msword
  1149.                     to 1.2.840.113556.4.2 (Microsoft defined ms-word)
  1150.                     in ftbp
  1151.  
  1152.     This uses the MAWG definitions, and leads to an FTBP encoding.
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158. Alvestrand                Exp Nov 96                 [Page 21]
  1159.  
  1160. draft               X.400/MIME body mapping             May 96
  1161.  
  1162.  
  1163.     Wanted-X400-Conversion: from application/msword
  1164.                     to tunnel in bp14
  1165.  
  1166.     This leads to a Body Part 14 encoding for all body parts of type
  1167.     application/msword.
  1168.  
  1169.     Wanted-X400-Conversion: in bp14
  1170.  
  1171.     This requests that this specific body part be encoded in Body Part 14.
  1172.  
  1173.  
  1174.     This field may be used in two places:
  1175.  
  1176.      (1)   In the heading of an unstructured MIME body part.
  1177.            In this case the EBNF.mime-from is omitted, and the
  1178.            requested conversion applies to the body part.
  1179.  
  1180.  
  1181.  
  1182.      (2)   In a multipart. In this case, the body part type to
  1183.            which the conversion applies is defined by
  1184.            EBNF.mime-from, and the conversion applies to all
  1185.            body parts of this MIME type contained in the
  1186.            multipart, including those contained in nested
  1187.            messages and multiparts. If a contained body part
  1188.            has its own heading, this takes precedence. Note
  1189.            that the "from" parameter is mandatory when used in
  1190.            a multipart.
  1191.  
  1192.  
  1193.     The EBNF.x400-object-id shall be present when "bp15" or
  1194.     "ftbp" encoding is selected.
  1195.  
  1196.     The value "tunnel" implies encapsulation as defined in
  1197.     Chapter 3.
  1198.  
  1199.     The "object identifier" used below is:
  1200.  
  1201.     -    For BP 15, it is the value of the EXTENDED-BODY-PART-
  1202.          TYPE macro that defines the body part, which is found
  1203.          in ExternallyDefinedBodyPart.data.direct-reference.
  1204.  
  1205.     -    For FTBP, it is the value of the
  1206.          Environment.application-reference.
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213. Alvestrand                Exp Nov 96                 [Page 22]
  1214.  
  1215. draft               X.400/MIME body mapping             May 96
  1216.  
  1217.  
  1218.     4.2.  Conversion from X.400 to MIME
  1219.  
  1220.  
  1221.     The IPM heading defined here shall be present in the
  1222.     heading of a message. It defines the mapping for all body
  1223.     parts of the specified types, including those in nested
  1224.     messages.
  1225.  
  1226.     wanted-MIME-conversion HEADING-EXTENSION
  1227.             VALUE WantedMIMEConversions
  1228.             ::=3D id-wanted-MIME-conversions
  1229.  
  1230.  
  1231.     WantedMIMEConversions ::=3D SEQUENCE OF X400toMIMEConversion
  1232.  
  1233.  
  1234.     X400toMIMEConversion ::=3D SEQUENCE {
  1235.             x400-type X400Type,
  1236.             mime-type MIMEType }
  1237.  
  1238.     X400Type ::=3D CHOICE {
  1239.             standard [0] INTEGER,           -- standard body part
  1240.             extended [1] OBJECT IDENTIFIER,  -- BP 15
  1241.             ftbp     [2] OBJECT IDENTIFIER}     -- FTBP application-refere=
  1242. nce
  1243.  
  1244.     MIMEType ::=3D SEQUENCE {
  1245.             type IA5String,         -- type (e.g., application/ms-word)
  1246.             encoding [1] IA5String OPTIONAl -- e.g. quoted-printable
  1247.             parameters [2] IA5String OPTIONAL }     -- MIME Parameters
  1248.  
  1249.     The heading extension includes all requested conversions,
  1250.     with explicit information as to how each body part type is
  1251.     encoded in MIME.
  1252.  
  1253.     FTBP is identified as a separate body part type, as there
  1254.     will be a need for different encodings, dependent on what
  1255.     is being carried.
  1256.  
  1257.     Encapsulation is requested by asking for
  1258.     "application/x400-bp" or "application/ftbp" as the
  1259.     destination type.
  1260.  
  1261.     For FTAM body parts, the parameters will survive the
  1262.     gatewaying process. For other body parts, there are three
  1263.     alternatives:
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269. Alvestrand                Exp Nov 96                 [Page 23]
  1270.  
  1271. draft               X.400/MIME body mapping             May 96
  1272.  
  1273.  
  1274.      (1)   The gateway knows a defined mapping for this
  1275.            particular body part and destination type. It will
  1276.            be used, and parameters mapped accordingly.
  1277.  
  1278.      (2)   The gateway knows how to extract an OCTET STRING
  1279.            from the body part, and the destination is a simple
  1280.            MIME body part. All information outside the OCTET
  1281.            STRING is lost. (This may be the case for a BP14
  1282.            that should end up in an application/xyzzy, for
  1283.            instance).
  1284.  
  1285.      (3)   The gateway knows of no relevant mapping, and does
  1286.            not know how to simplify the X.400 body part. The
  1287.            gateway will then proceed as if the mapping control
  1288.            field had not been present.
  1289.  
  1290.     5.  The equivalence registry
  1291.  
  1292.  
  1293.     5.1.  What information one must give about a mapping
  1294.  
  1295.     The following information MUST be supplied when describing
  1296.     an equivalence or a mapping:
  1297.  
  1298.     MIME type name (which must be preregistered)
  1299.  
  1300.     X.400 body part (often BP15 or FTAM Body Part)
  1301.  
  1302.     If BP15 is used, the following information must be given:
  1303.  
  1304.  
  1305.      (1)   Object Identifier for X.400 BP15 Data
  1306.  
  1307.      (2)   Object Identifier for X.400 BP15 Parameters
  1308.  
  1309.      (3)   X.400 ASN.1 Syntax (must be an EXTENDED-BODY-PART-
  1310.            TYPE macro)
  1311.  
  1312.  
  1313.     If FTBP is used, the following information must be given:
  1314.  
  1315.  
  1316.      (1)   Object Identifier for the FTAM
  1317.            Environment.application-reference
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. Alvestrand                Exp Nov 96                 [Page 24]
  1325.  
  1326. draft               X.400/MIME body mapping             May 96
  1327.  
  1328.  
  1329.      (2)   Object Identifier for the FTAM Contents-type, if
  1330.            unstructured-binary is not used
  1331.  
  1332.      (3)   Any other special considerations
  1333.  
  1334.  
  1335.     In all cases, the following must be given:
  1336.  
  1337.     Conversion algorithms. The expected effect of "Conversion
  1338.     prohibited" and "Conversion with loss prohibited" should
  1339.     be noted.
  1340.  
  1341.     The conversion must be specified with enough detail to
  1342.     permit independent implementation; literature references
  1343.     are acceptable.
  1344.  
  1345.     An equivalence can be registered with IANA using the form
  1346.     at the end of this document. The purpose of the
  1347.     registration is to achieve a greater uniformity among
  1348.     gateways implementing the same translation; there is no
  1349.     requirement that a gateway must support all of the
  1350.     translations that are registered with IANA, and there is
  1351.     no requirement that all conversions supported by a gateway
  1352.     are registered with IANA. Specific conformance
  1353.     requirements for MIXER are given at the end of this
  1354.     document.
  1355.  
  1356.     Anyone can register an equivalence with IANA, and may
  1357.     update the registered equivalence at any time, or reassign
  1358.     the right to update the registry entry at any time.
  1359.     However, the IESG has the power to "lock" a registration,
  1360.     so that changing it requires IESG approval, and to update
  1361.     such a "locked" registration. All registered equivalences
  1362.     defined in standards-track documents (including this one)
  1363.     are locked.
  1364.  
  1365.  
  1366.     5.2.  Equivalence summary for known X.400 and MIME Types
  1367.  
  1368.     This section itemizes the equivalences for all currently
  1369.     known MIME content-types and X.400 body parts.
  1370.  
  1371.     For each MIME content-type/X.400 body part pair, the
  1372.     equivalence table contains an entry with the following
  1373.     sections:
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379. Alvestrand                Exp Nov 96                 [Page 25]
  1380.  
  1381. draft               X.400/MIME body mapping             May 96
  1382.  
  1383.  
  1384.     X.400 Body Part
  1385.          This section identifies the X.400 Body Part governed
  1386.          by this Table entry. It includes any OBJECT
  1387.          IDENTIFIERs or other parameters necessary to uniquely
  1388.          identify the Body Part.
  1389.  
  1390.  
  1391.     MIME Content-Type
  1392.          This section identifies the MIME content-type
  1393.          governed by this Table entry.  The MIME content-type
  1394.          named here must be registered with the IANA.
  1395.  
  1396.  
  1397.     Section/document reference
  1398.          Reference to section of this document, or to the
  1399.          other document that describes this mapping.
  1400.  
  1401.  
  1402.     The initial Equivalence Table entries in this document are
  1403.     described using this convention.
  1404.  
  1405.     Further registrations of equivalences should be submitted
  1406.     to the IANA after a public review, using the example form
  1407.     given at the end of this document.
  1408.  
  1409.  
  1410.     5.3.  MIME to X.400 Table
  1411.  
  1412.     MIME content-type          X.400 Body Part             Section
  1413.     -----------------          ------------------          -------
  1414.     text/plain
  1415.       charset=3Dus-ascii         ia5-text                     6.1
  1416.       charset=3DISO-8859-x       EBP - GeneralText            6.2
  1417.     text/richtext              no mapping defined           Encap
  1418.     application/oda            EBP - ODA                    [ODA]
  1419.     application/octet-stream   bilaterally-defined or       6.3
  1420.                                FTBP unknown attachment      6.4
  1421.     application/postscript     EBP - mime-postscript-body   [POSTSCRIPT]
  1422.     image/g3fax                g3-facsimile                 [IMAGES]
  1423.     image/jpeg                 EBP - mime-jpeg-body         [IMAGES]
  1424.     image/gif                  EBP - mime-gif-body          [IMAGES]
  1425.     audio/basic                no mapping defined           Encap
  1426.     video/mpeg                 no mapping defined           Encap
  1427.     message/RFC822             ForwardedIPMessage           6.5
  1428.     multipart/*                ForwardedIPMessage           6.6
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434. Alvestrand                Exp Nov 96                 [Page 26]
  1435.  
  1436. draft               X.400/MIME body mapping             May 96
  1437.  
  1438.  
  1439.     multipart/signed           HARPOON encap          7.3
  1440.     multipart/encrypted        HARPOON encap                7.4
  1441.  
  1442.     Abbreviation: EBP - Extended Body Part
  1443.  
  1444.  
  1445.     5.4.  X.400 to MIME Table
  1446.                              Basic Body Parts
  1447.  
  1448.     X.400 Basic Body Part      MIME content-type           Section
  1449.     ---------------------      --------------------        -------
  1450.     ia5-text                   text/plain;charset=3Dus-ascii 6.1
  1451.     voice                      No Mapping Defined          Encap
  1452.     g3-facsimile               image/g3fax                 [IMAGES]
  1453.     g4-class1                  no mapping defined          Encap
  1454.     teletex                    text/plain;charset=3Dteletex  6.7
  1455.     videotex                   no mapping defined          Encap
  1456.     encrypted                  no mapping defined          Encap
  1457.     bilaterally-defined        application/octet-stream    6.3
  1458.     nationally-defined         no mapping defined          Encap
  1459.     externally-defined         See Extended Body Parts below
  1460.     ForwardedIPMessage         message/RFC822 or multipart 6.5,6.6
  1461.  
  1462.     X.400 Extended Body Part   MIME content-type              Section
  1463.     -------------------------  --------------------           -------
  1464.     GeneralText                text/plain;charset=3DISO-8859-x  6.2
  1465.     ODA                        application/oda                [ODA]
  1466.     mime-postscript-body       application/postscript         [POSTSCRIPT]
  1467.     mime-jpeg-body             image/jpeg                     [IMAGES]
  1468.     mime-gif-body              image/gif                      [IMAGES]
  1469.     FTAM                       various                        2.3,6.4
  1470.  
  1471.     FTAM application ID        MIME content type              Section
  1472.     -------------------        -----------------              -------
  1473.     ema-unknown-attachment     application/octet-stream       6.4
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489. Alvestrand                Exp Nov 96                 [Page 27]
  1490.  
  1491. draft               X.400/MIME body mapping             May 96
  1492.  
  1493.  
  1494.     5.5.  Use of OBJECT IDENTIFIERs and ASN.1 MACROS
  1495.  
  1496.     When one wants to define new BP15 body parts for use with
  1497.     equivalences, it is important to know that X.420 dictates
  1498.     that Extended Body Parts shall:
  1499.  
  1500.      (1)   use OBJECT IDENTIFIERs (OIDs) to uniquely identify
  1501.            the contents, and
  1502.  
  1503.      (2)   be defined by using the ASN.1 Macro:
  1504.  
  1505.               EXTENDED-BODY-PART-TYPE MACRO::=3D
  1506.               BEGIN
  1507.                  TYPE NOTATION  ::=3D Parameters Data
  1508.                  VALUE NOTATION ::=3D value (VALUE OBJECT IDENTIFIER)
  1509.  
  1510.                  Parameters     ::=3D  "PARAMETERS" type "IDENTIFIED"
  1511.                                      "BY" value(OBJECT IDENTIFIER)
  1512.                                    | empty;
  1513.                  Data           ::=3D "DATA" type
  1514.               END
  1515.  
  1516.     To meet these requirements, this document uses the OID
  1517.  
  1518.        mixer
  1519.  
  1520.     defined in [MIXER], as the root OID for X.400 Extended
  1521.     Body Parts defined for MIME interworking.
  1522.  
  1523.     Each Extended Body Part contains Data and optional
  1524.     Parameters, each being named by an OID.  To this end, two
  1525.     OID subtrees are defined under mixer-bodies, one for Data,
  1526.     and the other for Parameters:
  1527.  
  1528.        mixer-bp-data  OBJECT IDENTIFIER ::=3D
  1529.                        { mixer 1 }
  1530.  
  1531.        mixer-bp-parameter OBJECT IDENTIFIER ::=3D
  1532.                        { mixer 2 }
  1533.  
  1534.  
  1535.     All definitions of extended X.400 body parts submitted to
  1536.     the IANA for registration with a mapping must use the
  1537.     Extended Body Part Type macro for the definition.  See
  1538.     [IMAGES] for an example.
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544. Alvestrand                Exp Nov 96                 [Page 28]
  1545.  
  1546. draft               X.400/MIME body mapping             May 96
  1547.  
  1548.  
  1549.     Lastly, the IANA will use the mixer-bp-data and mixer-bp-
  1550.     parameter OIDs as root OIDs for any new MIME content-
  1551.     type/subtypes that aren't otherwise registered in the
  1552.     Equivalence Table.
  1553.  
  1554.     NOTE: The ASN.1 for an ExternallyDefinedBodyPart is
  1555.  
  1556.       ExternallyDefinedBodyPart ::=3D SEQUENCE {
  1557.          parameters [0] ExternallyDefinedParameters OPTIONAL,
  1558.          data           ExternallyDefinedData }
  1559.  
  1560.       ExternallyDefinedParameters ::=3D EXTERNAL
  1561.  
  1562.       ExternallyDefinedData ::=3D EXTERNAL
  1563.  
  1564.     The ASN.1 for EXTERNAL is (from X.208):
  1565.  
  1566.       EXTERNAL ::=3D [UNIVERSAL 8] IMPLICIT SEQUENCE
  1567.       {direct-reference     OBJECT IDENTIFIER OPTIONAL,
  1568.       indirect-reference    INTEGER OPTIONAL,
  1569.       data-value-descriptor ObjectDescriptor OPTIONAL,
  1570.       encoding CHOICE
  1571.         {single-ASN1-type  [0] ANY,
  1572.          octet-aligned     [1] IMPLICIT OCTET STRING,
  1573.          arbitrary         [2] IMPLICIT BIT STRING}}
  1574.  
  1575.       ObjectDescriptor ::=3D [UNIVERSAL 7] IMPLICIT GraphicString
  1576.  
  1577.     There are a bit too many choices here; the common X.400
  1578.     usage for BP15 encoding is to:
  1579.  
  1580.      (1)   Always use direct-reference
  1581.  
  1582.      (2)   Omit indirect-reference and data-value-descriptor
  1583.  
  1584.      (3)   Use the single-ASN1-type encoding only
  1585.  
  1586.     Unfortunately, some implementations have chosen to use the
  1587.     octet-aligned choice when constructing values where the
  1588.     ASN.1 type is OCTET STRING, which of course caused
  1589.     interoperability problems.
  1590.  
  1591.     An attempt to specify that X.420 only allowed the single-
  1592.     ASN1-type choice in the 1996 versions is still (Sept 1995)
  1593.     being debated in ISO; the end result seems to be that all
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599. Alvestrand                Exp Nov 96                 [Page 29]
  1600.  
  1601. draft               X.400/MIME body mapping             May 96
  1602.  
  1603.  
  1604.     agree in principle that single-ASN1-type should be used,
  1605.     but that one has to allow the generation of the octet-
  1606.     aligned choice as being conformant.
  1607.  
  1608.  
  1609.  
  1610.     6.  Defined Equivalences
  1611.  
  1612.  
  1613.     6.1.  IA5Text - text/plain
  1614.  
  1615.     X.400 Body Part: IA5Text
  1616.     MIME Content-type: text/plain; charset=3DUS-ASCII
  1617.     Conversion Type: No conversion
  1618.     Comments:
  1619.  
  1620.     When mapping from X.400 to MIME, the "repertoire"
  1621.     parameter is ignored.
  1622.  
  1623.     When mapping from MIME to X.400, the "repertoire"
  1624.     parameter is set to IA5 (5).
  1625.  
  1626.     NOTE: The MIME Content-type headers are omitted, when
  1627.     mapping from X.400 to MIME, if and only if the IA5Text
  1628.     body part is the only body part in the IPMS.Body sequence.
  1629.  
  1630.     NOTE: IA5Text specifies the "currency" symbol in position
  1631.     2/4. This is converted without comment to the "dollar"
  1632.     symbol, since the author of this document has seen many
  1633.     documents in which the position was intended to indicate
  1634.     "dollar" while he has not yet seen one in which the
  1635.     "currency" symbol is intended.
  1636.  
  1637.     (For reference: The T.50 (1988) recommendation, which
  1638.     defines IA5, talks about ISO registered set number 2,
  1639.     while ASCII, using the "dollar" symbol, is ISO registered
  1640.     set number 6. There are no other differences.)
  1641.  
  1642.     NOTE: It is not uncommon, though it is a violation of the
  1643.     standard, to use 8-bit character sets inside an IA5 body
  1644.     part. Gateways that can expect to encounter this situation
  1645.     should consider implementing something like the guidance
  1646.     given in RFC 1428 [MIMETRANS], "Transition of Internet
  1647.     Mail from just-send-8 to 8-bit SMTP/MIME", and generate
  1648.     appropriate charset parameters for the MIME messages they
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654. Alvestrand                Exp Nov 96                 [Page 30]
  1655.  
  1656. draft               X.400/MIME body mapping             May 96
  1657.  
  1658.  
  1659.     generate. This behavior is not required for MIXER
  1660.     conformance, since it is only needed when the base
  1661.     standards are violated.
  1662.  
  1663.  
  1664.     6.2.  GeneralText - text/plain (ISO-8859)
  1665.  
  1666.     X.400 Body Part: GeneralText; CharacterSets in
  1667.                     6, 14, 42, 87, 100,101,109,110,126,127,138,144,148
  1668.     MIME Content-Type: text/plain; charset=3DISO-8859-(1-9)
  1669.                                 or iso-2022-jp
  1670.     Conversion Type: Text conversion without character change
  1671.     When mapping from X.400 to MIME, the character-set is
  1672.     chosen from the table below according to the value of
  1673.     Parameters.CharacterSets. If no match is found, and the
  1674.     gateway does not support a conversion, the character set
  1675.     shall be encoded as x-iso-nnn-nnn-nnn, where "nnn" is the
  1676.     numbers of the Parameters.CharacterSets, sorted in numeric
  1677.     order.
  1678.  
  1679.     When mapping from MIME to X.400, GeneralText is an
  1680.     Extended Body Part, hence it requires an OID.  The OID for
  1681.     the GeneralText body is defined in [MOTIS], part 8, annex
  1682.     D, as {2 6 1 4 11}. The OID for the parameters is {2 6 1
  1683.     11 11}.
  1684.  
  1685.     The Parameters.CharacterSets is set from table below
  1686.     according to the value of "charset"
  1687.  
  1688.  
  1689.     The following table lists the MIME character sets and the
  1690.     corresponding ISO registry numbers. If no correspondence
  1691.     is found, this conversion fails, and the generic body part
  1692.     approach is used.
  1693.  
  1694.     MIME charset    ISO IR numbers          Comment
  1695.     -----------------------------------------------
  1696.     ISO-8859-1      6, 100                  West European "8-bit ASCII"
  1697.     ISO-8859-2      6, 101                  East European
  1698.     ISO-8859-3      6, 109                  <regarded as obsolete>
  1699.     ISO-8859-4      6, 110                  <regarded as obsolete>
  1700.     ISO-8859-5      6, 144                  Cyrillic
  1701.     ISO-8859-6      6, 127                  Arabic
  1702.     ISO-8859-7      6, 126                  Greek
  1703.     ISO-8859-8      6, 138                  Hebrew
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709. Alvestrand                Exp Nov 96                 [Page 31]
  1710.  
  1711. draft               X.400/MIME body mapping             May 96
  1712.  
  1713.  
  1714.     ISO-8859-9      6, 148                  Other Latin-using languages
  1715.     ISO-2022-JP     6, 14, 42, 87           Japanese
  1716.  
  1717.     When converting from MIME to X.400, generate the correct
  1718.     OIDs for use in the message envelope's Encoded Information
  1719.     Types by looking up the ISO IR numbers in the above table,
  1720.     and then appending each to the id-cs-eit-authority {1 0
  1721.     10021 7 1 0} OID, generating 2-4 OIDs.
  1722.  
  1723.     Similar procedures can be used with other MIME charsets
  1724.     that map to a set of ISO character sets.
  1725.  
  1726.     The escape sequences to designate and invoke the relevant
  1727.     character sets in their proper positions must be added to
  1728.     the front of the GeneralText character string.
  1729.  
  1730.     For ISO 8859-1, the relevant escape sequence will be:
  1731.  
  1732.     ESC 28 42
  1733.          ASCII in G0
  1734.  
  1735.     ESC 2D 41
  1736.          ISO-IR-100 in G1
  1737.  
  1738.     ESC 21 41
  1739.          High control character set in C1
  1740.  
  1741.     ESC 7E
  1742.          Locking shift 1 Right
  1743.  
  1744.     These escape sequences are removed when converting from
  1745.     GeneralText to text/plain.
  1746.  
  1747.     Note that new character sets may be defined on both the
  1748.     Internet side and the X.400 side; a gateway MAY choose to
  1749.     implement more conversions in the same fashion.
  1750.  
  1751.     DISCUSSION:
  1752.  
  1753.     The conversion of text is a problematic one, and one in
  1754.     which it is likely that gateways should be given wide
  1755.     latitude to make decisions based upon their knowledge of
  1756.     the user's preferences. The text given below is thought to
  1757.     give the best approximation to a gateway conforming to
  1758.     current and anticipated usage in the MIME and X.400
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764. Alvestrand                Exp Nov 96                 [Page 32]
  1765.  
  1766. draft               X.400/MIME body mapping             May 96
  1767.  
  1768.  
  1769.     worlds, and is the way recommended when no knowledge of
  1770.     the recipient's capabilities exists.
  1771.  
  1772.     The lossless changes, such as normalizing escape
  1773.     sequences, can be done even when "conversion-prohibited"
  1774.     is set. If "conversion-with-loss-prohibited" is set,
  1775.     translation to a character set that is not able to encode
  1776.     all characters cannot be done, and the message should be
  1777.     non-delivered with an appropriate non-delivery reason.
  1778.  
  1779.  
  1780.     The common use of character sets in MIME is somewhat
  1781.     different from the rules given by X.400; in particular, it
  1782.     is common in MIME to assume that the character sets follow
  1783.     strict rules. For the ISO-8859-x character sets, it is
  1784.     assumed that they are designated and invoked at the
  1785.     beginning of the text, and that no designation or
  1786.     invocation sequences occur within the body of the text.
  1787.     The rules for ISO-2022-JP are given in RFC 1468 [2022-JP],
  1788.     and are even more particular, using a pure 7-bit encoding
  1789.     in which each line of text starts in ASCII.
  1790.  
  1791.     Therefore, the text must be "normalized" by going through
  1792.     the whole message, using a state machine or similar device
  1793.     to remove or rewrite all escape and shift sequences.
  1794.  
  1795.     Appendix A gives pseudocode for such a conversion.
  1796.  
  1797.     NOTE: In 1988, the GeneralText body part was defined in
  1798.     ISO 10021-8 [MOTIS], and NOT in the corresponding CCITT
  1799.     recommendation; this was added later.  Also, the
  1800.     parameters have been heavily modified; they should be a
  1801.     SET OF INTEGER in the currently valid text.  Use the
  1802.     latest version of the standard that you can get hold of.
  1803.  
  1804.  
  1805.     6.3.  BilaterallyDefined - application/octet-stream
  1806.  
  1807.     X.400 Body Part: BilaterallyDefined
  1808.     MIME Content-Type: Application/Octet-Stream (no parameters)
  1809.     Conversion Type: No conversion
  1810.  
  1811.     When mapping from MIME to X.400, if there are parameters
  1812.     present in the Content-Type: header field, they are
  1813.     removed.
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819. Alvestrand                Exp Nov 96                 [Page 33]
  1820.  
  1821. draft               X.400/MIME body mapping             May 96
  1822.  
  1823.  
  1824.     DISCUSSION:
  1825.  
  1826.     The parameters "name" "type" and "conversions" are
  1827.     advisory; name and conversions are depreciated in RFC
  1828.     2046.
  1829.  
  1830.     The parameter "padding" changes the interpretation of the
  1831.     last byte of the data, but it is deemed better by the WG
  1832.     to delete this information than to non-deliver the body
  1833.     part. The "padding" parameter is rarely used with MIME.
  1834.  
  1835.  
  1836.     Use of BilaterallyDefined Body Parts is specifically
  1837.     deprecated in both 1988 and 1992 X.400.  It is retained
  1838.     solely for backward compatibility with 1984 systems, and
  1839.     because it is in common use.
  1840.  
  1841.  
  1842.     6.4.  FTBP EMA Unknown Attachment -
  1843.     application/octet-stream
  1844.  
  1845.     X.400 Body Part: FTBP EMA Unknown Attachment
  1846.     MIME Content-Type: Application/Octet-Stream
  1847.     Conversion Type: No conversion
  1848.  
  1849.     The OID for the Unknown Attachment is { joint-iso-ccitt(2)
  1850.     country(16) us(840) organization(1) ema(113694) objects(2)
  1851.     messaging(2) attachments(1) unknown(1) }, or
  1852.     2.16.840.1.113694.2.2.1.1 for short.
  1853.  
  1854.     NOTE: Previous EMA drafts gave it as { iso(1) countries(2)
  1855.     usa(840) organization (1) ema (113694) objects(2)
  1856.     messaging(2) attachments(1) unknown (1)}, or
  1857.     1.2.840.1.113694.2.2.1.1 for short.
  1858.  
  1859.     The parameters for this type must be mapped according to
  1860.     chapter 2.3, with the following extensions for the
  1861.     parameters of the application/octet-stream:
  1862.  
  1863.          If there is no Content-Disposition parameter with a
  1864.          filename, and there is a name parameter, the
  1865.          FTBP.FileTransferParameters.File-attributes.pathname
  1866.          is generated from this parameter. Note that RFC 2046
  1867.          recommends not using the "name" parameter.
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874. Alvestrand                Exp Nov 96                 [Page 34]
  1875.  
  1876. draft               X.400/MIME body mapping             May 96
  1877.  
  1878.  
  1879.     The "type", "conversions" and "padding" attributes are
  1880.     ignored; "type" is for human consumption; "conversions"
  1881.     are discouraged in RFC 2046.
  1882.  
  1883.     The body mapping is just copying the bytes in both
  1884.     directions.
  1885.  
  1886.  
  1887.     6.5.  MessageBodyPart - message/RFC822
  1888.  
  1889.     X.400 body part: MessageBodyPart
  1890.     MIME Content-Type: message/RFC822
  1891.     Conversion Type: Special
  1892.  
  1893.     NOTE: If the headers of the X.400 MessageBodyPart contains the
  1894.     "multipart-message" heading extension with the isAMessage bit set
  1895.     (either explicitly or implicitly), the mapping should be to
  1896.     multipart/* according to section 6.6, below.
  1897.  
  1898.     To map an IPMS.MessageBodyPart, the full X.400 -> RFC 822
  1899.     mapping  is recursively applied, to generate an RFC 822 Message.
  1900.     If present, the IPMS.MessageBodyPart.parameters.delivery-envelope
  1901.     is used for the MTS Abstract Service Mappings.  If present, the
  1902.     IPMS.MessageBodyPart.parameters.delivery-time is mapped to the
  1903.     extended RFC 822 field "Delivery-Date:".
  1904.  
  1905.     When a message/RFC822 is contained within a MIME message, it is
  1906.     mapped to an IPMS.MessageBodyPart according to MIXER.
  1907.     specification.  Any mappings that would have been made to the MTS
  1908.     Abstract Service are placed in
  1909.     IPMS.MessageBodyPart.parameters.delivery-envelope.
  1910.  
  1911.  
  1912.     6.6.  MessageBodyPart - multipart/*
  1913.  
  1914.     X.400 body part: MessageBodyPart
  1915.     MIME Content-Type: multipart/*
  1916.     Conversion Type: Special
  1917.  
  1918.     NOTE: If the headers of the X.400 MessageBodyPart do not contain the
  1919.     "multipart-message" heading extension with the "isAMessage" flag FALSE=
  1920. ,
  1921.     the mapping should be to message/RFC822.
  1922.  
  1923.     A MIME multipart is a set of content-types and not a message with
  1924.     a set of content types. When the multipart is at the outermost
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930. Alvestrand                Exp Nov 96                 [Page 35]
  1931.  
  1932. draft               X.400/MIME body mapping             May 96
  1933.  
  1934.  
  1935.     MIME header, elements of the multipart are mapped directly onto
  1936.     IPMS.Bodypart.
  1937.     When the MIME multipart is not at the outermost level, it is mapped to
  1938.     an IPMS.MessageBodyPart containing an IPMS.Bodypart for each element
  1939.     of the multipart.
  1940.  
  1941.     When a nested IPMS.Message is generated from a multipart, an
  1942.     IPMS.heading shall always be generated.  The only mandatory field
  1943.     is the IPMS.Heading.this-IPM message id, which shall be generated
  1944.     by the gateway.  An IPMS.Heading.subject field shall also be
  1945.     generated, in order to provide useful information to non-MIME
  1946.     capable X.400(88) UAs and to all X.400(84) UAs.  The subject
  1947.     field is set as follows according to the multipart subtype:
  1948.  
  1949.  
  1950.     mixed:
  1951.          "Multipart Message"
  1952.  
  1953.     alternative:
  1954.          "Alternative Body Parts containing the same
  1955.          information"
  1956.  
  1957.     digest:
  1958.          "Message Digest"
  1959.  
  1960.     parallel:
  1961.          "Body Parts interpreted in parallel"
  1962.  
  1963.     other:
  1964.          "Multipart Message (<subtype>)"
  1965.  
  1966.     For other types of multipart, the multipart subtype shall
  1967.     be included in the subject line.
  1968.  
  1969.     For each multipart, the following IPMS.HeadingExtension
  1970.     shall be generated, with the value set according to the
  1971.     subtype.
  1972.     If the multipart is the outermost multipart, and the
  1973.     subtype is "mixed", it may be omitted.
  1974.  
  1975.             multipart-message HEADING-EXTENSION
  1976.                     VALUE MultipartType
  1977.                     ::=3D id-hex-multipart-message-v2
  1978.  
  1979.             MultipartType ::=3D SEQUENCE {
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985. Alvestrand                Exp Nov 96                 [Page 36]
  1986.  
  1987. draft               X.400/MIME body mapping             May 96
  1988.  
  1989.  
  1990.                       subtype IA5String,
  1991.                       isAMessage BOOLEAN DEFAULT TRUE }
  1992.  
  1993.     The MultipartType contains the subtype, for example
  1994.     "digest".  If this heading is present when mapping from
  1995.     X.400 to MIME, the appropriate multipart may be generated.
  1996.  
  1997.     The isAMessage flag is needed because of the case where a
  1998.     message contains a ForwardedIPMessage, which itself was
  1999.     generated from a MIME message that was a Multipart; it is
  2000.     set whenever the multipart is the outermost level of
  2001.     nesting inside a Message/RFC822.
  2002.  
  2003.  
  2004.     NOTE:
  2005.          When downgrading to X.400/84, the content-type SHOULD
  2006.          be regenerated from this heading-extension and put
  2007.          into the RFC-822-HEADERS extra body part.
  2008.  
  2009.  
  2010.     NOTE:
  2011.          This definition is different from the one in RFC
  2012.          1494, because the RFC 1494 definition turned out to
  2013.          be insufficient when new subtypes of Multipart (like
  2014.          Signed or Related) were defined. That is the reason
  2015.          for the "-v2" part of the name of the OID.
  2016.  
  2017.          If both the old and the new heading extensions occur
  2018.          on a message, a MIXER gateway should give preference
  2019.          to the new one.
  2020.  
  2021.  
  2022.     6.7.  Teletex - Text/Plain (Teletex)
  2023.  
  2024.     X.400 Body Part: Teletex
  2025.     MIME Content-Type: text/plain; charset=3DTeletex
  2026.     Conversion Type: Text conversion
  2027.  
  2028.     From X.400 to RFC-822, the conversion shall take the bytes
  2029.     of all the pages in the "data" part of the
  2030.     TeletexBodyPart, add a FF character (0x0C, control-L) to
  2031.     each part that does not already end in one, and
  2032.     concatenate them together to form the body of the
  2033.     Text/Plain.
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040. Alvestrand                Exp Nov 96                 [Page 37]
  2041.  
  2042. draft               X.400/MIME body mapping             May 96
  2043.  
  2044.  
  2045.     The character set shall be "Teletex", which is especially
  2046.     registered for this purpose. Its definition is shown in an
  2047.     appendix.
  2048.  
  2049.     The parameters are discarded.
  2050.  
  2051.     From RFC-822 to X.400, the conversion shall split the
  2052.     content at each occurrence of the FF character (0x0C),
  2053.     delete the character and construct the Teletex body part
  2054.     as a SEQUENCE OF TeletexString, as described in X.420(88),
  2055.     section 7.3.5
  2056.  
  2057.     The TeletexParameters may, but need not, contain the
  2058.     number-of-pages component.
  2059.  
  2060.     NOTE: It is recommended, but not mandated, that the data
  2061.     be converted into a more widespread character set like
  2062.     ISO-8859-1 or ISO-2022-JP (if applicable) if possible.
  2063.     This will result in the reverse translation giving a
  2064.     GeneralText body part, which will have to be dealt with
  2065.     appropriately at the X.400/88 to X.400/84 downgrading
  2066.     boundary, if possible, but will give a much greater chance
  2067.     that the MIME recipient can actually read the message.
  2068.  
  2069.     DISCUSSION:
  2070.  
  2071.     The Teletex body part is frequently used in X.400(84) to
  2072.     send around text with slightly extended character sets
  2073.     beyond ASCII.
  2074.  
  2075.     Its body consists of a series of "pages", separated by
  2076.     ASN.1 representation.  It is important to many people to
  2077.     have this mapped into something that is readable to most
  2078.     end-users; therefore, it is recommended to map this onto
  2079.     Text/Plain; however, since this is not plain text, the
  2080.     conversion must be specified.
  2081.  
  2082.     Note that the definition of Text/Plain permits only CRLF
  2083.     as a line separator; the sequences "CR FF" and "CR LF LF
  2084.     LF.." permitted in Teletex must be encoded as Quoted-
  2085.     Printable.
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095. Alvestrand                Exp Nov 96                 [Page 38]
  2096.  
  2097. draft               X.400/MIME body mapping             May 96
  2098.  
  2099.  
  2100.     7.  Body parts where encapsulation is recommended
  2101.  
  2102.     Some body parts are MIME constructs, and their
  2103.     functionality will be severely damaged if they are coerced
  2104.     into an X.400 framework.
  2105.  
  2106.     Special care needs to be taken with these; they are
  2107.     described below.
  2108.  
  2109.  
  2110.     7.1.  message/external-body
  2111.  
  2112.     The gateway MUST support the encapsulation of this body
  2113.     part using the HARPOON encapsulation (IA5).
  2114.  
  2115.     It MAY support some kind of retrieval of the referred
  2116.     object.
  2117.  
  2118.     DISCUSSION:
  2119.  
  2120.     The message/external-body part points to an object that
  2121.     can be retrieved using Internet protocols.
  2122.  
  2123.     There are three cases to consider for the recipient's
  2124.     capabilities:
  2125.  
  2126.  
  2127.      (1)   The user has no Internet access. In this case, the
  2128.            user might be grateful if the gateway fetches the
  2129.            body part and inserts it into the message. If the
  2130.            body part is large or dynamic, it might not be
  2131.            appropriate.
  2132.  
  2133.      (2)   The user has Internet access, but no UA support for
  2134.            fetching external-body objects.
  2135.  
  2136.      (3)   The user has Internet access and UA support for
  2137.            fetching external-body objects, based on an
  2138.            understanding of this document.
  2139.  
  2140.  
  2141.     Some access-types, like anonymous FTP, are easy to
  2142.     resolve. Others, like the Mailserver access-type, are
  2143.     almost impossible to resolve at a gateway.
  2144.  
  2145.  
  2146.  
  2147.  
  2148.  
  2149.  
  2150. Alvestrand                Exp Nov 96                 [Page 39]
  2151.  
  2152. draft               X.400/MIME body mapping             May 96
  2153.  
  2154.  
  2155.     To support the second case above, the tunneling method
  2156.     chosen is the HARPOON encapsulation described in section
  2157.     3.1.3, using an IA5 body part, inserting the string "MIME-
  2158.     Version: 1.0 (generated by gateway)" at the beginning of
  2159.     the body part. (The part in parentheses can be changed at
  2160.     will).
  2161.  
  2162.     This will:
  2163.  
  2164.  
  2165.      (1)   Maximize the chance that the user will see the
  2166.            message
  2167.  
  2168.      (2)   Give the user hints that will enable him to fetch
  2169.            the message using other Internet tools
  2170.  
  2171.      (3)   Identify the message as a MIME object in a reliable
  2172.            fashion, allowing UAs to support the fetching of
  2173.            the object if the UA implementor desires.
  2174.  
  2175.  
  2176.     7.2.  message/partial
  2177.  
  2178.     This represents part of a larger message, where it is only
  2179.     possible to parse the complete message after getting all
  2180.     the pieces.
  2181.  
  2182.     The gateway MUST support the encapsulation of this body
  2183.     part.
  2184.  
  2185.     It MAY implement transparent reassembly of the message,
  2186.     but in this case, it MUST support a configurable timeout
  2187.     for the reassembly, defaulting back to encapsulation.
  2188.  
  2189.     DISCUSSION:
  2190.  
  2191.     The gateway's choices are:
  2192.  
  2193.  
  2194.      (1)   Wait until all the pieces arrive at the gateway,
  2195.            reassemble the message, and use normal processing
  2196.  
  2197.      (2)   Encapsulate the message, using any encapsulation
  2198.            method (BP15, FTAM or HARPOON).
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205. Alvestrand                Exp Nov 96                 [Page 40]
  2206.  
  2207. draft               X.400/MIME body mapping             May 96
  2208.  
  2209.  
  2210.     In some cases, not all pieces will arrive at the gateway;
  2211.     some may have been transferred through other gateways due
  2212.     to route changes or machine outages; some may have been
  2213.     lost in transit.
  2214.  
  2215.  
  2216.     7.3.  multipart/signed
  2217.  
  2218.     A gateway MUST implement encapsulation of multipart/signed
  2219.     using HARPOON.
  2220.  
  2221.     The gateway MAY be configured to do other processing, as
  2222.     outlined in the discussion below. This is outside the
  2223.     scope of the standard.
  2224.  
  2225.     DISCUSSION:
  2226.  
  2227.     Gatewaying security is a problem.  The gateway can
  2228.     basically take three approaches:
  2229.  
  2230.  
  2231.     -    Strip the multipart/signed, leaving the bare body
  2232.          part unsecured, possibly with a comment that the
  2233.          signature was stripped
  2234.  
  2235.     -    Attempt to check the signature and re-signing the
  2236.          message using X.400 security functions, then
  2237.          stripping as above
  2238.  
  2239.     -    Encapsulate the message. This is the only approach
  2240.          that allows end to end security, but requires MIME
  2241.          functionality at the recipient.
  2242.  
  2243.     -    Replace the message content with multiple body parts,
  2244.          containing first an unsecured body part and then the
  2245.          encapsulated multipart/signed.
  2246.  
  2247.  
  2248.     All these are valid options for a MIXER gateway.
  2249.  
  2250.     Note that the encapsulation must use HARPOON, as the
  2251.     signature is computed on the ENCODED body part, not on the
  2252.     canonical representation, and HARPOON is the only
  2253.     encapsulation that preserves the content transfer encoding
  2254.     of the message.
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260. Alvestrand                Exp Nov 96                 [Page 41]
  2261.  
  2262. draft               X.400/MIME body mapping             May 96
  2263.  
  2264.  
  2265.     Note also that all methods except for encapsulation break
  2266.     end-to-end security; the recipient can place no more trust
  2267.     in the integrity of the message than he can place in the
  2268.     security of the gateway.
  2269.  
  2270.  
  2271.     7.4.  multipart/encrypted
  2272.  
  2273.     A gateway MUST implement encapsulation of
  2274.     multipart/encrypted using HARPOON.
  2275.  
  2276.     If the implementor chooses to allow other processing at
  2277.     the gateway, as outlined below, he/she is advised that
  2278.     there are grave security concerns with such a solution,
  2279.     since it violates the general rule of keeping decryption
  2280.     keys as close to the user as possible.
  2281.  
  2282.  
  2283.     DISCUSSION:
  2284.  
  2285.     There are two basic cases for a gateway:
  2286.  
  2287.  
  2288.     -    The gateway is trusted with the user's keys. In this
  2289.          case, the gateway can decrypt the message, possibly
  2290.          add a note that it has done so, and gateway the
  2291.          unencrypted form, possibly applying X.400 security
  2292.          functions, and possibly attaching a copy of the
  2293.          original, encrypted material for reference.
  2294.          This does nothing to protect the transfer from
  2295.          gateway to recipient, unless suitable X.400-native
  2296.          security is applied. It also means that the gateway
  2297.          must be part of the user's trusted environment.
  2298.  
  2299.     -    The gateway is not trusted with the recipient's keys.
  2300.          In this case, encapsulation is the only approach that
  2301.          preserves any information at all.
  2302.  
  2303.  
  2304.     The valid options for a MIXER gateway are therefore:
  2305.  
  2306.     -    Decrypt the body part
  2307.  
  2308.     -    Encapsulate the body part
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315. Alvestrand                Exp Nov 96                 [Page 42]
  2316.  
  2317. draft               X.400/MIME body mapping             May 96
  2318.  
  2319.  
  2320.     -    Drop the body part
  2321.  
  2322.  
  2323.     The MIXER WG has shown strong preference for the
  2324.     encapsulation alternative, and urges anyone who thinks of
  2325.     buying or implementing gateway decryption to carefully
  2326.     evaluate this choice in light of the company's general
  2327.     security policy.
  2328.  
  2329.  
  2330.  
  2331.     8.  Conformance requirements
  2332.  
  2333.     In order to be called MIXER conformant, a gateway must
  2334.     implement:
  2335.  
  2336.  
  2337.     -    Encapsulation of MIME content in the FTBP body part
  2338.  
  2339.     -    Encapsulation of X.400 body parts in the x400-bp body
  2340.          part
  2341.  
  2342.     -    Encapsulation of FTBP body parts in the
  2343.          application/x-ftbp.oid body part
  2344.  
  2345.     -    Encapsulation of security multiparts using HARPOON
  2346.  
  2347.     -    Text/plain <-> IA5Text
  2348.  
  2349.     -    Text/plain; charset=3Diso-8859-* <-> GeneralText
  2350.  
  2351.     -    Multipart/* <-> ForwardedIPMessage
  2352.  
  2353.     -    message/RFC822 <-> ForwardedIPMessage
  2354.  
  2355.     -    application/octet-stream <-> FTBP unknown
  2356.  
  2357.     -    application/octet-stream <-> BilaterallyDefined
  2358.  
  2359.     -    A configuration choice of which application/octet-
  2360.          stream translation to use
  2361.  
  2362.  
  2363.     All other parts of this specification MAY be implemented
  2364.     by the gateway. If they are implemented at all, they MUST
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370. Alvestrand                Exp Nov 96                 [Page 43]
  2371.  
  2372. draft               X.400/MIME body mapping             May 96
  2373.  
  2374.  
  2375.     be implemented conformant to this specification.
  2376.  
  2377.     In this context, a feature is "implemented" in a product
  2378.     if it is possible to configure the product in such a way
  2379.     that this feature is used. This specification does not
  2380.     restrict the product to only be configured in such a
  2381.     fashion.
  2382.  
  2383.  
  2384.     9.  Security considerations
  2385.  
  2386.     The security issues identified in this memo are:
  2387.  
  2388.      (1)   Security implications of using filenames that
  2389.            arrive in body part headers (section 2.3.2)
  2390.  
  2391.      (2)   Security implications of letting a gateway handle
  2392.            encrypted and/or signed content (section 7.3 and
  2393.            7.4)
  2394.  
  2395.     If a gateway fetches message/external-body on behalf of
  2396.     the recipient, as described in section 7.1, it may be
  2397.     tricked into performing inappropriate actions by malicious
  2398.     senders.
  2399.  
  2400.     In addition, all the normal caveats that apply to sending
  2401.     data that may contain executable code apply to UAs on both
  2402.     sides of the gateway.
  2403.  
  2404.  
  2405.  
  2406.     10.  Author's address
  2407.  
  2408.     Harald Tveit Alvestrand
  2409.     UNINETT
  2410.     P.O.box 6883 Elgeseter
  2411.     N-7002 Trondheim
  2412.     NORWAY
  2413.  
  2414.     Harald.T.Alvestrand@uninett.no
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425. Alvestrand                Exp Nov 96                 [Page 44]
  2426.  
  2427. draft               X.400/MIME body mapping             May 96
  2428.  
  2429.  
  2430.     11.  Acknowledgements
  2431.  
  2432.     The author wishes to thank all the members of the MIXER WG
  2433.     for their valuable input, and in particular (in no
  2434.     particular order):
  2435.  
  2436.     Steve Kille, Peter Sylvester, Ned Freed, Julian Onions,
  2437.     Ruth Moulton, Keith Moore, Alain Zahm, Urs Eppenberger,
  2438.     Kevin Jordan, Jeroen Houttuin, Claudio Allocchio, Colin
  2439.     Robbins, Steven Thomson, Jim Craigie, Efifiom Edem, David
  2440.     Wilson,
  2441.  
  2442.     and many others who have been active over the long
  2443.     lifetime of this document.
  2444.  
  2445.  
  2446.     References
  2447.  
  2448.     [RFC-822]
  2449.          D.H. Crocker, Standard for the Format of ARPA
  2450.          Internet Text Messages.  Request for Comments 822,
  2451.          (August, 1982).
  2452.  
  2453.     [MIME]
  2454.          N. Freed, N. Borenstein, "Multipurpose Internet Mail
  2455.          Extensions (MIME) Part Two:  Media Types",
  2456.          12/02/1996. RFC 2046
  2457.  
  2458.     [MIME-HDR]
  2459.          K. Moore, "MIME (Multipurpose Internet Mail
  2460.          Extensions) Part Three: Message Header Extensions for
  2461.          Non-ASCII Text", 12/02/1996. RFC 2047
  2462.  
  2463.     [HARPOON]
  2464.          H. Alvestrand, J. Romaguera, K. Jordan, "Rules for
  2465.          downgrading messages from X.400/88 to X.400/84 when
  2466.          MIME content-types are present in the messages",
  2467.          08/26/1993. RFC 1496
  2468.  
  2469.     [MIMETRANS]
  2470.          G. Vaudreuil, "Transition of Internet Mail from Just-
  2471.          Send-8 to 8Bit-SMTP/MIME", 02/10/1993. RFC 1428
  2472.  
  2473.     [MIXER]
  2474.          S.E. Kille, Mapping between X.400(1988) / ISO 10021
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480. Alvestrand                Exp Nov 96                 [Page 45]
  2481.  
  2482. draft               X.400/MIME body mapping             May 96
  2483.  
  2484.  
  2485.          and RFC-822. (in preparation)
  2486.  
  2487.     [T.4]
  2488.          CCITT Recommendation T.4, Standardization of Group 3
  2489.          Facsimile Apparatus for Document Transmission (1988)
  2490.  
  2491.     [T.30]
  2492.          CCITT Recommendation T.30, Procedures For Document
  2493.          Facsimile Transmission in the General Switched
  2494.          Telephone Network (1988)
  2495.  
  2496.     [T.411]
  2497.          CCITT Recommendation T.411 (1988), Open Document
  2498.          Architecture (ODA) and Interchange Format,
  2499.          Introduction and General Principles
  2500.  
  2501.     [MOTIS]
  2502.          ISO/IEC International Standard 10021, Information
  2503.          technology - Text Communication - Message-Oriented
  2504.          Text Interchange Systems (MOTIS) (Parts 1 to 8)
  2505.  
  2506.     [X.400]
  2507.          CCITT, Data Communication Networks - Message Handling
  2508.          Systems - Recommendations X.400 - X.420 (1988
  2509.          version)
  2510.  
  2511.     [X.420]
  2512.          CCITT Recommendation X.420 (1988), Interpersonal
  2513.          Messaging System
  2514.  
  2515.     [RFC-X400USE]
  2516.          Harald Tveit Alvestrand, X.400 use of extended
  2517.          Character Sets, RFC 1502
  2518.  
  2519.     [MAWG]
  2520.          Electronic Messaging Association Message Attachment
  2521.          Working Group (MAWG): File Transfer Body Part
  2522.          Feasibility Project Guide - version 1.5 - September
  2523.          1995
  2524.  
  2525.     [CDISP]
  2526.          Dorner, Troost, Moore: The Content-Disposition header
  2527.          - work in progress (draft-moore-mime-cdisp-00.txt)
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535. Alvestrand                Exp Nov 96                 [Page 46]
  2536.  
  2537. draft               X.400/MIME body mapping             May 96
  2538.  
  2539.  
  2540.     [POSTSCRIPT]
  2541.          Harald Tveit Alvestrand, Carrying PostScript in X.400
  2542.          and MIME, Work In Progress (draft-ietf-mixer-
  2543.          postscript-00.txt)
  2544.  
  2545.     [IMAGES]
  2546.          Harald Tveit Alvestrand, X.400 image body parts, Work
  2547.          In Progress (draft-ietf-mixer-images-00.txt)
  2548.  
  2549.     [ODA]
  2550.          Harald Tveit Alvestrand, A MIME body part for ODA,
  2551.          Work in Progress (draft-ietf-mixer-oda-00.txt)
  2552.  
  2553.     [ISO 2022]
  2554.          ISO/IEC 2022:1994(E): Information technology -
  2555.          Character code structure and extension techniques
  2556.  
  2557.     [ISO 8859]
  2558.          ISO 8859: Information processing -- 8-bit single-byte
  2559.          coded graphic character sets (various parts)
  2560.  
  2561.     [2022-JP]
  2562.          J. Murai, M. Crispin, E. van der Poel, "Japanese
  2563.          Character Encoding for Internet Messages",
  2564.          06/04/1993. RFC 1468
  2565.  
  2566.     [MUST]
  2567.          S. Bradner, "Key words for use in RFCs to Indicate
  2568.          Requirement Levels", 03/26/1997, RFC 2119
  2569.  
  2570.  
  2571.  
  2572.     APPENDIXES
  2573.  
  2574.  
  2575.     Appendix A: Escape code normalization
  2576.  
  2577.     The algorithm given here in pseudocode will reduce a
  2578.     GeneralString ISO-2022 unlimited use of shifts sequence to
  2579.     a pure 8-bit sequence that does not use shift sequences,
  2580.     if possible.
  2581.  
  2582.     Some error conditions, like EOF, are not tested for. It
  2583.     crashes if asked to do something it cannot.  Control
  2584.     character set switching is missing.
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590. Alvestrand                Exp Nov 96                 [Page 47]
  2591.  
  2592. draft               X.400/MIME body mapping             May 96
  2593.  
  2594.  
  2595.     A similar routine, albeit more complex, can be written for
  2596.     normalizing to the ISO-2022-JP character set.
  2597.  
  2598.     BEGIN: (from X.209)
  2599.       g0 =3D 6 (should be 2, but ignore the difference)
  2600.       g1 =3D NULL
  2601.       g2 =3D NULL
  2602.       g3 =3D NULL
  2603.       c0 =3D 1 (ASCII control)
  2604.       c1 =3D NULL
  2605.       leftset =3D &g0 (current input set, low)
  2606.       rightset =3D &g1 (current input set, high)
  2607.       lowset =3D 6 (output set, low)
  2608.       highset =3D NULL (output set, high)
  2609.       charset =3D US-ASCII
  2610.  
  2611.       (Init for the set tables)
  2612.       chartoid[{2D,2E,2F}, 41] =3D 100
  2613.       .....
  2614.       idtoname[100] =3D "ISO-8859-1"
  2615.       .....
  2616.  
  2617.     WHILE (more data)
  2618.       CASE head of input
  2619.         {These are the locking shift sequences}
  2620.         INCASE "00/14": (LS0, SO)
  2621.             leftset =3D &g0;
  2622.         INCASE "00/15": (LS1, SI)
  2623.             leftset =3D &g
  2624.         INCASE "ESC 07/14": (LS1R)
  2625.             rightset =3D &g1;
  2626.         INCASE "ESC 07/13": (LS2R)
  2627.             rightset =3D &g2;
  2628.         INCASE "ESC 07/12": (LS3R)
  2629.             rightset =3D &g3;
  2630.         {There is missing code for handling the single shift function}
  2631.         {These are the changes of graphic character sets}
  2632.         {Note that G0 can contain only 94-character charsets}
  2633.         INCASE "ESC 28"
  2634.             g0 =3D chartoid[lastchar, next character]
  2635.             sethiset(g0)
  2636.         INCASE "ESC 2D", "ESC 29"
  2637.             g1 =3D chartoid[lastchar, next character]
  2638.             sethiset(g1)
  2639.         INCASE "ESC 2E", "ESC 2A"
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645. Alvestrand                Exp Nov 96                 [Page 48]
  2646.  
  2647. draft               X.400/MIME body mapping             May 96
  2648.  
  2649.  
  2650.             g2 =3D chartoid[lastchar, next character]
  2651.             sethiset(g2)
  2652.         INCASE "ESC 2F", "ESC 2B"
  2653.             g3 =3D chartoid[lastchar, next character]
  2654.             sethiset(g3)
  2655.         {control characters. There is missing code for changing these}
  2656.         INCASE 00/00-01/15 {normal control}
  2657.             write(char)
  2658.         INCASE 08/00-09/15 {upper control}
  2659.             write(char)
  2660.         {Normal characters}
  2661.         INCASE 02/00-07/15 (Left)
  2662.             IF (*leftset =3D=3D lowset)
  2663.                 write(char)
  2664.             ELSIF (*leftset =3D=3D highset)
  2665.                 write(char+80)
  2666.             ELSE
  2667.                 ERROR "Shift error"
  2668.             ENDIF
  2669.         INCASE 10/00-15/15
  2670.             IF (*rightset =3D=3D highset)
  2671.                 write(char)
  2672.             ELSIF (*rightset =3D=3D lowset)
  2673.                 write(char-80)
  2674.             ELSE
  2675.                 ERROR "Shift error"
  2676.             ENDIF
  2677.       ENDCASE
  2678.     ENDWHILE
  2679.  
  2680.     SUBROUTINE sethighset(g1)
  2681.  
  2682.             IF (highset =3D=3D NULL)
  2683.                 charset =3D idtoname[g1]
  2684.                 highset =3D g1
  2685.             ELSIF (highset =3D=3D g1)
  2686.                 (it's OK)
  2687.             ELSE
  2688.                 ERROR "Too many charsets encountered"
  2689.             ENDIF
  2690.  
  2691.     ENDROUTINE
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700. Alvestrand                Exp Nov 96                 [Page 49]
  2701.  
  2702. draft               X.400/MIME body mapping             May 96
  2703.  
  2704.  
  2705.     Appendix B: OID Assignments
  2706.     MIXER-MAPPINGS DEFINITIONS ::=3D BEGIN
  2707.     EXPORTS -- everything --;
  2708.  
  2709.     IMPORTS
  2710.  
  2711.        mixer -- { iso(1) org(3) dod(6) internet(1) mail(7) mixer(1) }
  2712.            FROM MIXER --Companion RFC--;
  2713.  
  2714.     mixer-headings OBJECT IDENTIFIER ::=3D
  2715.             { mixer 1 } -- called mime-mhs-headings in RFC 1495 --
  2716.  
  2717.     mixer-bodies OBJECT IDENTIFIER ::=3D
  2718.             { mixer 2 } -- called mime-mhs-bodies in RFC 1495 --
  2719.  
  2720.     -- mixer-core is defined as { mixer core(3) } in [MIXER]
  2721.  
  2722.     mixer-bp-data OBJECT IDENTIFIER ::=3D
  2723.             { mixer-bodies 1 }; -- called mime-mhs-bp-data in RFC 1494 --
  2724.  
  2725.     mixer-bp-parameter OBJECT IDENTIFIER ::=3D
  2726.             { mixer-bodies 2 };
  2727.  
  2728.     id-mime-bp-data OBJECT IDENTIFIER ::=3D
  2729.             { mixer-bp-data 1 };
  2730.     -- for debugging: mixer-bp-data is 1.3.6.1.7.1.2.1.1
  2731.  
  2732.     id-mime-bp-parameters OBJECT IDENTIFIER ::=3D
  2733.             { mixer-bp-parameter 1 };
  2734.  
  2735.     -- the following assignments were done in RFC 1494, using
  2736.     -- slightly different names, but the same numbers.
  2737.     -- their defining text is now is now in other documents
  2738.     id-mime-postscript-body OBJECT IDENTIFIER ::=3D
  2739.                    { mixer-bp-data 2 }
  2740.  
  2741.     id-mime-jpeg-body OBJECT IDENTIFIER ::=3D
  2742.                    { mixer-bp-data 3 }
  2743.  
  2744.     id-mime-gif-body OBJECT IDENTIFIER ::=3D
  2745.                    { mixer-bp-data 4 }
  2746.  
  2747.     -- This is a new definition, and defines an FTAM application reference=
  2748. ,
  2749.     -- not a BP15 data OID.
  2750.     id-mime-ftbp-data OBJECT IDENTIFIER ::=3D
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756. Alvestrand                Exp Nov 96                 [Page 50]
  2757.  
  2758. draft               X.400/MIME body mapping             May 96
  2759.  
  2760.  
  2761.                    { mixer-bp-data 5 }
  2762.  
  2763.     -- The following heading extensions are defined
  2764.     id-hex-partial-message OBJECT IDENTIFIER ::=3D
  2765.                { mixer-headings 1 }
  2766.  
  2767.     id-hex-multipart-message OBJECT IDENTIFIER ::=3D
  2768.                { mixer-headings 2 } -- from RFC 1495; obsolete
  2769.  
  2770.     id-hex-multipart-message-v2 OBJECT IDENTIFIER ::=3D
  2771.             { mixer-headings 3 }
  2772.  
  2773.     END
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.  
  2789.  
  2790.  
  2791.  
  2792.  
  2793.  
  2794.  
  2795.  
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806.  
  2807.  
  2808.  
  2809.  
  2810.  
  2811. Alvestrand                Exp Nov 96                 [Page 51]
  2812.  
  2813. draft               X.400/MIME body mapping             May 96
  2814.  
  2815.  
  2816.     Appendix C: Registration information for the Teletex
  2817.     character set
  2818.  
  2819.     The Teletex character set is a character set in which the
  2820.     ISO 2022 character set switching mechanism may be used to
  2821.     switch between the following registered ISO character
  2822.     sets:
  2823.  
  2824.     ISO-IR-87 - JIS_C6226-1983; a 16-bit Japanese character set
  2825.     ISO-IR-102 - a fairly standard US-ASCII variant
  2826.     ISO-IR-103 - Latin characters using non-spacing accents
  2827.     ISO-IR-106 - Control characters for C0 use; CR, LF, FF and a few more.
  2828.     ISO-IR-107 - Control characters for C1 use
  2829.  
  2830.     Its intended use of this character set is to represent
  2831.     data that comes from ISO protocols that use the ASN.1
  2832.     construct "TeletexString" or "T61string" without
  2833.     conversion.
  2834.  
  2835.     The set of allowed character sets can be found in CCITT
  2836.     recommendation X.208(1988), chapter 31.2 and Table
  2837.     6/X.208.
  2838.  
  2839.     The rules for encoding the data type can be found in CCITT
  2840.     recommendation X.209(1988), chapter 23. It states that at
  2841.     the beginning of the string, G0 is always ISO-IR-102, C0
  2842.     is ISO-IR-106, and C1 is ISO-IR-107.
  2843.  
  2844.     The specification seems somehow to have missed the
  2845.     implicit assumption that ISO-IR-103 is designated and
  2846.     invoked as G1 and shifted into the upper half of the
  2847.     character set which seems to be assumed at least by the
  2848.     X.400 and X.500 software that uses TeletexStrings;
  2849.     implementors should act as if the sequence ESC 2/9 7/6
  2850.     LS1R is always present at the beginning of the data;
  2851.     however, when generating Teletex strings, implementors
  2852.     should include the sequence ESC 2/9 7/6 within the string
  2853.     before the first occurence of a character from ISO-IR-103.
  2854.  
  2855.     The rules for interpreting T.61 data are found (I believe)
  2856.     in CCITT recommendations T.51, T.52 and T.53 (data from
  2857.     the ITU WWW server):
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.  
  2866. Alvestrand                Exp Nov 96                 [Page 52]
  2867.  
  2868. draft               X.400/MIME body mapping             May 96
  2869.  
  2870.  
  2871.         T.51 (09/92) [Rev.1] [26 pp.] [Publ.: May.93]
  2872.            Latin based coded character sets for telematic services
  2873.         T.52 (1993) [New] [88 pp.] [Publ.: Apr.94]
  2874.            Non-Latin coded character sets for telematic services
  2875.         T.53 (04/94) [New] [68 pp.] [Publ.: Jan.95]
  2876.            Character coded control functions for telematic services
  2877.  
  2878.  
  2879.  
  2880.     The Teletex character set is closely related to (but not
  2881.     identical with) that specified in ISO 6937.
  2882.  
  2883.     No further restrictions are imposed by this registration;
  2884.     in particular, character set switching can occur anywhere,
  2885.     and there is no guarantee that the character sets will be
  2886.     switched "back" at the end.
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914.  
  2915.  
  2916.  
  2917.  
  2918.  
  2919.  
  2920.  
  2921. Alvestrand                Exp Nov 96                 [Page 53]
  2922.  
  2923. draft               X.400/MIME body mapping             May 96
  2924.  
  2925.  
  2926.  
  2927.     Appendix D: IANA Registration form for new mappings
  2928.  
  2929.     To: IANA@isi.edu
  2930.     Subject: Registration of new X.400/MIME content type mapping
  2931.  
  2932.     MIME type name:
  2933.  
  2934.     (this must have been registered previously with IANA)
  2935.  
  2936.     X.400 body part:
  2937.  
  2938.     IF BP15:
  2939.  
  2940.     - X.400 Object Identifier for Data:
  2941.  
  2942.     (If left empty, an OID will be assigned by IANA  under
  2943.     mixer-bp-data)
  2944.  
  2945.     - X.400 Object Identifier for Parameters:
  2946.  
  2947.     (If  left empty, an OID will be assigned by IANA under
  2948.     mixer-bp-parameter.  If it is not used,  fill  in  the
  2949.     words NOT USED.)
  2950.  
  2951.     X.400 ASN.1 Syntax:
  2952.  
  2953.     (must  be  an EXTENDED-BODY-PART-TYPE macro, or refer=AD
  2954.     ence to a Basic body part type)
  2955.  
  2956.     IF FTBP:
  2957.  
  2958.     - FTAM Object Identifier for application-reference:
  2959.  
  2960.     - FTAM Object Identifier for contents-type:
  2961.  
  2962.     (if left empty, unstructured-binary is assumed)
  2963.  
  2964.     Conversion algorithm:
  2965.  
  2966.     (must be defined completely enough for independent im=AD
  2967.     plementation. It may be defined by reference to RFCs).
  2968.  
  2969.     Person & email address to contact for further informa=AD
  2970.     tion:
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976. Alvestrand                Exp Nov 96                 [Page 54]
  2977.  
  2978. draft               X.400/MIME body mapping             May 96
  2979.  
  2980.  
  2981.     INFORMATION TO THE SUBMITTER:
  2982.  
  2983.     The  accepted registrations will be listed in the "As=AD
  2984.     signed Numbers" series of RFCs.   The  information  in
  2985.     the registration form is freely distributable.
  2986.  
  2987.  
  2988.  
  2989.     Table of Contents
  2990.  
  2991.  
  2992.      Status of this Memo ................................    1
  2993.     1 Introduction ......................................    2
  2994.     1.1 Glossary ........................................    2
  2995.     2 Basic rules for body part conversion ..............    3
  2996.     2.1 Generating the IPM Body from MIME ...............    5
  2997.     2.2 Generating the MIME Body from the IPMS.Body .....    5
  2998.     2.3 Mapping the EMA FTBP parameters .................    7
  2999.     2.3.1 Mapping GraphicStrings ........................    7
  3000.     2.3.2 Mapping specific parameters ...................    8
  3001.     2.3.3 Summary of FTBP elements generated ............   11
  3002.     2.4 Information that is lost when mapping ...........   12
  3003.     3 Encapsulation of body parts .......................   12
  3004.     3.1 Encapsulation of MIME in X.400 ..................   13
  3005.     3.1.1 FTBP encapsulating body part ..................   14
  3006.     3.1.2 BP15 encapsulating body part ..................   14
  3007.     3.1.3 Encapsulation using IA5 (HARPOON) .............   17
  3008.     3.1.4 Content passing using BP14 ....................   18
  3009.     3.2 Encapsulating X.400 Body Parts in MIME ..........   18
  3010.     3.3 Encapsulating FTBP body parts in MIME ...........   19
  3011.     4 User control over the gateway choice ..............   20
  3012.     4.1 Conversion from MIME to X.400 ...................   21
  3013.     4.2 Conversion from X.400 to MIME ...................   23
  3014.     5 The equivalence registry ..........................   24
  3015.     5.1 What information one must give about a mapping
  3016.          ................................................   24
  3017.     5.2 Equivalence summary for known X.400  and  MIME
  3018.          Types ..........................................   25
  3019.     5.3 MIME to X.400 Table .............................   26
  3020.     5.4 X.400 to MIME Table .............................   27
  3021.     5.5 Use of OBJECT IDENTIFIERs and ASN.1 MACROS ......   28
  3022.     6 Defined Equivalences ..............................   30
  3023.     6.1 IA5Text - text/plain ............................   30
  3024.     6.2 GeneralText - text/plain (ISO-8859) .............   31
  3025.     6.3  BilaterallyDefined - application/octet-stream
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031. Alvestrand                Exp Nov 96                 [Page 55]
  3032.  
  3033. draft               X.400/MIME body mapping             May 96
  3034.  
  3035.  
  3036.          ................................................   33
  3037.     6.4  FTBP  EMA  Unknown  Attachment   -   applica=AD
  3038.          tion/octet-stream ..............................   34
  3039.     6.5 MessageBodyPart - message/RFC822 ................   35
  3040.     6.6 MessageBodyPart - multipart/* ...................   35
  3041.     6.7 Teletex - Text/Plain (Teletex) ..................   37
  3042.     7 Body parts where encapsulation is recommended .....   39
  3043.     7.1 message/external-body ...........................   39
  3044.     7.2 message/partial .................................   40
  3045.     7.3 multipart/signed ................................   41
  3046.     7.4 multipart/encrypted .............................   42
  3047.     8 Conformance requirements ..........................   43
  3048.     9 Security considerations ...........................   44
  3049.     10 Author's address .................................   44
  3050.     11 Acknowledgements .................................   45
  3051.      References .........................................   45
  3052.      APPENDIXES .........................................   47
  3053.      Appendix A: Escape code normalization ..............   47
  3054.      Appendix B: OID Assignments ........................   50
  3055.      Appendix  C:  Registration  information  for  the
  3056.          Teletex character set ..........................   52
  3057.      Appendix  D:  IANA Registration form for new map=AD
  3058.          pings ..........................................   54
  3059.      Table of Contents ..................................   55
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086. Alvestrand                Exp Nov 96                 [Page 56]
  3087.  
  3088.  
  3089.