Tech-invite3GPPspaceIETFspace
96959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 1327

Mapping between X.400(1988) / ISO 10021 and RFC 822

Pages: 113
Obsoletes:  0987102611381148
Obsoleted by:  2156
Updates:  0822
Updated by:  1495
Part 2 of 4 – Pages 24 to 59
First   Prev   Next

ToP   noToC   RFC1327 - Page 24   prevText
Chapter 3 Basic Mappings

3.1.  Notation

   The X.400 protocols are encoded in a structured manner according to
   ASN.1, whereas RFC 822 is text encoded.  To define a detailed
   mapping, it is necessary to refer to detailed protocol elements in
   each format.  A notation to achieve this is described in this
   section.

3.1.1.  RFC 822

   Structured text is defined according to the Extended Backus Naur Form
   (EBNF) defined in Section 2 of RFC 822 [Crocker82a].  In the EBNF
   definitions used in this specification, the syntax rules given in
   Appendix D of RFC 822 are assumed.  When these EBNF tokens are
   referred to outside an EBNF definition, they are identified by the
   string "822." appended to the beginning of the string (e.g.,
   822.addr-spec).  Additional syntax rules, to be used throughout this
   specification, are defined in this chapter.

   The EBNF is used in two ways.

   1.   To describe components of RFC 822 messages (or of 822-MTS
        components).  In this case, the lexical analysis defined in
        Section 3 of RFC 822 shall be used.  When these new EBNF
        tokens are referred to outside an EBNF definition, they are
        identified by the string "EBNF." appended to the beginning
        of the string (e.g., EBNF.importance).

   2.   To describe the structure of IA5 or ASCII information not in
        an RFC 822 message.  In these cases, tokens will either be
        self delimiting, or be delimited by self delimiting tokens.
        Comments and LWSP are not used as delimiters, except for the
        following cases, where LWSP may be inserted according to RFC
        822 rules.
ToP   noToC   RFC1327 - Page 25
   -         Around the ":" in all headers

   -         EBNF.labelled-integer

   -         EBNF.object-identifier

   -         EBNF.encoded-info

   RFC 822 folding rules are applied to all headers.

3.1.2.  ASN.1

   An element is referred to with the following syntax, defined in EBNF:

        element         = service "." definition *( "." definition )
        service         = "IPMS" / "MTS" / "MTA"
        definition      = identifier / context
        identifier      = ALPHA *< ALPHA or DIGIT or "-" >
        context         = "[" 1*DIGIT "]"

   The EBNF.service keys are shorthand for the following service
   specifications:

      IPMS IPMSInformationObjects defined in Annex E of X.420 / ISO
           10021-7.

      MTS  MTSAbstractService defined in Section 9 of X.411 / ISO
           10021-4.

      MTA  MTAAbstractService defined in Section 13 of X.411 / ISO
           10021-4.

   The first EBNF.identifier identifies a type or value key in the
   context of the defined service specification.   Subsequent
   EBNF.identifiers identify a value label or type in the context of the
   first identifier (SET or SEQUENCE).  EBNF.context indicates a context
   tag, and is used where there is no label or type to uniquely identify
   a component.  The special EBNF.identifier keyword "value" is used to
   denote an element of a sequence.

   For example, IPMS.Heading.subject defines the subject element of the
   IPMS heading.  The same syntax is also used to refer to element
   values.  For example,

   MTS.EncodedInformationTypes.[0].g3Fax refers to a value of
   MTS.EncodedInformationTypes.[0] .
ToP   noToC   RFC1327 - Page 26
3.2.  ASCII and IA5

   A gateway will interpret all IA5 as ASCII.  Thus, mapping between
   these forms is conceptual.

3.3.  Standard Types

   There is a need to convert between ASCII text, and some of the types
   defined in ASN.1 [CCITT/ISO88d].  For each case, an EBNF syntax
   definition is given, for use in all of this specification, which
   leads to a mapping between ASN.1, and an EBNF construct.  All EBNF
   syntax definitions of ASN.1 types are in lower case, whereas ASN.1
   types are referred to with the first letter in upper case.  Except as
   noted, all mappings are symmetrical.

3.3.1.  Boolean

   Boolean is encoded as:

           boolean = "TRUE" / "FALSE"

3.3.2.  NumericString

   NumericString is encoded as:

           numericstring = *DIGIT

3.3.3.  PrintableString

   PrintableString is a restricted IA5String defined as:

           printablestring  = *( ps-char )
           ps-restricted-char      = 1DIGIT /  1ALPHA / " " / "'" / "+"
                              / "," / "-" / "." / "/" / ":" / "=" / "?"
           ps-delim         = "(" / ")"
           ps-char          = ps-delim / ps-restricted-char

   This can be used to represent real printable strings in EBNF.

3.3.4.  T.61String

   In cases where T.61 strings are only used for conveying human
   interpreted information, the aim of a mapping is  to render the
   characters appropriately in the remote character set, rather than to
   maximise reversibility.  For these cases, the mappings to IA5 defined
   in CCITT Recommendation X.408 (1988) shall be used [CCITT/ISO88a].
   These will then be encoded in ASCII.
ToP   noToC   RFC1327 - Page 27
   There is also a need to represent Teletex Strings in ASCII, for some
   aspects of O/R Address.  For these, the following encoding is used:

           teletex-string   = *( ps-char / t61-encoded )
           t61-encoded      = "{" 1* t61-encoded-char "}"
           t61-encoded-char = 3DIGIT

   Common characters are mapped simply.  Other octets are mapped using a
   quoting mechanism similar to the printable string mechanism.  Each
   octet is represented as 3 decimal digits.

   There are a number of places where a string may have a Teletex and/or
   Printable String representation.  The following BNF is used to
   represent this.

      teletex-and-or-ps = [ printablestring ] [ "*" teletex-string ]

   The natural mapping is restricted to EBNF.ps-char, in order to make
   the full BNF easier to parse.

3.3.5.  UTCTime

   Both UTCTime and the RFC 822 822.date-time syntax contain:  Year
   (lowest two digits), Month, Day of Month, hour, minute, second
   (optional), and Timezone.  822.date-time also contains an optional
   day of the week, but this is redundant.  Therefore a symmetrical
   mapping can be made between these constructs.

   Note:
        In practice, a gateway will need to parse various illegal
        variants on 822.date-time.  In cases where 822.date-time
        cannot be parsed, it is recommended that the derived UTCTime
        is set to the value at the time of translation.

   When mapping to X.400, the UTCTime format which specifies the
   timezone offset shall be used.

   When mapping to RFC 822, the 822.date-time format shall include a
   numeric timezone offset (e.g., +0000).

   When mapping time values, the timezone shall be preserved as
   specified.  The date shall not be normalised to any other timezone.

3.3.6.  Integer

   A basic ASN.1 Integer will be mapped onto EBNF.numericstring.  In
   many cases ASN.1 will enumerate Integer values or use ENUMERATED.  An
   EBNF encoding labelled-integer is provided. When mapping from EBNF to
ToP   noToC   RFC1327 - Page 28
   ASN.1, only the integer value is mapped, and the associated text is
   discarded.  When mapping from ASN.1 to EBNF, addition of an
   appropriate text label is strongly encouraged.

        labelled-integer ::= [ key-string ] "(" numericstring ")"

        key-string      = *key-char
        key-char        = <a-z, A-Z, 0-9, and "-">


3.3.7.  Object Identifier

   Object identifiers are represented in a form similar to that given in
   ASN.1.  The order is the same as for ASN.1 (big-endian).  The numbers
   are mandatory, and used when mapping from the ASCII to ASN.1.  The
   key-strings are optional.  It is recommended that as many strings as
   possible are generated when mapping from ASN.1 to ASCII, to
   facilitate user recognition.

        object-identifier  ::= oid-comp object-identifier
                        | oid-comp

        oid-comp ::= [ key-string ] "(" numericstring ")"

An example representation of an object identifier is:

        joint-iso-ccitt(2) mhs (6) ipms (1) ep (11) ia5-text (0)

        or

        (2) (6) (1)(11)(0)

3.4.  Encoding ASCII in Printable String

   Some information in RFC 822 is represented in ASCII, and needs to be
   mapped into X.400 elements encoded as printable string.  For this
   reason, a mechanism to represent ASCII encoded as PrintableString is
   needed.

   A structured subset of EBNF.printablestring is now defined.  This
   shall be used to encode ASCII in the PrintableString character set.
