3. Conversion rules
3.1. EBP conversions to Basic
Some body parts are defined by X.400(88) as having both a Basic form and an Extended form. These are listed in Annex B of X.420.
For all of these, the transformation from the Extended Body Part to the Basic Body Part takes the form of putting the PARAMETERS and the DATA members together in a SEQUENCE.
This transformation should be applied by the gateway in order to allow (for example) X.400(88) systems that use the Extended form of the IA5 body part to communicate with X.400(84) systems.
3.2. Encapsulation format
For any body part that cannot be used directly in X.400(84), the following IA5Text body part is made:
-
Content = IA5String
-
First bytes of content: (the description is in USASCII, with C escape sequences used to represent control characters):
MIME-version: <version>\r\n
Content-type: <the proper MIME content type>\r\n
Content-transfer-encoding: <quoted-printable or base64>\r\n
<Possibly other Content headings here, terminated by\r\n>
\r\n
<Here follows the bytes of the content, as per [4], encoded in the
proper encoding>
All implementations MUST place the MIME-version: header first in the body part. Headers that are placed by [2] and [4] into other parts of the message MUST NOT be placed in the MIME body part.
This includes RFC-822 headings carried as heading-extensions, which must be placed in a new IA5 body part starting with the string "RFC-822-HEADERS", as specified in [2], Appendix G.
Other heading-extensions are still handled as described in chapter 5 of RFC 1328: They are dropped.
Since all X.400(88) body parts can be represented in MIME by using the x400-bp MIME content-type, this conversion will never fail.
In the reverse direction, any IA5 body part that starts with the token "MIME-Version:" will be subjected to conversion according to [4] before including the body part into an X.400(88) message.