Skip to main content

Chapter 4 -- Addressing: RFC 822 -> X.400 and X.400 -> RFC 822

      4.2.3.  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 should proceed as follows, by first assuming case
         1).

         STAGE 1.

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

               local-part "@" domain

               go to stage 2.

            2.   Attempt to parse domain as:

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

               Where known-domain is the longest possible match in a
               list of gatewayed domains.  If this fails, and the domain
               does not explicitly identify the local gateway, go to
               stage 2.  If it succeeds, allocate the attributes
               associated with EBNF.known-domain, and systematically
               allocate the attributes implied by each
               EBNF.domain-syntax component.

            3.   Map 822.local-part to ASCII, according to the
                 definition of Appendix A.  This step should be applied:

               A.  If the source network cannot support
                   822.quoted-string (as discussed in Appendix A).

               B.  If the address is an 822-P1 recipient.

                  This mapping is always applied in case B, as it
                  increases the functionality of the gateway, and does
                  not imply any loss of generality.  Mapping case B
                  allows sites which cannot generate 822.quoted-string
                  to address recipients the gateway, without the gateway
                  having to know this explicitly.  There is no loss of
                  functionality, as the quoting character of Appendix A
                  (#) is not in PrintableString.  This seems desirable.
                  It should not be applied in to other addresses, as a
                  third party RFC#822 address containing the sequence
                  EBNF.atom-encoded (as defined in Appendix A) would be
                  transformed asymmetrically.

            4.   Map the result of 3) to EBNF.ps-encoded according to
                 section 3.

            5.   Parse the result of 4) according to the EBNF
                 EBNF.std-orname.  If this parse fails, parse the result
                 of 4) according to the EBNF EBNF.encoded-pn.  If this
                 also fails, go to stage 2.  Otherwise, the result is a
                 set of type/value pairs.

            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 2.

            7.   Ensure that the set of attributes conforms both to the
                 X.411 P1.ORName specification and to the restrictions
                 on this set given in X.400.  If not go to stage 2.

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

         STAGE 2.

         This will only be reached if the RFC 822 EBNF.822-address is
         not a valid X.400 encoding.  If the address is an 822-P1
         recipient address, it must be rejected, as there is a need to
         interpret such an address in X.400.  For the 822-P1 return
         address, and any addresses in the RFC 822 header, they should
         now be encoded as RFC 822 addresses in an X.400 O/R Name:

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

            2.   The domain defined attribute ("RFC-822", "JNT-Mail" or
                 "UUCP") appropriate to the gateway should be selected,
                 and its value set.

            3.   Build the rest of the O/R Name in the local Management
                 Domain agreed manner, so that the O/R Name will receive
                 a correct global interpretation.

      4.2.4.  X.400 -> RFC 822

         There are two basic cases:

            1.   RFC 822 addresses encoded in X.400.

            2.   "Genuine" X.400 addresses.  This may include
                 symmetrically encoded RFC 822 addresses.

         When a P1 Recipient O/R Name is interpreted, gatewaying will be
         selected if there a single special domain defined attribute
         present ("RFC-822", "JNT-Mail" or "UUCP").  In this case, use
         mapping A.  For other O/R Names which

            1.   Contain the special attribute.

               AND

            2.   Identify the local gateway with the other attributes.

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

         Mapping A

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

            2.   Where appropriate (P1 recipients), interpret the string
                 according to the semantics implied by the domain
                 defined attribute.

         Mapping B.

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

            1.   Noting the hierarchy specified in 4.3.1, determine the
                 maximum set of attributes which have an associated
                 domain specification. If no match is found, allocate
                 the domain as the domain specification of the local
                 gateway, and go to step 4.

            2.   Following the 4.3.1 hierarchy, if each successive
                 component exists, and conforms to the syntax
                 EBNF.domain-syntax (as defined in 4.3.1), allocate the
                 next subdomain.

            3.   If the remaining components are personal-name
                 components, conforming to the restrictions of 4.2.2,
                 then EBNF.encoded-pn should be derived to form
                 822.local-part.  In other cases the remaining
                 components should simply be encoded as a 822.local-part
                 using the EBNF.std-orname syntax.  Where registered
                 domain defined types exist, the DD. syntax should not
                 be used.

            4.   If this step is reached for an 822-P1 recipient, then
                 the address is invalid.  For other addresses, if the
                 derived 822.local-part can only be encoded by use of
                 822.quoted-string, the gateway may optionally use the
                 ASCII to 822.local-part mapping defined in Appendix A,
                 dependent on the mail protocols of the networks being
                 relayed to.  Use of this encoding is discouraged.