ToP   noToC   RFC1327 - Page 29
        ps-encoded       = *( ps-restricted-char / ps-encoded-char )
        ps-encoded-char  = "(a)"               ; (@)
                         / "(p)"               ; (%)
                         / "(b)"               ; (!)
                         / "(q)"               ; (")
                         / "(u)"               ; (_)
                         / "(l)"               ; "("
                         / "(r)"               ; ")"
                         / "(" 3DIGIT ")"

   The 822.3DIGIT in EBNF.ps-encoded-char must have range 0-127, and is
   interpreted in decimal as the corresponding ASCII character.  Special
   encodings are given for: at sign (@), percent (%), exclamation
   mark/bang (!), double quote ("), underscore (_), left bracket ((),
   and right bracket ()).  These characters, with the exception of round
   brackets, are not included in PrintableString, but are common in RFC
   822 addresses.  The abbreviations will ease specification of RFC 822
   addresses from an X.400 system.  These special encodings shall be
   interpreted in a case insensitive manner, but always generated in
   lower case.

   A reversible mapping between PrintableString and ASCII can now be
   defined.  The reversibility means that some values of printable
   string (containing round braces) cannot be generated from ASCII.
   Therefore, this mapping must only be used in cases where the
   printable strings may only be derived from ASCII (and will therefore
   have a restricted domain).  For example, in this specification, it is
   only applied to a Domain Defined Attribute which will have been
   generated by use of this specification and a value such as "(" would
   not be possible.

   To encode ASCII as PrintableString, the EBNF.ps-encoded syntax is
   used, with all EBNF.ps-restricted-char mapped directly.  All other
   822.CHAR are encoded as EBNF.ps-encoded-char.

   To encode PrintableString as ASCII, parse PrintableString as
   EBNF.ps-encoded, and then reverse the previous mapping.  If the
   PrintableString cannot be parsed, then the mapping is being applied
   in to an inappropriate value, and an error shall be given to the
   procedure doing the mapping. In some cases, it may be preferable to
   pass the printable string through unaltered.
ToP   noToC   RFC1327 - Page 30
   Some examples are now given.  Note the arrows which indicate
   asymmetrical mappings:

                PrintableString           ASCII

                'a demo.'         <->   'a demo.'
                foo(a)bar         <->   foo@bar
                (q)(u)(p)(q)      <->   "_%"
                (a)               <->   @
                (A)               ->    @
                (l)a(r)           <->   (a)
                (126)             <->   ~
                (                 ->    (
                (l)               <->   (

Chapter 4 - Addressing

   Addressing is probably the trickiest problem of an X.400 <-> RFC 822
   gateway.  Therefore it is given a separate chapter.  This chapter, as
   a side effect, also defines a textual representation of an X.400 O/R
   Address.

   Initially we consider an address in the (human) mail user sense of
   "what is typed at the mailsystem to reference a mail user".  A basic
   RFC 822 address is defined by the EBNF EBNF.822-address:

           822-address     = [ route ] addr-spec

   In an 822-MTS protocol, the originator and each recipient are
   considered to be defined by such a construct.  In an RFC 822 header,
   the EBNF.822-address is encapsulated in the 822.address syntax rule,
   and there may also be associated comments.  None of this extra
   information has any semantics, other than to the end user.

   The basic X.400 O/R Address, used by the MTS for routing, is defined
   by MTS.ORAddress.  In IPMS, the MTS.ORAddress is encapsulated within
   IPMS.ORDescriptor.

   It can be seen that RFC 822 822.address must be mapped with
   IPMS.ORDescriptor, and that RFC 822 EBNF.822-address must be mapped
   with MTS.ORAddress.

4.1.  A textual representation of MTS.ORAddress

   MTS.ORAddress is structured as a set of attribute value pairs.  It is
   clearly necessary to be able to encode this in ASCII for gatewaying
   purposes.  All components shall be encoded, in order to guarantee
   return of error messages, and to optimise third party replies.
ToP   noToC   RFC1327 - Page 31
4.2.  Basic Representation

   An O/R Address has a number of structured and unstructured
   attributes.  For each unstructured attribute, a key and an encoding
   is specified.  For structured attributes, the X.400 attribute is
   mapped onto one or more attribute value pairs.  For domain defined
   attributes, each element of the sequence will be mapped onto a triple
   (key and two values), with each value having the same encoding.  The
   attributes are as follows, with 1984 attributes given in the first
   part of the table.  For each attribute, a reference is given,
   consisting of the relevant sections in X.402 / ISO 10021-2, and the
   extension identifier for 88 only attributes:

  Attribute (Component)                Key          Enc     Ref     Id

84/88 Attributes

MTS.CountryName                        C              P     18.3.3
MTS.AdministrationDomainName           ADMD           P     18.3.1
MTS.PrivateDomainName                  PRMD           P     18.3.21
MTS.NetworkAddress                     X121           N     18.3.7
MTS.TerminalIdentifier                 T-ID           P     18.3.23
MTS.OrganizationName                   O              P/T   18.3.9
MTS.OrganizationalUnitNames.value      OU             P/T   18.3.10
MTS.NumericUserIdentifier              UA-ID          N     18.3.8
MTS.PersonalName                       PN             P/T   18.3.12
MTS.PersonalName.surname               S              P/T   18.3.12
MTS.PersonalName.given-name            G              P/T   18.3.12
MTS.PersonalName.initials              I              P/T   18.3.12
MTS.PersonalName
   .generation-qualifier               GQ             P/T   18.3.12
MTS.DomainDefinedAttribute.value       DD             P/T   18.1

88 Attributes

MTS.CommonName                         CN             P/T   18.3.2    1
MTS.TeletexCommonName                  CN             P/T   18.3.2    2
MTS.TeletexOrganizationName            O              P/T   18.3.9    3
MTS.TeletexPersonalName                PN             P/T   18.3.12   4
MTS.TeletexPersonalName.surname        S              P/T   18.3.12   4
MTS.TeletexPersonalName.given-name     G              P/T   18.3.12   4
MTS.TeletexPersonalName.initials       I              P/T   18.3.12   4
MTS.TeletexPersonalName
    .generation-qualifier              GQ             P/T   18.3.12   4
MTS.TeletexOrganizationalUnitNames
   .value                              OU             P/T   18.3.10   5
MTS.TeletexDomainDefinedAttribute
   .value                              DD             P/T   18.1      6
ToP   noToC   RFC1327 - Page 32
MTS.PDSName                            PD-SERVICE     P     18.3.11   7
MTS.PhysicalDeliveryCountryName        PD-C           P     18.3.13   8
MTS.PostalCode                         PD-CODE        P     18.3.19   9
MTS.PhysicalDeliveryOfficeName         PD-OFFICE      P/T   18.3.14   10
MTS.PhysicalDeliveryOfficeNumber       PD-OFFICE-NUM  P/T   18.3.15   11
MTS.ExtensionORAddressComponents       PD-EXT-ADDRESS P/T   18.3.4    12
MTS.PhysicalDeliveryPersonName         PD-PN          P/T   18.3.17   13
MTS.PhysicalDeliveryOrganizationName   PD-O           P/T   18.3.16   14
MTS.ExtensionPhysicalDelivery
   AddressComponents                  PD-EXT-DELIVERY P/T   18.3.5    15
MTS.UnformattedPostalAddress           PD-ADDRESS     P/T   18.3.25   16
MTS.StreetAddress                      PD-STREET      P/T   18.3.22   17
MTS.PostOfficeBoxAddress               PD-BOX         P/T   18.3.18   18
MTS.PosteRestanteAddress               PD-RESTANTE    P/T   18.3.20   19
MTS.UniquePostalName                   PD-UNIQUE      P/T   18.3.26   20
MTS.LocalPostalAttributes              PD-LOCAL       P/T   18.3.6    21
MTS.ExtendedNetworkAddress
   .e163-4-address.number              NET-NUM        N     18.3.7    22
MTS.ExtendedNetworkAddress
   .e163-4-address.sub-address         NET-SUB        N     18.3.7    22
MTS.ExtendedNetworkAddress
   .psap-address                       NET-PSAP       X     18.3.7    22
MTS.TerminalType                       T-TY           I     18.3.24   23

   The following keys identify different EBNF encodings, which are
   associated with the ASCII representation of MTS.ORAddress.

                   Key         Encoding

                   P     printablestring
                   N     numericstring
                   T     teletex-string
                   P/T   teletex-and-or-ps
                   I     labelled-integer
                   X     presentation-address

   The BNF for presentation-address is taken from the specification "A
   String Encoding of Presentation Address" [Kille89a].

   In most cases, the EBNF encoding maps directly to the ASN.1 encoding
   of the attribute.  There are a few exceptions. In cases where an
   attribute can be encoded as either a PrintableString or NumericString
   (Country, ADMD, PRMD), either form is mapped into the BNF.  When
   generating ASN.1, the NumericString encoding shall be used if the
   string contains only digits.

   There are a number of cases where the P/T (teletex-and-or-ps)
   representation is used.  Where the key maps to a single attribute,
ToP   noToC   RFC1327 - Page 33
   this choice is reflected in the encoding of the attribute (attributes
   10-21).  For most of the 1984 attributes and common name, there is a
   printablestring and a teletex variant.   This pair of attributes is
   mapped onto the single component here.  This will give a clean
   mapping for the common cases where only one form of the name is used.

   Recently, ISO has undertaken work to specify a string form of O/R
   Address [CCITT/ISO91a].  This has specified a number of string
   keywords for attributes.  As RFC 1148 was an input to this work, many
   of the keywords are the same.  To increase compatability, the
   following alternative values shall be recognised when mapping from
   RFC 822 to X.400.  These shall not be generated when mapping from
   X.400 to RFC 822.

                   Keyword          Alternative

               ADMD               A
               PRMD               P
               GQ                 Q
               X121               X.121
               UA-ID              N-ID
               PD-OFFICE-NUMBER   PD-OFFICE NUMBER

   When mapping from RFC 822 to X.400, the keywords: OU1, OU2, OU3, and
   OU4, shall be recognised.    If these are present, no keyword OU
   shall be present.  These will be treated as ordered values of OU.

4.2.1.  Encoding of Personal Name

   Handling of Personal Name and Teletex Personal Name based purely on
   the EBNF.standard-type syntax defined above is likely to be clumsy.
   It seems desirable to utilise the "human" conventions for encoding
   these components.  A syntax is defined, which is designed to provide
   a clean encoding for the common cases of O/R Address specification
   where:

   1.   There is no generational qualifier

   2.   Initials contain only letters

   3.   Given Name does not contain full stop ("."), and is at least
        two characters long.

   4.   Surname does not contain full stop in the first two
        characters.

   5    If Surname is the only component, it does not contain full
        stop.
ToP   noToC   RFC1327 - Page 34
   The following EBNF is defined:

           encoded-pn      = [ given "." ] *( initial "." ) surname

           given           = 2*<ps-char not including ".">

           initial         = ALPHA

           surname         = printablestring

   This is used to map from any string containing only printable string
   characters to an O/R address personal name.  To map from a string to
   O/R Address components, parse the string according to the EBNF.  The
   given name and surname are assigned directly.  All EBNF.initial
   tokens are concatenated without intervening full stops to generate
   the initials component.

   For an O/R address which follows the above restrictions, a string is
   derived in the natural manner.  In this case, the mapping will be
   reversible.

   For example:

        GivenName       = "Marshall"
        Surname         = "Rose"

        Maps with  "Marshall.Rose"

        Initials        = "MT"
        Surname         = "Rose"

        Maps with  "M.T.Rose"

        GivenName       = "Marshall"
        Initials        = "MT"
        Surname         = "Rose"

        Maps with  "Marshall.M.T.Rose"

   Note that X.400 suggest that Initials is used to encode ALL initials.
   Therefore, the defined encoding is "natural" when either GivenName or
   Initials, but not both, are present.  The case where both are present
   can be encoded, but this appears to be contrived!

4.2.2.  Standard Encoding of MTS.ORAddress

   Given this structure, we can specify a BNF representation of an O/R
   Address.
ToP   noToC   RFC1327 - Page 35
        std-or-address  = 1*( "/" attribute "=" value ) "/"
        attribute       = standard-type
                        / "RFC-822"
                        / registered-dd-type
                        / dd-key "." std-printablestring
        standard-type   = key-string

        registered-dd-type
                        = key-string
        dd-key          = key-string

        value           = std-printablestring

        std-printablestring
                        = *( std-char / std-pair )
        std-char        = <"{", "}", "*", and any ps-char
                                        except "/" and "=">
        std-pair        = "$" ps-char

   The standard-type is any key defined in the table in Section 4.2,
   except PN, and DD.  The BNF leads to a set of attribute/value pairs.
   The value is interpreted according to the EBNF encoding defined in
   the table.

   If the standard-type is PN, the value is interpreted according to
   EBNF.encoded-pn, and the components of MTS.PersonalName and/or
   MTS.TeletexPersonalName derived accordingly.

   If dd-key is the recognised Domain Defined string (DD), then the type
   and value are interpreted according to the syntax implied from the
   encoding, and aligned to either the teletex or printable string form.
   Key and value shall have the same encoding.

   If value is "RFC-822", then the (printable string) Domain Defined
   Type of "RFC-822" is assumed.  This is an optimised encoding of the
   domain defined type defined by this specification.

   The matching of all keywords shall be done in a case-independent
   manner.

   EBNF.std-or-address uses the characters "/" and "=" as delimiters.
   Domain Defined Attributes and any value may contain these characters.
   A quoting mechanism, using the non-printable string "$" is used to
   allow these characters to be represented.

   If the value is registered-dd-type, and the value is registered at
   the Internet Assigned Numbers Authority (IANA) as an accepted Domain
   Defined Attribute type, then the value shall be interpreted
ToP   noToC   RFC1327 - Page 36
   accordingly.  This restriction maximises the syntax checking which
   can be done at a gateway.

4.3.  EBNF.822-address <-> MTS.ORAddress

   Ideally, the mapping specified would be entirely symmetrical and
   global, to enable addresses to be referred to transparently in the
   remote system, with the choice of gateway being left to the Message
   Transfer Service.  There are two fundamental reasons why this is not
   possible:

   1.   The syntaxes are sufficiently different to make this
        awkward.

   2.   In the general case, there would not be the necessary
        administrative co-operation between the X.400 and RFC 822
        worlds, which would be needed for this to work.

   Therefore, an asymmetrical mapping is defined, which can be
   symmetrical where there is appropriate administrative control.

4.3.1.  X.400 encoded in RFC 822

   The std-or-address syntax is  used to encode O/R Address information
   in the 822.local-part of EBNF.822-address.  In some cases, further
   O/R Address information is associated with the 822.domain component.
   This cannot be used in the general case, due to character set
   problems, and to the variants of X.400 O/R Addresses which use
   different attribute types.  The only way to encode the full
   PrintableString character set in a domain is by use of the
   822.domain-ref syntax (i.e. 822.atom).  This is likely to cause
   problems on many systems.  The effective character set of domains is
   in practice reduced from the RFC 822 set, by restrictions imposed by
   domain conventions and policy, and by restrictions in RFC 821.

   A generic 822.address consists of a 822.local-part and a sequence of
   822.domains (e.g., <@domain1,@domain2:user@domain3>).  All except the
   822.domain associated with the 822.local-part (domain3 in this case)
   are considered to specify routing within the RFC 822 world, and will
   not be interpreted by the gateway (although they may have identified
   the gateway from within the RFC 822 world).

   The  822.domain associated with the 822.local-part identifies the
   gateway from within the RFC 822 world.  This final 822.domain may be
   used to determine some number of O/R Address attributes, where this
   does not conflict with the first role.  RFC 822 routing to gateways
   will usually be set up to facilitate the 822.domain being used for
   both purposes.  The following O/R Address attributes are considered
ToP   noToC   RFC1327 - Page 37
   as a hierarchy, and may be specified by the domain.  They are (in
   order of hierarchy):

        Country, ADMD, PRMD, Organisation, Organisational Unit

   There may be multiple Organisational Units.

   A global mapping is defined between domain specifications, and some
   set of attributes.  This association proceeds hierarchically.  For
   example, if a domain implies ADMD, it also implies country.
   Subdomains under this are associated according to the O/R Address
   hierarchy.  For example:

        => "AC.UK" might be associated with
        C="GB", ADMD="GOLD 400", PRMD="UK.AC"

        then domain "R-D.Salford.AC.UK" maps with
        C="GB", ADMD="GOLD 400", PRMD="UK.AC", O="Salford", OU="R-D"

   There are three basic reasons why a domain/attribute mapping might be
   maintained, as opposed to using simply subdomains:

   1.   As a shorthand to avoid redundant X.400 information.  In
        particular, there will often be only one ADMD per country,
        and so it does not need to be given explicitly.

   2.   To deal with cases where attribute values do not fit the
        syntax:

           domain-syntax   = alphanum [ *alphanumhyphen alphanum ]
           alphanum        = <ALPHA or DIGIT>
           alphanumhyphen  = <ALPHA or DIGIT or HYPHEN>


        Although RFC 822 allows for a more general syntax, this
        restricted syntax is chosen as it is the one chosen by the
        various domain service administrations.

   3.   To deal with missing elements in the hierarchy.  A domain
        may be associated with an omitted attribute in conjunction
        with several present ones.  When performing the algorithmic
        insertion of components lower in the hierarchy, the omitted
        value shall be skipped.  For example, if "HNE.EGM" is
        associated with "C=TC", "ADMD=ECQ", "PRMD=HNE", and omitted
        organisation, then "ZI.HNE.EGM" is mapped with "C=TC",
        "ADMD=ECQ", "PRMD=HNE", "OU=ZI". Attributes may have null
        values, and  this is treated separately from omitted
        attributes (whilst it would be bad practice to treat these
ToP   noToC   RFC1327 - Page 38
        two cases differently, they must be allowed for).

   This set of mappings needs  be known by the gateways relaying between
   the RFC 822 world, and the O/R Address space associated with the
   mapping in question.  There needs to be a single global definition of
   this set of mappings.  A mapping implies an adminstrative equivalence
   between the two parts of the namespaces which are mapped together.
   To correctly route in all cases, it is necessary for all gateways to
   know the mapping.  To facilitate distribution of a global set of
   mappings, a format for the exchange of this information is defined in
   Appendix F.

   The remaining attributes are encoded on the LHS, using the EBNF.std-
   or-address syntax.  For example:

        /I=J/S=Linnimouth/GQ=5/@Marketing.Widget.COM

   encodes the MTS.ORAddress consisting of:

        MTS.CountryName                       = "TC"
        MTS.AdministrationDomainName          = "BTT"
        MTS.OrganizationName                  = "Widget"
        MTS.OrganizationalUnitNames.value     = "Marketing"
        MTS.PersonalName.surname              = "Linnimouth"
        MTS.PersonalName.initials             = "J"
        MTS.PersonalName.generation-qualifier = "5"

   The first three attributes are determined by the domain Widget.COM.
   Then, the first element of OrganizationalUnitNames is determined
   systematically, and the remaining attributes are encoded on the LHS.
   In an extreme case, all of the attributes will be on the LHS.  As the
   domain cannot be null, the RHS will simply be a domain indicating the
   gateway.

   The RHS (domain) encoding is designed to deal cleanly with common
   addresses, and so the amount of information on the RHS is maximised.
   In particular, it covers the Mnemonic O/R Address using a 1984
   compatible encoding.  This is seen as the dominant form of O/R
   Address.  Use of other forms of O/R Address, and teletex encoded
   attributes will require an LHS encoding.

   There is a further mechanism to simplify the encoding of common
   cases, where the only attributes to be encoded on the LHS is a (non-
   Teletex) Personal Name attributes which comply with the restrictions
   of 4.2.1.  To achieve this, the 822.local-part shall be encoded as
   EBNF.encoded-pn.  In the previous example, if the GenerationQualifier
   was not present in the previous example O/R Address, it would map
   with the RFC 822 address: J.Linnimouth@Marketing.Widget.COM.
ToP   noToC   RFC1327 - Page 39
   From the standpoint of the RFC 822 Message Transfer System, the
   domain specification is simply used to route the message in the
   standard manner.  The standard domain mechanisms are used to select
   appropriate gateways for the corresponding O/R Address space.  In
   most cases, this will be done by registering the higher levels, and
   assuming that the gateway can handle the lower levels.

4.3.2.  RFC 822 encoded in X.400

   In some cases, the encoding defined above may be reversed, to give a
   "natural" encoding of genuine RFC 822 addresses.  This depends
   largely on the allocation of appropriate management domains.

   The general case is mapped by use of domain defined attributes.  A
   Domain defined type "RFC-822" is defined. The associated attribute
   value is an ASCII string encoded according to Section 3.3.3 of this
   specification. The interpretation of the ASCII string depends on the
   context of the gateway.

   1.   In the context of RFC 822, and RFC 920
        [Crocker82a,Postel84a], the string can be used directly.

   2.   In the context of the JNT Mail protocol, and the NRS
        [Kille84a,Larmouth83a], the string shall be interpreted
        according to Mailgroup Note 15 [Kille84b].

   3.   In the context of UUCP based systems, the string shall be
        interpreted as defined in [Horton86a].

   Other O/R Address attributes will be used to identify a context in
   which the O/R Address will be interpreted.  This might be a
   Management Domain, or some part of a Management Domain which
   identifies a gateway MTA.  For example:

           C               = "GB"
           ADMD            = "GOLD 400"
           PRMD            = "UK.AC"
           O               = "UCL"
           OU              = "CS"
           "RFC-822"      =  "Jimmy(a)WIDGET-LABS.CO.UK"

   OR

           C               = "TC"
           ADMD            = "Wizz.mail"
           PRMD            = "42"
           "rfc-822"       = "postel(a)venera.isi.edu"
ToP   noToC   RFC1327 - Page 40
   Note in each case the PrintableString encoding of "@" as "(a)".  In
   the second example, the "RFC-822" domain defined attribute is
   interpreted everywhere within the (Private) Management Domain.  In
   the first example, further attributes are needed within the
   Management Domain to identify a gateway.  Thus, this scheme can be
   used with varying levels of Management Domain co-operation.

   There is a limit of 128 characters in the length of value of a domain
   defined attribute, and an O/R Address can have a maxmimum of four
   domain defined attributes.  Where the printable string generated from
   the RFC 822 address exceeeds this value, additional domain defined
   attributes are used to enable up to 512 characters to be encoded.
   These attributes shall be filled completely before the next one is
   started.   The DDA keywords are:  RFC822C1; RFC822C2; RFC822C3.
   Longer addresses cannot be encoded.

   There is, analagous with 4.3.1, a means to associate parts of the O/R
   Address hierarchy with domains.  There is an analogous global
   mapping, which in most cases will be the inverse of the domain to O/R
   address mapping.  The mapping is maintained separately, as there may
   be differences (e.g., two alternate domain names map to the same set
   of O/R address components).

4.3.3.  Component Ordering

   In most cases, ordering of O/R Address components is not significant
   for the mappings specified.  However, Organisational Units (printable
   string and teletex forms) and Domain Defined Attributes are specified
   as SEQUENCE in MTS.ORAddress, and so their order may be significant.
   This specification needs to take account of this:

   1.   To allow consistent mapping into the domain hierarchy

   2.   To ensure preservation of order over multiple mappings.

   There are three places where an order is specified:

   1.   The text encoding (std-or-address) of MTS.ORAddress as used
        in the local-part of an RFC 822 address.  An order is needed
        for those components which may have multiple values
        (Organisational Unit, and Domain Defined Attributes). When
        generating an 822.std-or-address, components of a given type
        shall be in hierarchical order with the most significant
        component on the RHS.  If there is an Organisation
        Attribute, it shall be to the right of any Organisational
        Unit attributes.  These requirements are for the following
        reasons:
ToP   noToC   RFC1327 - Page 41
   -         Alignment to the hierarchy of other components in RFC
             822 addresses (thus, Organisational Units will appear
             in the same order, whether encoded on the RHS or LHS).
             Note the differences of JNT Mail as described in
             Appendix B.

   -         Backwards compatibility with RFC 987/1026.

   -         To ensure that gateways generate consistent addresses.
             This is both to help end users, and to generate
             identical message ids.

        Further, it is recommended that all other attributes are
        generated according to this ordering, so that all attributes
        so encoded follow a consistent hierarchy.   When generating
        822.msg-id, this order shall be followed.

   2.   For the Organisational Units (OU) in MTS.ORAddress, the
        first OU in the SEQUENCE is the most significant, as
        specified in X.400.

   3.   For the Domain Defined Attributes in MTS.ORAddress, the
        First Domain Defined Attribute in the SEQUENCE is the most
        significant.

        Note that although this ordering is mandatory for this
        mapping, there are NO implications on ordering significance
        within X.400, where this is a Management Domain issue.

4.3.4.  RFC 822 -> X.400

   There are two basic cases:

   1.   X.400 addresses encoded in RFC 822.  This will also include
        RFC 822 addresses which are given reversible encodings.

   2.   "Genuine" RFC 822 addresses.

   The mapping shall proceed as follows, by first assuming case 1).

STAGE I.

   1.   If the 822-address is not of the form:

                local-part "@" domain

        take the domain which will be routed on and apply step 2 of
        stage 1 to derive (a possibly null) set of attributes. Then
ToP   noToC   RFC1327 - Page 42
        go to stage II.

        NOTE:It may be appropriate to reduce a source route address
             to this form by removal of all bar the last domain.  In
             terms of the design intentions of RFC 822, this would
             be an incorrect action.  However, in most real cases,
             it will do the "right" thing and provide a better
             service to the end user.  This is a reflection on the
             excessive and inappropriate use of source routing in
             RFC 822 based systems.  Either approach, or the
             intermediate approach of stripping only domain
             references which reference the local gateway are
             conformant to this specification.

   2.   Attempt to parse EBNF.domain as:

                *( domain-syntax "." ) known-domain

        Where EBNF.known-domain is the longest possible match in the
        set of globally defined mappings (see Appendix F).  If this
        fails, and the EBNF.domain does not explicitly identify the
        local gateway, go to stage II.  If the domain explicitly
        identifies the gateway, allocate no attributes.  Otherwise,
        allocate the attributes associated with EBNF.known-domain.
        For each component, systematically allocate the attribute
        implied by each EBNF.domain-syntax component in the order:
        C, ADMD, PRMD, O, OU.  Note that if the mapping used
        identifies an "omitted attribute", then this attribute
        should be omitted in the systematic allocation.  If this new
        component exceed an upper bound (ADMD: 16; PRMD: 16; O: 64;
        OU:  32) or it would lead to more than four OUs, then go to
        stage II with the attributes derived.

        At this stage, a set of attributes has been derived, which
        will give appropriate routing within X.400.  If any of the
        later steps of Stage I force use of Stage II, then these
        attributes should be used in Stage II.

   3.   If the 822.local-part uses the 822.quoted-string encoding,
        remove this quoting.  If this unquoted 822.local-part has
        leading space, trailing space, or two adjacent space go to
        stage II.

   4.   If the unquoted 822.local-part contains any characters not
        in PrintableString, go to stage II.

   5.   Parse the (unquoted) 822.local-part according to the EBNF
        EBNF.std-or-address.  Checking of upper bounds should not be
ToP   noToC   RFC1327 - Page 43
        done at this point.  If this parse fails, parse the local-
        part according to the EBNF EBNF.encoded-pn.  If this parse
        fails, go to stage II.  The result is a set of type/value
        pairs.  If the set of attributes leads to an address of any
        form other than mnemonic form, then only these attributes
        should be taken. If (for mnemonic form) the values generated
        conflict with those derived in step 2 (e.g., a duplicated
        country attribute), the domain is assumed to be a remote
        gateway.  In this case, take only the LHS derived
        attributes, together with any RHS dericed attributes which
        are more significant thant the most signicant attribute
        which is duplicated (e.g., if there is a duplicate PRMD, but
        no LHS derived ADMD and country, then the ADMD and country
        should be taken from the RHS).  therwise add LHS and RHS
        derived attributes together.

   6.   Associate the EBNF.attribute-value syntax (determined from
        the identified type) with each value, and check that it
        conforms.  If not, go to stage II.

   7.   Ensure that the set of attributes conforms both to the
        MTS.ORAddress specification and to the restrictions on this
        set given in X.400, and that no upper bounds are exceeded
        for any attribute.  If not go to stage II.

   8.   Build the O/R Address from this information.

STAGE II.

   This will only be reached if the RFC 822 EBNF.822-address is not a
   valid X.400 encoding.  This implies that the address must refer to a
   recipient on an RFC 822 system.  Such addresses shall be encoded in
   an X.400 O/R Address using a domain defined attribute.

   1.   Convert the EBNF.822-address to PrintableString, as
        specified in Chapter 3.

   2.   Generate the "RFC-822" domain defined attribute  from this
        string.

   3.   Build the rest of the O/R Address in the manner described
        below.

   It may not be possible to encode the domain defined attribute due to
   length restrictions.  If the limit is exceeded by a mapping at the
   MTS level, then the gateway shall reject the message in question.  If
   this occurs at the IPMS level, then the action will depend on the
   policy being taken for IPMS encoding, which is discussed in Section
ToP   noToC   RFC1327 - Page 44
   5.1.3.

   If Stage I has identified a set of attributes, use these to build the
   remainder of the address.  The administrative equivalence of the
   mappings will ensure correct routing throug X.400 to a gateway back
   to RFC 822.

   If Stage I has not identified a set of attributes, the remainder of
   the O/R address effectively identifies a source route to a gateway
   from the X.400 side.  There are three cases, which are handled
   differently:

   822-MTS Return Address
        This shall be set up so that errors are returned through the
        same gateway.  Therefore, the O/R Address of the local
        gateway shall be used.

   IPMS Addresses
        These are optimised for replying.  In general, the message
        may end up anywhere within the X.400 world, and so this
        optimisation identifies a gateway appropriate for  the RFC
        822 address being converted.  The 822.domain to which the
        address would be routed is used to select an appropriate
        gateway. A globally defined set of mappings is used, which
        identifies (the O/R Address components of) appropriate
        gateways for parts of the domain namespace.  The longest
        possible match on the 822.domain defines which gateway to
        use.  The table format for distribution of this information
        is defined in Appendix F.

        This global mapping is used for parts of the RFC 822
        namespace which do not have an administrative equivalence
        with any part of the X.400 namespace, but for which it is
        desirable to identify a preferred X.400 gateway in order to
        optimise routing.

        If no mapping is found for the 822.domain, a default value
        (typically that of the local gateway) is used.  It is never
        appropriate to ignore the globally defined mappings.  In
        some cases, it may be appropriate to locally override the
        globally defined mappings (e.g., to identify a gateway close
        to a recipient of the message).  This is likely to be where
        the global mapping identifies a public gateway, and the
        local gateway has an agreement with a private gateway which
        it prefers to use.

   822-MTS Recipient
        As the RFC 822 and X.400 worlds are fully connected, there
ToP   noToC   RFC1327 - Page 45
        is no technical reason for this situation to occur.  In some
        cases, routing may be configured to connect two parts of the
        RFC 822 world using X.400.  The information that this part
        of the domain space should be routed by X.400 rather than
        remaining within the RFC 822 world will be configured
        privately into the gateway in question.  The O/R address
        shall then be generated in the same manner as for an IPMS
        address, using the globally defined mappings. It is to
        support this case that the definition of the global domain
        to gateway mapping is important, as the use of this mapping
        will lead to a remote X.400 address, which can be routed by
        X.400 routing procedures.  The information in this mapping
        shall not be used as a basis for deciding to convert a
        message from RFC 822 to X.400.

4.3.4.1.  Heuristics for mapping RFC 822 to X.400

   RFC 822 users will often use an LHS encoded address to identify an
   X.400 recipient.  Because the syntax is fairly complex, a number of
   heuristics may be applied to facilitate this form of usage.  A
   gateway should take care not to be overly "clever" with heuristics,
   as this may cause more confusion than a more mechanical approach.
   The heuristics are as follows:

   1.   Ignore the omission of a trailing "/" in the std-or syntax.

   2.   If there is no ADMD component, and both country and PRMD are
        present, the value of /ADMD= / (single space) is assumed.

   3.   Parse the unquoted local part according to the EBNF colon-
        or-address.  This may facilitate users used to this
        delimiter.

        colon-or-address = 1*(attribute "=" value ";" *(LWSP-char))

   The remaining heuristic relates to ordering of address components.
   The ordering of attributes may be inverted or mixed.  For this
   reason, the following heuristics may be applied:

   4.   If there is an Organisation attribute to the left of any Org
        Unit attribute, assume that the hierarchy is inverted.

4.3.5.  X.400 -> RFC 822

   There are two basic cases:

   1.   RFC 822 addresses encoded in X.400.
ToP   noToC   RFC1327 - Page 46
   2.   "Genuine" X.400 addresses.  This may include symmetrically
        encoded RFC 822 addresses.

   When a MTS Recipient O/R Address is interpreted, gatewaying will be
   selected if there is a single "RFC-822" domain defined attribute
   present and the local gateway is identified by the remainder of the
   O/R Address.  In this case, use mapping A.  For other O/R Addresses
   which

   1.   Contain the special attribute.

        AND

   2.   Identifies the local gateway or any other known gateway with
        the other attributes.

   use mapping A.  In other cases, use mapping B.

   NOTE:
        A pragmatic approach would  be to assume that any O/R
        Address with the special domain defined attribute identifies
        an RFC 822 address. This will usually work correctly, but is
        in principle not correct.  Use of this approach is
        conformant to this specification.

Mapping A

   1.   Map the domain defined attribute value to ASCII, as defined
        in Chapter 3.

Mapping B

   This is used for X.400 addresses which do not use the explicit RFC
   822 encoding.

   1.   For all string encoded attributes, remove any leading or
        trailing spaces, and replace adjacent spaces with a single
        space.

        The only attribute which is permitted to have zero length is
        the ADMD.  This should be mapped onto a single space.

        These transformations are for lookup only.   If an
        EBNF.std-or-address mapping is used as in 4), then the
        orginal values should be used.

   2.   Map numeric country codes to the two letter values.
ToP   noToC   RFC1327 - Page 47
   3.   Noting the hierarchy specified in 4.3.1 and including
        omitted attributes, determine the maximum set of attributes
        which have an associated domain specification in the
        globally defined mapping.  If no match is found, allocate
        the domain as the domain specification of the local gateway,
        and go to step 5.

   Note:     It might be appropriate to use a non-local domain.
             This would be selected by a global mapping analagous to
             the one described at the end of 4.3.4.  This is not
             done, primarily because use of RFC 822 to connect X.400
             systems is not expected to be significant.

        In cases where the address refers to an X.400 UA, it is
        important that the generated domain will correctly route to
        a gateway.  In general, this is achieved by carefully co-
        ordinating RFC 822 routing with the definition of the global
        mappings, as there is no easy way for the gateway to make
        this check.  One rule that shall be used is that domains
        with only one component will not route to a gateway.  If the
        generated domain does not route correctly, the address is
        treated as if no match is found.

   4.   The mapping identified  in 3) gives a domain, and an O/R
        address prefix.  Follow the hierarchy: C, ADMD, PRMD, O, OU.
        For each successive component below the O/R address prefix,
        which conforms to the syntax EBNF.domain-syntax (as defined
        in 4.3.1), allocate the next subdomain.  At least one
        attribute of the X.400 address shall not be mapped onto
        subdomain, as 822.local-part cannot be null.  If there are
        omitted attributes in the O/R address prefix, these will
        have correctly and uniquely mapped to a domain component.
        Where there is an attribute omitted below the prefix, all
        attributes remaining in the O/R address shall be encoded on
        the LHS.  This is to ensure a reversible mapping. For
        example, if the is an addres /S=XX/O=YY/ADMD=A/C=NN/ and a
        mapping for /ADMD=A/C=NN/ is used, then /S=XX/O=YY/ is
        encoded on the LHS.

   5.   If the address is not  mnemonic form (form 1 variant 1),
        then all of the attributes in the address should be encoded
        on the LHS in EBNF.std-or-address syntax, as described
        below.

        For addresses of mnemonic form, if the remaining components
        are personal-name components, conforming to the restrictions
        of 4.2.1, then EBNF.encoded-pn is derived to form
        822.local-part.  In other cases the remaining components are
ToP   noToC   RFC1327 - Page 48
        simply encoded as 822.local-part using the
        EBNF.std-or-address syntax.  If necessary, the
        822.quoted-string encoding is used.  The following are
        examples of legal quoting: "a b".c@x; "a b.c"@x.  Either
        form may be generated, but the latter is preferred.

        If the derived 822.local-part can only be encoded by use of
        822.quoted-string, then use of the mapping defined
        in [Kille89b] may be appropriate.  Use of this mapping is
        discouraged.

4.4.  Repeated Mappings

   There are two types of repeated mapping:

   1.   A recursive mapping, where the repeat is within one gateway

   2    A source route, where the repetition occurs across multiple
        gateways

4.4.1.  Recursive Mappings

   It is possible to supply an address which is recurive at a single
   gateway.  For example:

           C          = "XX"
           ADMD       = "YY"
           O          = "ZZ"
           "RFC-822"  = "Smith(a)ZZ.YY.XX"

   This is mapped first to an RFC 822 address, and then back to the
   X.400 address:

           C          = "XX"
           ADMD       = "YY"
           O          = "ZZ"
           Surname    = "Smith"

   In some situations this type of recursion may be frequent.  It is
   important that where this occurs, that no unnecessary protocol
   conversion occurs. This will minimise loss of service.

4.4.2.  Source Routes

   The mappings defined are symmetrical and reversible across a single
   gateway.  The symmetry is particularly useful in cases of (mail
   exploder type) distribution list expansion.  For example, an X.400
   user sends to a list on an RFC 822 system which he belongs to.  The
ToP   noToC   RFC1327 - Page 49
   received message will have the originator and any 3rd party X.400 O/R
   Addresses in correct format (rather than doubly encoded).  In cases
   (X.400 or RFC 822) where there is common agreement on gateway
   identification, then this will apply to multiple gateways.

   When a message traverses multiple gateways, the mapping will always
   be reversible, in that a reply can be generated which will correctly
   reverse the path.  In many cases, the mapping will also be
   symmetrical, which will appear clean to the end user.  For example,
   if countries "AB" and "XY" have RFC 822 networks, but are
   interconnected by X.400, the following may happen:  The originator
   specifies:

           Joe.Soap@Widget.PTT.XY

   This is routed to a gateway, which generates:

           C               = "XY"
           ADMD            = "PTT"
           PRMD            = "Griddle MHS Providers"
           Organisation    = "Widget Corporation"
           Surname         = "Soap"
           Given Name      = "Joe"

   This is then routed to another gateway where the mapping is reversed
   to give:

           Joe.Soap@Widget.PTT.XY

   Here, use of the gateway is transparent.

   Mappings will only be symmetrical where mapping tables are defined.
   In other cases, the reversibility is more important, due to the (far
   too frequent) cases where RFC 822 and X.400 services are partitioned.

   The syntax may be used to source route.  THIS IS STRONGLY
   DISCOURAGED.  For example:

         X.400 -> RFC 822  -> X.400

         C             = "UK"
         ADMD          = "Gold 400"
         PRMD          = "UK.AC"
         "RFC-822"     = "/PN=Duval/DD.Title=Manager/(a)Inria.ATLAS.FR"

   This will be sent to an arbitrary UK Academic Community gateway by
   X.400.  Then it will be sent by JNT Mail to another gateway
   determined by the domain Inria.ATLAS.FR (FR.ATLAS.Inria).  This will
ToP   noToC   RFC1327 - Page 50
   then derive the X.400 O/R Address:

           C             = "FR"
           ADMD          = "ATLAS"
           PRMD          = "Inria"
           PN.S          = "Duval"
           "Title"       = "Manager"

   Similarly:
   RFC 822 -> X.400 -> RFC 822

"/C=UK/ADMD=BT/PRMD=AC/RFC-822=jj(a)seismo.css.gov/"@monet.berkeley.edu

   This will be sent to monet.berkeley.edu by RFC 822, then to the AC
   PRMD by X.400, and then to jj@seismo.css.gov by RFC 822.

4.5.  Directory Names

   Directory Names are an optional part of O/R Name, along with O/R
   Address.  The RFC 822 addresses are mapped onto the O/R Address
   component. As there is no functional mapping for the Directory Name
   on the RFC 822 side, a textual mapping is used.  There is no
   requirement for reversibility in terms of the goals of this
   specification.  There may be some loss of functionality in terms of
   third party recipients where only a directory name is given, but this
   seems preferable to the significant extra complexity of adding a full
   mapping for Directory Names.

   Note:There is ongoing work on specification of a "user friendly"
        format for directory names.  If this is adopted as an
        internet standard, it will be recommended, but not required,
        for use here.

4.6.  MTS Mappings

   The basic mappings at the MTS level are:

   1) 822-MTS originator ->
                 MTS.PerMessageSubmissionFields.originator-name
      MTS.OtherMessageDeliveryFields.originator-name ->
                 822-MTS originator

   2) 822-MTS recipient ->
                 MTS.PerRecipientMessageSubmissionFields
      MTS.OtherMessageDeliveryFields.this-recipient-name ->
                 822-MTS recipient

   822-MTS recipients and return addresses are encoded as EBNF.822-
ToP   noToC   RFC1327 - Page 51
   address.

   The MTS Originator is always encoded as MTS.OriginatorName, which
   maps onto MTS.ORAddressAndOptionalDirectoryName, which in turn maps
   onto MTS.ORName.

4.6.1.  RFC 822 -> X.400

   From the 822-MTS Originator, use the basic ORAddress mapping, to
   generate MTS.PerMessageSubmissionFields.originator-name (MTS.ORName),
   without a DirectoryName.

   For recipients, the following settings are made for each component of
   MTS.PerRecipientMessageSubmissionFields.

   recipient-name
        This is derived from the 822-MTS recipient by the basic
        ORAddress mapping.

   originator-report-request
        This is be set according to content return policy, as
        discussed in Section 5.2.

   explicit-conversion
        This optional component is omitted, as this service is not
        needed

   extensions
        The default value (no extensions) is used

4.6.2.  X.400 -> RFC 822

   The basic functionality is to generate the 822-MTS originator and
   recipients.  There is information present on the X.400 side, which
   cannot be mapped into analogous 822-MTS services.  For this reason,
   new RFC 822 fields are added for the MTS Originator and Recipients.
   The information discarded at the 822-MTS level will be present in
   these fields. In some cases a (positive) delivery report will be
   generated.

4.6.2.1.  822-MTS Mappings

   Use the basic ORAddress mapping, to generate the 822-MTS originator
   (return address) from MTS.OtherMessageDeliveryFields.originator-name
   (MTS.ORName).  If MTS.ORName.directory-name is present, it is
   discarded.  (Note that it will be presented to the user, as described
   in 4.6.2.2).
ToP   noToC   RFC1327 - Page 52
   The 822-MTS recipient is conceptually generated from
   MTS.OtherMessageDeliveryFields.this-recipient-name.  This is done by
   taking MTS.OtherMessageDeliveryFields.this-recipient-name, and
   generating an 822-MTS recipient according to the basic ORAddress
   mapping, discarding MTS.ORName.directory-name if present.  However,
   if this model was followed exactly, there would be no possibility to
   have multiple 822-MTS recipients on a single message.  This is
   unacceptable, and so layering is violated.  The mapping needs to use
   the MTA level information, and map each value of
   MTA.PerRecipientMessageTransferFields.recipient-name, where the
   responsibility bit is set, onto an 822-MTS recipient.

4.6.2.2.  Generation of RFC 822 Headers

   Not all per-recipient information can be passed at the 822-MTS level.
   For this reason, two new RFC 822 headers are created, in order to
   carry this information to the RFC 822 recipient.  These fields are
   "X400-Originator:"  and "X400-Recipients:".

   The "X400-Originator:" field is set to the same value as the 822-MTS
   originator.  In addition, if
   MTS.OtherMessageDeliveryFields.originator-name (MTS.ORName) contains
   MTS.ORName.directory-name then this Directory Name shall be
   represented in an 822.comment.

   Recipient names, taken from each value of
   MTS.OtherMessageDeliveryFields.this-recipient-name and
   MTS.OtherMessageDeliveryFields.other-recipient-names are made
   available to the RFC 822 user by use of the "X400-Recipients:" field.
   By taking the recipients at the MTS level, disclosure of recipients
   will be dealt with correctly.  However, this conflicts with a desire
   to optimise mail transfer.  There is no problem when disclosure of
   recipients is allowed. Similarly, there is no problem if there is
   only one RFC 822 recipient, as the "X400-Recipients field is only
   given one address.

   There is a problem if there are multiple RFC 822 recipients, and
   disclosure of recipients is prohibited.  Two options are allowed:

   1.   Generate one copy of the message for each RFC 822 recipient,
        with the "X400-Recipients field correctly set to the
        recipient of that copy.  This is functionally correct, but
        is likely to be more expensive.

   2.   Discard the per-recipient information, and insert a field:

                X400-Recipients: non-disclosure:;
ToP   noToC   RFC1327 - Page 53
        This is the recommended option.

   A third option of ignoring the disclosure flag is not allowed.  If
   any MTS.ORName.directory-name is present, it shall be represented in
   an 822.comment.

   If MTS.OtherMessageDeliveryFields.orignally-intended-recipient-name
   is present, then there has been redirection, or there has been
   distribution list expansion.  Distribution list expansion is a per-
   message option, and the information associated with this is
   represented by the "DL-Expansion-History:" field descrined in Section
   5.3.6.  Other information is represented in an 822.comment associated
   associated with MTS.OtherMessageDeliveryFields.this-recipient-name,
   The message may be delivered to different RFC 822 recipients, and so
   several addresses in the "X400-Recipients:" field may have such
   comments.  The non-commented recipient is the RFC 822 recipient. The
   EBNF of the comment is:


           redirect-comment  =
                    [ "Originally To:" ] mailbox "Redirected"
                    [ "Again" ] "on" date-time
                    "To:"  redirection-reason

           redirection-reason =
                    "Recipient Assigned Alternate Recipient"
                    / "Originator Requested Alternate Recipient"
                    / "Recipient MD Assigned Alternate Recipient"

   It is derived from
   MTA.PerRecipientMessageTransferFields.extension.redirection-history.
   An example of this is:

   X400-Recipients: postmaster@widget.com (Originally To:
         sales-manager@sales.widget.com Redirected
         on Thu, 30 May 91 14:39:40 +0100 To: Originator Assigned
         Alternate Recipient postmaster@sales.widget.com Redirected
         Again on Thu, 30 May 91 14:41:20 +0100 To: Recipient MD
         Assigned Alternate Recipient)

   In addition, the following per-recipient services from
   MTS.OtherMessageDeliveryFields.extensions are represented in comments
   if they are used.  None of these services can be provided on RFC 822
   networks, and so in general these will be informative strings
   associated with other MTS recipients. In some cases, string values
   are defined.  For the remainder, the string value shall be chosen by
   the implementor.   If the parameter has a default value, then no
   comment shall be inserted when the parameter has that default value.
ToP   noToC   RFC1327 - Page 54
   requested-delivery-method

   physical-forwarding-prohibited
        "(Physical Forwarding Prohibited)".

   physical-forwarding-address-request
        "(Physical Forwarding Address Requested)".

   physical-delivery-modes

   registered-mail-type

   recipient-number-for-advice

   physical-rendition-attributes

   physical-delivery-report-request
        "(Physical Delivery Report Requested)".

   proof-of-delivery-request
        "(Proof of Delivery Requested)".

4.6.2.3.  Delivery Report Generation

   If MTA.PerRecipientMessageTransferFields.per-recipient-indicators
   requires a positive delivery notification, this shall be generated by
   the gateway.  Supplementary Information shall be set to indicate that
   the report is gateway generated.  This information shall include the
   name of the gateway generating the report.

4.6.3.  Message IDs (MTS)

   A mapping from 822.msg-id to MTS.MTSIdentifier is defined.  The
   reverse mapping is not needed, as MTS.MTSIdentifier is always mapped
   onto new RFC 822 fields.  The value of MTS.MTSIdentifier.local-part
   will facilitate correlation of gateway errors.

   To map from 822.msg-id, apply the standard mapping to 822.msg-id, in
   order to generate an MTS.ORAddress.  The Country, ADMD, and PRMD
   components of this are used to generate MTS.MTSIdentifier.global-
   domain-identifier.  MTS.MTSIdentifier.local-identifier is set to the
   822.msg-id, including the braces "<" and ">".   If this string is
   longer than MTS.ub-local-id-length (32), then it is truncated to this
   length.

   The reverse mapping is not used in this specification.  It would be
   applicable where MTS.MTSIdentifier.local-identifier is of syntax
   822.msg-id, and it algorithmically identifies MTS.MTSIdentifier.
ToP   noToC   RFC1327 - Page 55
4.7.  IPMS Mappings

   All RFC 822 addresses are assumed to use the 822.mailbox syntax.
   This includes all 822.comments associated with the lexical tokens of
   the 822.mailbox.  In the IPMS O/R Names are encoded as MTS.ORName.
   This is used within the  IPMS.ORDescriptor, IPMS.RecipientSpecifier,
   and IPMS.IPMIdentifier.  An asymmetrical mapping is defined between
   these components.

4.7.1.  RFC 822 -> X.400

   To derive IPMS.ORDescriptor from an RFC 822 address.

   1.   Take the address, and extract an EBNF.822-address.  This can
        be derived trivially from either the 822.addr-spec or
        822.route-addr syntax.  This is mapped to MTS.ORName as
        described above, and used as IMPS.ORDescriptor.formal-name.

   2.   A string shall be built consisting of (if present):

   -         The 822.phrase component if the 822.address is an
             822.phrase 822.route-addr construct.

   -         Any 822.comments, in order, retaining the parentheses.

        This string is then encoded into T.61 use a human oriented
        mapping (as described in Chapter 3).  If the string is not
        null, it is assigned to IPMS.ORDescriptor.free-form-name.

   3.   IPMS.ORDescriptor.telephone-number is omitted.

   If IPMS.ORDescriptor is being used in IPMS.RecipientSpecifier,
   IPMS.RecipientSpecifier.reply-request and
   IPMS.RecipientSpecifier.notification-requests are set to default
   values (none and false).

   If the 822.group construct is present, any included 822.mailbox is
   encoded as above to generate a separate IPMS.ORDescriptor.  The
   822.group is  mapped to T.61, and a IPMS.ORDescriptor with only an
   free-form-name component built from it.

4.7.2.  X.400 -> RFC 822

   Mapping from IPMS.ORDescriptor to RFC 822 address.  In the basic
   case, where IPMS.ORDescriptor.formal-name is present, proceed as
   follows.

   1.   Encode IPMS.ORDescriptor.formal-name (MTS.ORName) as
ToP   noToC   RFC1327 - Page 56
        EBNF.822-address.

   2a.  If IPMS.ORDescriptor.free-form-name is present, convert it
        to ASCII (Chapter 3), and use this as the 822.phrase
        component of 822.mailbox using the 822.phrase 822.route-addr
        construct.

   2b.  If IPMS.ORDescriptor.free-form-name is absent.  If
        EBNF.822-address is parsed as 822.addr-spec use this as the
        encoding of 822.mailbox.  If EBNF.822-address is parsed as
        822.route 822.addr-spec, then a 822.phrase taken from
        822.local-part is added.

   3.   If IPMS.ORDescriptor.telephone-number is present, this is
        placed in an 822.comment, with the string "Tel ".  The
        normal international form of number is used.  For example:

                (Tel +44-1-387-7050)

   4.   If IPMS.ORDescriptor.formal-name.directory-name is present,
        then a text representation is placed in a trailing
        822.comment.

   5.   If IPMS.RecipientSpecifier.report-request has any non-
        default values, then an 822.comment "(Receipt Notification
        Requested)", and/or "(Non Receipt Notification Requested)",
        and/or "(IPM Return Requested)" is appended to the address.
        If both receipt and non-receipt notfications are requested,
        the comment relating to the latter may be omitted, to make
        the RFC 822 address cleaner.  The effort of correlating P1
        and P2 information is too great to justify the gateway
        sending Receipt Notifications.

   6.   If IPMS.RecipientSpecifier.reply-request is True, an
        822.comment "(Reply requested)"  is appended to the address.

   If IPMS.ORDescriptor.formal-name is absent, IPMS.ORDescriptor.free-
   form-name is converted to ASCII, and used as 822.phrase within the
   RFC 822 822.group syntax.  For example:

           Free Form Name ":" ";"

   Steps 3-6 are then followed.

4.7.3.  IP Message IDs

   There is a need to map both ways between 822.msg-id and
   IPMS.IPMIdentifier.  This allows for X.400 Receipt Notifications,
ToP   noToC   RFC1327 - Page 57
   Replies, and Cross References to reference an RFC 822 Message ID,
   which is preferable to a gateway generated ID.  A reversible and
   symmetrical mapping is defined.  This allows for good things to
   happen when messages pass multiple times across the X.400/RFC 822
   boundary.

   An important issue with messages identifiers is mapping to the exact
   form, as many systems use these ids as uninterpreted keys.  The use
   of table driven mappings is not always symmetrical, particularly in
   the light of alternative domain names, and alternative management
   domains.  For this reason, a purely algorithmic mapping is used.  A
   mapping which is simpler than that for addresses can be used for two
   reasons:

   -    There is no major requirement to make message IDs "natural"

   -    There is no issue about being able to reply to message IDs.
        (For addresses, creating a return path which works is more
        important than being symmetrical).

   The mapping works by defining a way in which message IDs generated on
   one side of the gateway can be represented on the other side in a
   systematic manner.  The mapping is defined so that the possibility of
   clashes is is low enough to be treated as impossible.

4.7.3.1.  822.msg-id represented in X.400

   IPMS.IPMIdentifier.user is omitted.  The IPMS.IPMIdentifier.user-
   relative-identifier is set to a printable string encoding of the
   822.msg-id with the angle braces ("<" and ">") removed.  The upper
   bound on this component is 64.  The options for handling this are
   discussed in Section 5.1.3.

4.7.3.2.  IPMS.IPMIdentifier represented in RFC 822

   The 822.domain of 822.msg-id is set to the value "MHS". The
   822.local-part of 822.msg-id is built as

           [ printablestring ] "*"  [ std-or-address ]

   with EBNF.printablestring being the IPMS.IPMIdentifier.user-
   relative-identifier, and std-or-address being an encoding of the
   IPMS.IPMIdentifier.user.  If necessary, the 822.quoted-string
   encoding is used.  For example:

   <"147*/S=Dietrich/O=Siemens/ADMD=DBP/C=DE/"@MHS>
ToP   noToC   RFC1327 - Page 58
4.7.3.3.  822.msg-id -> IPMS.IPMIdentifier

   If the 822.local-part can be parsed as:

           [ printablestring ] "*"  [ std-or-address ]

   and the 822.domain is "MHS", then this ID was X.400 generated.  If
   EBNF.printablestring is present, the value is assigned to
   IPMS.IPMIdentifier.user-relative-identifier.  If EBNF.std-or-address
   is present, the O/R Address components derived from it are used to
   set IPMS.IPMIdentifier.user.

   Otherwise, this is an RFC 822 generated ID.  In this case, set
   IPMS.IPMIdentifier.user-relative-identifier to a printable string
   encoding of the 822.msg-id without the angle braces.

4.7.3.4.  IPMS.IPMIdentifier -> 822.msg-id

   If IPMS.IPMIdentifier.user is absent, and IPMS.IPMIdentifier.user-
   relative-identifier mapped to ASCII and angle braces added parses as
   822.msg-id, then this is an RFC 822 generated ID.

   Otherwise, the ID is X.400 generated.  Use the
   IPMS.IPMIdentifier.user to generate an EBNF.std-or-address form
   string.  Build the 822.local-part of the 822.msg-id with the syntax:

           [ printablestring ] "*"  [ std-or-address ]

   The printablestring is taken from IPMS.IPMIdentifier.user-relative-
   identifier.  Use 822.quoted-string if necessary.  The 822.msg-id is
   generated with this 822.local-part, and "MHS" as the 822.domain.

4.7.3.5.  Phrase form

   In "InReply-To:" and "References:", the encoding 822.phrase may be
   used as an alternative to 822.msg-id.  To map from 822.phrase to
   IPMS.IPMIdentifier, assign IPMS.IPMIdentifier.user-relative-
   identifier to the phrase.  When mapping from IPMS.IPMIdentifier for
   "In-Reply-To:" and "References:", if IPMS.IPMIdentifier.user is
   absent and IPMS.IPMIdentifier.user-relative-identifier does not parse
   as 822.msg-id, generate an 822.phrase rather than adding the domain
   MHS.

4.7.3.6.  RFC 987 backwards compatibility

   The mapping defined here is different to that used in RFC 987, as the
   RFC 987 mapping lead to changed message IDs in many cases.  Fixing
   the problems is preferable to retaining backwards compatibility.  An
ToP   noToC   RFC1327 - Page 59
   implementation of this standard is encouraged to recognise message
   IDs generated by RFC 987.  This is not required.

   RFC 987 generated encodings may be recognised as follows.  When
   mapping from X.400 to RFC 822, if the IPMS.IPMIdentifier.user-
   relative-identifier is "RFC-822" the id is RFC 987 generated. When
   mapping from RFC 822 to X.400, if the 822.domain is not "MHS", and
   the 822.local-part can be parsed as

           [ printablestring ] "*"  [ std-or-address ]

   then it is RFC 987 generated.  In each of these cases, it is
   recommended to follow the RFC 987 rules.



(page 59 continued on part 3)

Next Section