RFC 1138

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

๐Ÿ“… published December 1989, from ietf

Mapping between X.400(1988) / ISO 10021 and RFC 822 ๐Ÿ’Œโœจ

Network Working Group ๐ŸŒธ Request for Comments 1138 ๐ŸŽ€ Author: S. Kille, University College London ๐Ÿ’œ Updates: RFCs 822, 987, 1026 ๐Ÿฆ‹ Dated December 1989 ๐Ÿ“…

Status of this Memo ๐Ÿ“‹

okay so this RFC is basically suggesting an email protocol mapping for the Internet community and the UK Academic Community ๐ŸŽ“ and it's literally asking people to talk about it and send in ideas for making it better ๐Ÿ’ฌ bestie this is NOT an Internet standard (it's not officially a standard yet, so don't treat it like one ๐Ÿ™ˆ). And it's free for anyone to share, no limits ๐ŸŒˆ

This document describes a set of mappings that let systems running the CCITT X.400 (1988) Recommendations on Message Handling Systems / ISO IEC 10021 Message Oriented Text Interchange Systems (MOTIS) [CCITT/ISO88a] talk to systems that use the RFC 822 mail protocol [Crocker82a] or protocols based on RFC 822 ๐Ÿ’– The goal is to get as much functionality as possible across the boundary โœจ without making the mappings super complicated ๐Ÿ˜ญ and the mappings shouldn't need any changes to the end systems ๐Ÿซถ

This document is built on RFC 987 and RFC 1026 [Kille86a, Kille87a], which define a similar mapping for X.400 (1984) ๐Ÿงš It doesn't obsolete those earlier ones, because they cover a different domain of application ๐Ÿ’…

Specification ๐Ÿ”ฅ

this document specifies a mapping between two protocols ๐Ÿ’œ This specification should be used when the mapping is performed on the Internet or in the UK Academic Community ๐ŸŽ€ It may be modified based on implementation experience, but no substantial changes are expected ๐Ÿฆ‹

Table of Contents ๐Ÿ—‚๏ธ

   1.  Overview ...............................................    2
   1.1  X.400 .................................................    2
   1.2  RFC 822 ...............................................    3
   1.3  The need for conversion ...............................    4
   1.4  General approach ......................................    4
   1.5  Gatewaying Model ......................................    5
   1.6  RFC 987 ...............................................    7
   1.7  Aspects not covered ...................................    8
   1.8  Subsetting ............................................    9
   1.9  Document Structure ....................................    9
   1.10  Acknowledgements .....................................   10
   2.  Service Elements .......................................   10
   2.1  The Notion of Service Across a Gateway ................   10
   2.2  RFC 822 ...............................................   11
   2.3  X.400 .................................................   15
   3.   Basic Mappings ........................................   24
   3.1  Notation ..............................................   24
   3.2  ASCII and IA5 .........................................   25
   3.3  Standard Types ........................................   25
   3.4  Encoding ASCII in Printable String ....................   28
   4.  Addressing .............................................   29
   4.1  A textual representation of MTS.ORAddress .............   30
   4.2  Basic Representation ..................................   30
   4.3  EBNF.822-address <-> MTS.ORAddress ....................   34
   4.4  Repeated Mappings .....................................   43
   4.5  Directory Names .......................................   45
   4.6  MTS Mappings ..........................................   45
   4.7  IPMS Mappings ....... .................................   48
   5.  Detailed Mappings ......................................   52
   5.1  RFC 822 -> X.400 ......................................   52
   5.2  Return of Contents ....................................   59
   5.3  X.400 -> RFC 822 ......................................   60
   Appendix A  Differences with RFC 987 .......................   78
   1.  Introduction ...........................................   78
   2.  Service Elements .......................................   78
   3.  Basic Mappings .........................................   78
   4.  Addressing .............................................   78
   5.  Detailed Mappings ......................................   79
   6.  Appendices .............................................   79
   Appendix B  Mappings specific to the JNT Mail ..............   79
   1.  Introduction ...........................................   79
   2.  Domain Ordering ........................................   79
   3.  Acknowledge-To: ........................................   79
   4.  Trace ..................................................   80
   5.  Timezone specification .................................   80
   6.  Lack of 822-MTS originator specification ...............   80
   Appendix C  Mappings specific to UUCP Mail .................   81
   Appendix D  Object Identifier Assignment ...................   82
   Appendix E  BNF Summary ....................................   82
   Appendix F  Format of address mapping tables ...............   89
   References .................................................   91

1. Overview ๐ŸŒˆ

1.1. X.400

this doc is about the CCITT 1988 X.400 Series Recommendations / ISO IEC 10021 on the Message Oriented Text Interchange Service (MOTIS) ๐Ÿ’Œ We call that standard "X.400" for short, which is way easier to type ๐Ÿ˜ญ If we mean the 1984 CCITT Recommendations, we'll say so explicitly ๐Ÿ’… X.400 defines an Interpersonal Messaging System (IPMS) that runs on a store and forward Message Transfer System โœจ This document is only about the IPMS, not the wider uses of X.400 ๐ŸŽ€ and it's expected that X.400 will get implemented super widely ๐ŸŒ

1.2. RFC 822

RFC 822 is the current messaging standard on the Internet ๐Ÿ’– it grew up alongside the network, going from the ARPANET (created by the Defense Advanced Research Projects Agency) to the Internet, which now involves over 1000 networks and is sponsored by DARPA, NSF, DOE, NASA, and NIH ๐Ÿฆ‹ It specifies an end to end message format, and it gets used with a bunch of different message transfer protocol environments ๐Ÿงš

  • SMTP Networks
    • on the Internet and other TCP/IP networks, RFC 822 is used with two other standards: RFC 821, also known as Simple Mail Transfer Protocol (SMTP) [Postel82a], and RFC 1034, which is a Specification for domains and a distributed name service [Mockapetris87a] ๐ŸŒธ
  • UUCP Networks
    • UUCP is the UNIX to UNIX CoPy protocol, usually run over dialup telephone networks to provide a simple message transfer mechanism ๐Ÿ“ž There are some extensions to RFC 822, mostly in the addressing ๐Ÿ’… They use domains that conform to RFC 1034, but not the corresponding domain nameservers [Horton86a] ๐Ÿ™ˆ
  • Csnet
    • some parts of Csnet follow the Internet protocols ๐ŸŒ The dialup portion uses the Phonenet protocols as a replacement for RFC 821 ๐Ÿ“ฑ This portion uses domains that conform to RFC 1034, but not the corresponding domain nameservers ๐Ÿ“
  • Bitnet
    • some parts of Bitnet and related networks use RFC 822 related protocols, with EBCDIC encoding ๐Ÿ’œ
  • JNT Mail Networks
    • a number of X.25 networks, especially those associated with the UK Academic Community, use the JNT (Joint Network Team) Mail Protocol, also known as Greybook [Kille84a] ๐ŸŽ“ This is used with domains and name service specified by the JNT NRS (Name Registration Scheme) [Larmouth83a] โœจ
    • the mappings specified here are appropriate for all of these networks ๐Ÿซถ

1.3. The need for conversion

there's a huge community using RFC 822 based protocols for mail, and they're going to want to talk to people using the IPMS from X.400 systems ๐Ÿ’Œ This will also be needed when communities move over to an X.400 IPMS, because conversion is required for a smooth transition ๐Ÿ”ฅ It's expected that there will be more than one gateway, and this specification lets them all behave consistently ๐ŸŽ€ The term gateway here means a component that does the protocol mappings between RFC 822 and X.400 ๐Ÿ’– This is standard usage among mail implementors, but transport and network service implementors should note it carefully ๐Ÿ‘‘

Consistency between gateways is desirable so you get:

  1. Consistent service to users. ๐Ÿ’…
  2. The best service when a message passes through multiple gateways. โœจ

1.4. General approach

there are a few basic principles behind the details of this spec ๐Ÿงš These principles are goals, and they aren't achieved in every single aspect of the specification ๐Ÿ™ˆ

  1. The specification should be pragmatic. There shouldn't be a requirement for complex mappings for "Academic" reasons ๐Ÿ“š Complex mappings shouldn't be needed to support trivial extra functionality ๐Ÿ’€
  2. Subject to 1), functionality across a gateway should be as high as possible. ๐ŸŒˆ
  3. It is always a bad idea to lose information as a result of any transformation. So it's a bad idea for a gateway to discard information in the objects it processes. This includes requested services which can't be fully mapped. ๐Ÿ˜ญ๐Ÿซถ
  4. All mail gateways actually operate at exactly one level above the layer on which they conceptually operate. This implies that the gateway must not only understand the semantics of objects at the gateway level, but also higher level semantics ๐Ÿ”ฅ If meaningful transformation of the objects the gateway operates on is going to happen, the gateway needs to understand more than the objects themselves ๐Ÿง 
  5. The specification should be reversible. That is, a double transformation should bring you back to where you started. ๐Ÿฆ‹

1.5. Gatewaying Model ๐ŸŒ‰

1.5.1. X.400 ๐Ÿ’Œ

okay so X.400 defines the IPMS Abstract Service in X.420/ISO 10021-7, [CCITT/ISO88b], and it comes with three basic services, bestie:

  1. Origination
  2. Reception
  3. Management

Management is just a local vibe between the user and the IPMS, so it's not relevant to gatewaying ๐Ÿ™ˆ. The first two services are all about operations for originating and receiving these two objects:

  1. IPM (Interpersonal Message). This one has two components: a heading and a body. The body is a sequence of body parts, which can be basic components (e.g., IA5 text, or G3 fax) or IP Messages. The heading is full of fields with end to end user info, like subject, primary recipients (To:), and importance ๐Ÿ’–.
  2. IPN (Inter Personal Notification). A notification about receipt of a given IPM at the UA level ๐Ÿ””.

Origination also lets you send a probe, which is an object that tests whether a given IPM could be correctly received ๐Ÿงช. Reception lets you get Delivery Reports (DR), which tell you whether delivery succeeded or failed ๐Ÿ“ฌ.

These IPMS Services utilise the Message Transfer (MT) Abstract Service [CCITT/ISO88c]. The MT Abstract Service has three basic services:

  1. Submission (used by IPMS Origination)
  2. Delivery (used by IPMS Reception)
  3. Administration (used by IPMS Management)

Administration is a local issue, so it doesn't affect this standard. Submission and delivery mostly relate to the MTS Message (Envelope and Content), which carries an IPM or IPN (or other uninterpreted contents). There's also an Envelope, which includes an ID, an originator, and a list of recipients. Submission also includes the probe service, which supports the IPMS Probe. Delivery also includes Reports, which indicate whether a given MTS Message has been delivered or not โœจ.

The MTS is REFINED into the MTA (Message Transfer Agent) Service, which defines the interaction between MTAs, along with the procedures for distributed operation. This service provides for transfer of MTS Messages, Probes, and Reports ๐Ÿšš.

1.5.2. RFC 822 ๐Ÿ“ฎ

RFC 822 assumes there's an underlying service, called here the 822-MTS service. It does three basic functions:

  1. Identification of a list of recipients.
  2. Identification of an error return address.
  3. Transfer of an RFC 822 message.

It is possible to achieve 2) within the RFC 822 header. Some 822-MTS protocols, in particular SMTP, can provide extra functionality, but since these are neither mandatory in SMTP nor available in other 822-MTS protocols, they're not considered here ๐Ÿ™…โ€โ™€๏ธ. Details of aspects specific to two 822-MTS protocols are in Appendices B and C. An RFC 822 message is a header plus content, which is uninterpreted ASCII text. The header is split into fields, which are the protocol elements. Most of these fields are analogous to P2 heading fields, although some are analogous to MTS Service Elements or MTA Service Elements ๐ŸŽ€.

1.5.3. The Gateway ๐ŸŒ‰

Now that we've got this functional description of the two services, we can think about what a gateway actually is. It would be elegant to map the 822-MTS service onto the MTS Service Elements and RFC 822 onto an IPM, but reality just does not fit ๐Ÿ˜ญ. Another elegant idea would be to treat this document as the definition of an X.400 Access Unit (AU). Again, reality does not fit. We have to accept that the IPM format definition, the IPMS Service Elements, the MTS Service Elements, and MTA Service Elements on one side get mapped into RFC 822 + 822-MTS on the other in a slightly tangled manner. The details of the tangle will be made clear in Chapter 5. Access to the MTA Service Elements is minimised ๐Ÿซถ.

The following basic mappings are thus defined. Going from RFC 822 to X.400, an RFC 822 message and its associated 822-MTS information is always mapped into an IPM (MTA, MTS, and IPMS Services). Going from X.400 to RFC 822, an RFC 822 message and its associated 822-MTS information may be derived from:

  1. A Report (MTA, and MTS Services)
  2. An IPN (MTA, MTS, and IPMS Services)
  3. An IPM (MTA, MTS, and IPMS Services)

Probes (MTA Service) must be processed by the gateway, as discussed in Chapter 5. MTS Messages containing Content Types other than those defined by the IPMS are not mapped by the gateway, and should be rejected at the gateway ๐Ÿšซ.

1.5.4. Repeated Mappings ๐Ÿ”

The mappings specified here are designed to work where a message traverses multiple times between X.400 and RFC 822. This is often essential, particularly in the case of distribution lists. However, in general this will lead to a level of service which is the lowest common denominator (approximately the services offered by RFC 822). In particular, there is no expectation of additional X.400 services being mapped, although this may be possible in some cases ๐Ÿฅฒ.


1.6. RFC 987 ๐Ÿฆ‹

Much of this work is based on the initial specification of RFC 987 and its addendum, RFC 1026. A basic decision is that the mapping will be to the full 1988 version of X.400, and not to a 1984 compatible subset. This is important, to give good support to communities which will utilise full X.400 at an early date ๐Ÿ‘‘. This has the following implications:

  • This document does not obsolete RFC 987, as it has a different domain of application.
  • If a gatewayed message is being transferred to a 1984 system, then RFC 987 should be used. If the X.400 side of the gateway is a 1988 system, then it should be operated in 1984 compatibility mode. There is no advantage and some disadvantage in using the new mapping, and later on applying X.400 downgrading rules. Note that in an environment where RFC 822 is of major importance, it may be desirable for downgrading to consider the case where the message was originated in an RFC 822 system and mapped according to this specification.
  • New features of X.400 can be used to provide a much cleaner mapping than that defined in RFC 987 โœจ.

Unnecessary change is usually a bad idea ๐Ÿ™…โ€โ™€๏ธ. Changes on the RFC 822 side are avoided as far as possible, so that RFC 822 users don't see arbitrary differences between systems conforming to this specification and those following RFC 987. Changes on the X.400 side are minimised, but are more acceptable, due to the mapping onto a new set of services and protocols.

A summary of changes made is given in Appendix A ๐Ÿ“.

1.7. Aspects not covered ๐Ÿ™ˆ

There have been a number of cases where RFC 987 was used in a manner which was not intended. This section makes clear some limitations of scope. In particular, this specification does not specify:

  • Extensions of RFC 822 to provide access to all X.400 services
  • X.400 user interface definition

These are really coupled. To map the X.400 services, this specification defines a number of extensions to RFC 822. As a side effect, these give the 822 user access to SOME X.400 services. However, the aim on the RFC 822 side is to preserve current service, and it is intentional that access is not given to all X.400 services. Thus, it will be a poor choice for X.400 implementors to use RFC 987(88) as an interface, since there are too many aspects of X.400 which cannot be accessed through it. If a text interface is desired, a specification targeted at X.400, without RFC 822 restrictions, would be more appropriate ๐Ÿ’….

1.8. Subsetting ๐Ÿ“

This proposal specifies a mapping which is appropriate to preserve services in existing RFC 822 communities. Implementations and specifications which subset this specification are strongly discouraged ๐Ÿšซ.

1.9. Document Structure ๐Ÿ—บ๏ธ

This document has five chapters:

  1. Overview - this chapter.
  2. Service Elements - This describes the (end user) services mapped by a gateway.
  3. Basic mappings - This describes some basic notation used in Chapters 3-5, the mappings between character sets, and some fundamental protocol elements.
  4. Addressing - This considers the mapping between X.400 O/R names and RFC 822 addresses, which is a fundamental gateway component.
  5. Detailed Mappings - This describes the details of all other mappings.

There are also six appendices:

  • A. Differences with RFC 987
  • B. Mappings Specific to JNT Mail
  • C. Mappings Specific to UUCP Mail
  • D. Object Identifier Assignment
  • E. BNF Summary
  • F. Format of Address Tables
WARNING: THE REMAINDER OF THIS SPECIFICATION IS TECHNICALLY DETAILED. IT WILL NOT MAKE SENSE, EXCEPT IN THE CONTEXT OF RFC 822 AND X.400 (1988). DO NOT ATTEMPT TO READ THIS DOCUMENT UNLESS YOU ARE FAMILIAR WITH THESE SPECIFICATIONS. ๐Ÿ’€

1.10. Acknowledgements ๐Ÿ’œ

This work was partly sponsored by the Joint Network Team. The workshop at UCL in June 1989 to work on this specification was also an IFIP WG 6.5 meeting ๐ŸŒธ.

The work in this specification was substantially based on RFC 987, which had input from many people.

Useful comments and suggestions were made by Pete Cowen (Nottingham Univ), Jim Craigie (JNT), Christian Huitema (Inria), Peter Lynch (Prime), Julian Onions (Nottingham Univ), Sandy Shaw (Edinburgh Univ), Einar Stefferud (NMA), and Peter Sylvester (GMD) ๐Ÿซถ.

Chapter 2 -- Service Elements โœจ

This chapter considers the services offered across a gateway built according to this specification. It gives a view of the functionality provided by such a gateway for communication with users in the opposite domain. This chapter considers service mappings in the context of SINGLE transfers only, and not repeated mappings through multiple gateways ๐ŸŽ€.

2.1. The Notion of Service Across a Gateway ๐ŸŒˆ

RFC 822 and X.400 provide a number of services to the end user. This chapter describes the extent to which each service can be supported across an X.400 <-> RFC 822 gateway. The cases considered are single transfers across such a gateway, although the problems of multiple crossings are noted where appropriate ๐Ÿฆ‹.

2.1.1. Origination of Messages โœจ

Okay bestie, so when a user originates a message ๐Ÿ’Œ, there's a whole buffet of services on offer ๐Ÿ“. Some of them trigger actions, like actually delivering the thing to a recipient ๐Ÿ“ฌ, and some just slip in known data, like filling out a subject line ๐ŸŽ€. This chapter spells out, for each service, how well it survives the trip to a recipient accessed through a gateway ๐Ÿšช. There are three levels of support:

  • Supported: the matching protocol elements map well, so the service can be fully provided ๐Ÿ’–.
  • Not Supported: there's a complete mismatch, so the service just can't be provided ๐Ÿ˜ญ.
  • Partial Support: the service can be partly fulfilled ๐ŸŒธ.

In the first two cases, the service is simply marked as "Supported" or "Not Supported" ๐Ÿ’…. Sometimes we add a little explanation if there are extra implications or the (non) support isn't intuitive ๐Ÿ™ˆ. For partial support, we summarise the level. Where partial support is pretty good, it gets described with a phrase like "Supported by use of.....". A common case is when the service gets mapped onto a non-standard service on the other side of the gateway, which would've counted as support if it had been a standard service ๐Ÿงš. In lots of cases, that's basically equivalent to support โœจ. For partial support, we also give an indication of the mechanism, so you get a feel for how much support is actually provided ๐Ÿฆ‹. Note that this is not a replacement for Chapter 5, where the mapping is fully specified ๐Ÿ“–.

If a service is described as supported, this implies:

  • Semantic correspondence.
  • No (significant) loss of information.
  • Any actions required by the service element.

An example of a service gaining full support: if an RFC 822 originator specifies a Subject: field, this is considered to be supported, as an X.400 recipient will get a subject indication ๐ŸŽ€โœจ.

All RFC 822 services are supported or partially supported for origination ๐ŸŒˆ. The implications of non-supported X.400 services is described under X.400 ๐Ÿซถ.

2.1.2. Reception of Messages ๐Ÿ“ฅ

For reception, the list of service elements required to support this mapping is specified. This is really an indication of what a recipient might expect to see in a message which has been remotely originated ๐Ÿ‘€.


2.2. RFC 822 ๐Ÿ’Œ

RFC 822 doesn't explicitly define service elements as distinct from protocol elements ๐Ÿค“. However, all of the RFC 822 header fields, with the exception of trace, can be regarded as corresponding to implicit RFC 822 service elements ๐Ÿ’œ.

2.2.1. Origination in RFC 822 ๐ŸŒธ

A mapping mechanism, used in several cases, is to map the RFC 822 header into a heading extension in the IPM (InterPersonal Message) ๐Ÿง. This can be regarded as partial support, as it makes the information available to any X.400 implementations that are interested in these services. Communities that need significant RFC 822 interworking should require that their X.400 User Agents are able to display these heading extensions ๐Ÿ”ฅ. Support for the various service elements (headers) is listed below ๐Ÿ‘‡.

  • Date:: Supported.
  • From:: Supported. For messages where there is also a sender field, the mapping is to "Authorising Users Indication", which has subtly different semantics to the general RFC 822 usage of From: ๐Ÿค”.
  • Sender:: Supported.
  • Reply-To:: Supported.
  • To:: Supported.
  • Cc:: Supported.
  • Bcc:: Supported.
  • Message-Id:: Supported.
  • In-Reply-To:: Supported, for a single reference. Where multiple references are given, partial support is given by mapping to "Cross Referencing Indication". This gives similar semantics ๐Ÿฆ‹.
  • References:: Supported.
  • Keywords:: Supported by use of a heading extension.
  • Subject:: Supported.
  • Comments:: Supported by use of an extra body part.
  • Encrypted:: Supported by use of a heading extension.
  • Resent-*: Supported by use of a heading extension. Note that addresses in these fields are mapped onto text, so they aren't accessible to the X.400 user as addresses ๐Ÿ˜ญ. In principle, fuller support would be possible by mapping onto a forwarded IP Message, but this is not suggested ๐Ÿ™ˆ.
  • Other Fields: In particular, X-* fields and "illegal" fields in common usage (e.g., "Fruit-of-the-day:") are supported by use of heading extensions ๐Ÿ“๐Ÿ’€.

2.2.2. Reception by RFC 822 ๐Ÿ“ฌ

This considers reception by an RFC 822 User Agent of a message originated in an X.400 system and transferred across a gateway ๐ŸŒ‰. The following standard services (headers) may be present in such a message:

  • Date:
  • From:
  • Sender:
  • Reply-To:
  • To:
  • Cc:
  • Bcc:
  • Message-Id:
  • In-Reply-To:
  • References:
  • Subject:

The following non-standard services (headers) may be present. These are defined in more detail in Chapter 5 (5.3.4, 5.3.6, 5.3.7) ๐Ÿ“–โœจ:

  • Autoforwarded:
  • Content-Identifier:
  • Conversion:
  • Conversion-With-Loss:
  • Delivery-Date:
  • Discarded-X400-IPMS-Extensions:
  • Discarded-X400-MTS-Extensions:
  • DL-Expansion-History:
  • Deferred-Delivery:
  • Expiry-Date:
  • Importance:
  • Incomplete-Copy:
  • Language:
  • Latest-Delivery-Time:
  • Message-Type:
  • Obsoletes:
  • Original-Encoded-Information-Types:
  • Originator-Return-Address:
  • Priority:
  • Redirection-History:
  • Reply-By:
  • Requested-Delivery-Method:
  • Sensitivity:
  • X400-Content-Type:
  • X400-MTS-Identifier:
  • X400-Originator:
  • X400-Received:
  • X400-Recipients:

2.3. X.400 ๐ŸŒท

2.3.1. Origination in X.400 ๐Ÿ’ซ

When mapping services from X.400 to RFC 822 that aren't supported by RFC 822, new RFC 822 headers are defined ๐Ÿ› ๏ธ. It's intended that these fields will be registered, and that co-operating RFC 822 systems may use them. Where these new fields are used and no system action is implied, the service can be regarded as partially supported ๐Ÿฆ‹. Chapter 5 describes how to map X.400 services onto these new headers. Other elements are provided, in part, by the gateway, as they cannot be provided by RFC 822 ๐Ÿšช.

Some service elements are marked N/A (not applicable). There are five cases, marked with different comments ๐Ÿ™ƒ:

  • N/A (local): These elements are only applicable to User Agent / Message Transfer Agent interaction, so they cannot apply to RFC 822 recipients.
  • N/A (PDAU): These service elements are only applicable where the recipient is reached by use of a Physical Delivery Access Unit (PDAU), so they do not need to be mapped by the gateway.
  • N/A (reception): These services are only applicable for reception.
  • N/A (prior): If requested, this service must be performed prior to the gateway.
  • N/A (MS): These services are only applicable to Message Store (i.e., a local service).

Finally, some service elements are not supported ๐Ÿ˜ญ. In particular, the new security services are not mapped onto RFC 822. Unless otherwise indicated, the behaviour of service elements marked as not supported will depend on the criticality marking supplied by the user. If the element is marked as critical for transfer or delivery, a non-delivery notification will be generated. Otherwise, the service request will be ignored ๐Ÿ’€.

2.3.1.1. Basic Interpersonal Messaging Service ๐Ÿ“ฎ

These are the mandatory IPM services as listed in Section 19.8 of X.400 / ISO/IEC 10021-1, listed here in the order given. Section 19.8 has cross references to short definitions of each service ๐Ÿ“š.

  • Access management: N/A (local).
  • Content Type Indication: Supported by a new RFC 822 header (Content-Type:).
  • Converted Indication: Supported by a new RFC 822 header (X400-Received:).
  • Delivery Time Stamp Indication: N/A (reception).
  • IP Message Identification: Supported.
  • Message Identification: Supported, by use of a new RFC 822 header (X400-MTS-Identifier). This new header is required, as X.400 has two message-ids whereas RFC 822 has only one (see previous service) ๐Ÿซ .
  • Non-delivery Notification: Not supported, although in general an RFC 822 system will return error reports by use of IP messages. In other service elements, this pragmatic result can be treated as effective support of this service element ๐Ÿ™Œ.
  • Original Encoded Information Types Indication: Supported as a new RFC 822 header (Original-Encoded-Information-Types:).
  • Submission Time Stamp Indication: Supported.
  • Typed Body: Some types supported. IA5 is fully supported. ForwardedIPMessage is supported, with some loss of information. Other types get some measure of support, dependent on X.400 facilities for conversion to IA5. This will only be done where content conversion is not prohibited ๐Ÿงฉ.
  • User Capabilities Registration: N/A (local).

2.3.1.2. IPM Service Optional User Facilities โœจ

okay so this bit covers the optional (user-selectable) IPM services from Section 19.9 of X.400 / ISO/IEC 10021- 1 ๐ŸŽ€. We go through them in the exact order they're listed, and Section 19.9 has cross references to short definitions of each one ๐Ÿ’…

  • Additional Physical Rendition: N/A (PDAU).
  • Alternate Recipient Allowed: Not supported. RFC 822 has no service equivalent to prohibiting alternate recipient assignment (e.g., an RFC 822 system may freely send an undeliverable message to a local postmaster), so the gateway cannot prevent assignment of alternative recipients on the RFC 822 side. This service really means giving the user control over whether or not an alternate recipient is allowed. This specification requires transfer of messages to RFC 822 regardless of this service request, so this service is not supported ๐Ÿ™ˆ
  • Authorising User's Indication: Supported.
  • Auto-forwarded Indication: Supported as new RFC 822 header (Auto-Forwarded:).
  • Basic Physical Rendition: N/A (PDAU).
  • Blind Copy Recipient Indication: Supported.
  • Body Part Encryption Indication: Supported by use of a new RFC 822 header (Original-Encoded-Information-Types:), although in most cases it will not be possible to map the body part in question.
  • Content Confidentiality: Not supported.
  • Content Integrity: Not supported.
  • Conversion Prohibition: Supported. In this case, only messages with IA5 body parts, messages whose other body parts contain only IA5, and Forwarded IP Messages (subject recursively to the same restrictions) will be mapped ๐Ÿฆ‹
  • Conversion Prohibition in Case of Loss of Information: Supported.
  • Counter Collection: N/A (PDAU).
  • Counter Collection with Advice: N/A (PDAU).
  • Cross Referencing Indication: Supported.
  • Deferred Delivery: N/A (prior). This service should always be provided by the MTS prior to the gateway. A new RFC 822 header (Deferred-Delivery:) is provided to pass information about this service on to the recipient.
  • Deferred Delivery Cancellation: N/A (local).
  • Delivery Notification: Supported. This is performed at the gateway, so a notification is sent by the gateway to the originator. If the 822-MTS protocol is JNT Mail, a notification may also be sent by the recipient UA.
  • Delivery via Bureaufax Service: N/A (PDAU).
  • Designation of Recipient by Directory Name: N/A (local).
  • Disclosure of Other Recipients: Supported by use of a new RFC 822 header (X400-Recipients:). This is descriptive information for the RFC 822 recipient and is not reverse mappable.
  • DL Expansion History Indication: Supported by use of a new RFC 822 header (DL-Expansion-History:).
  • DL Expansion Prohibited: Here "Distribution List" means an MTS-supported distribution list, in the manner of X.400. That doesn't exist in the RFC 822 world. RFC 822 distribution lists should be treated as an informal redistribution mechanism, which is outside the scope of this control. Messages will be sent to RFC 822 whether or not this service is requested. So theoretically this service is supported, even though in practice it may look like it isn't ๐Ÿคทโ€โ™€๏ธ
  • Express Mail Service: N/A (PDAU).
  • Expiry Date Indication: Supported as new RFC 822 header (Expiry-Date:). In general, no automatic action can be expected.
  • Explicit Conversion: N/A (prior).
  • Forwarded IP Message Indication: Supported, with some loss of information. The message is forwarded in an RFC 822 body, so it can only be interpreted visually.
  • Grade of Delivery Selection: N/A (PDAU)
  • Importance Indication: Supported as new RFC 822 header (Importance:).
  • Incomplete Copy Indication: Supported as new RFC 822 header (Incomplete-Copy:).
  • Language Indication: Supported as new RFC 822 header (Language:).
  • Latest Delivery Designation: Not supported. A new RFC 822 header (Latest-Delivery-Time:) is provided, which the recipient may use.
  • Message Flow Confidentiality: Not supported.
  • Message Origin Authentication: N/A (reception).
  • Message Security Labelling: Not supported.
  • Message Sequence Integrity: Not supported.
  • Multi-Destination Delivery: Supported.
  • Multi-part Body: Supported, with some loss of information, because the structuring cannot be formalised in RFC 822 ๐ŸŒˆ
  • Non Receipt Notification Request: Not supported.
  • Non Repudiation of Delivery: Not supported.
  • Non Repudiation of Origin: N/A (reception).
  • Non Repudiation of Submission: N/A (local).
  • Obsoleting Indication: Supported as new RFC 822 header (Obsoletes:).
  • Ordinary Mail: N/A (PDAU).
  • Originator Indication: Supported.
  • Originator Requested Alternate Recipient: Not supported, but it is placed as a comment next to the address (X400-Recipients:).
  • Physical Delivery Notification by MHS: N/A (PDAU).
  • Physical Delivery Notification by PDS: N/A (PDAU).
  • Physical Forwarding Allowed: Supported by use of a comment in a new RFC 822 header (X400-Recipients:), associated with the recipient in question.
  • Physical Forwarding Prohibited: Supported by use of a comment in a new RFC 822 header (X400-Recipients:), associated with the recipient in question.
  • Prevention of Non-delivery notification: Supported, since delivery notifications cannot be generated by RFC 822. In practice, errors will be returned as IP Messages, so this service may appear not to be supported (see Non-delivery Notification) ๐Ÿ™ƒ
  • Primary and Copy Recipients Indication: Supported.
  • Probe: Supported at the gateway, meaning the gateway services the probe.
  • Probe Origin Authentication: N/A (reception).
  • Proof of Delivery: Not supported.
  • Proof of Submission: N/A (local).
  • Receipt Notification Request Indication: Not supported.
  • Redirection Allowed by Originator: Here "redirection" means MTS-supported redirection, in the manner of X.400. That doesn't exist in the RFC 822 world. RFC 822 redirection (e.g., aliasing) should be treated as an informal redirection mechanism, which is outside the scope of this control. Messages will be sent to RFC 822 whether or not this service is requested. So theoretically this service is supported, even though in practice it may look like it isn't ๐Ÿงš
  • Registered Mail: N/A (PDAU).
  • Registered Mail to Addressee in Person: N/A (PDAU).
  • Reply Request Indication: Supported as a comment next to the address.
  • Replying IP Message Indication: Supported.
  • Report Origin Authentication: N/A (reception).
  • Request for Forwarding Address: N/A (PDAU).
  • Requested Delivery Method: N/A (local). The services required must be dealt with at submission time. Any such request is made available through the gateway by a comment associated with the recipient in question.
  • Return of Content: In principle this is N/A, since non-delivery notifications are not supported. In practice, most RFC 822 systems will return part or all of the content along with the IP Message indicating an error (see Non-delivery Notification).
  • Sensitivity Indication: Supported as new RFC 822 header (Sensitivity:).
  • Special Delivery: N/A (PDAU).
  • Stored Message Deletion: N/A (MS).
  • Stored Message Fetching: N/A (MS).
  • Stored Message Listing: N/A (MS).
  • Stored Message Summary: N/A (MS).
  • Subject Indication: Supported.
  • Undeliverable Mail with Return of Physical Message: N/A (PDAU).
  • Use of Distribution List: In principle this applies only to X.400-supported distribution lists (see DL Expansion Prohibited). Theoretically this service is N/A (prior). In practice, because of informal RFC 822 lists, it can be regarded as supported.

2.3.2. Reception by X.400

2.3.2.1. Standard Mandatory Services

The following standard IPM mandatory user facilities may be required for reception of RFC 822 originated mail by an X.400 UA ๐Ÿ“ฌ

  • Content Type Indication
  • Delivery Time Stamp Indication
  • IP Message Identification
  • Message Identification
  • Non-delivery Notification
  • Original Encoded Information Types Indication
  • Submission Time Stamp Indication
  • Typed Body

2.3.2.2. Standard Optional Services

The following standard IPM optional user facilities may be required for reception of RFC 822 originated mail by an X.400 UA ๐ŸŒธ

  • Authorising User's Indication
  • Blind Copy Recipient Indication
  • Cross Referencing Indication
  • Originator Indication
  • Primary and Copy Recipients Indication
  • Replying IP Message Indication
  • Subject Indication

2.3.2.3. New Services

A new service "RFC 822 Header Field" is defined using the extension facilities. This lets any RFC 822 header field be represented. It may be present in RFC 822 originated messages that are received by an X.400 UA. Main character energy ๐Ÿ‘‘


Chapter 3 -- Basic Mappings โœจ

3.1. Notation

X.400 protocols are encoded in a structured way according to ASN.1, whereas RFC 822 is text encoded ๐Ÿซถ So if we want a detailed mapping, we need to be able to point at specific protocol elements in each format. This section describes a notation that lets us do exactly that ๐Ÿ’–

3.1.1. RFC 822 ๐Ÿ“ฎ

okay so structured text is defined with the EBNF from Section 2 of RFC 822 [Crocker82a], which is literally the grammar RFC 822 itself runs on ๐Ÿ’…. In the EBNF definitions in this spec, the syntax rules in Appendix D of RFC 822 are assumed. When you use these EBNF tokens outside an EBNF definition, you put the string "822." on the front (like 822.addr-spec). Any extra syntax rules used across this spec get defined in this chapter โœจ

The EBNF gets used in two different ways, and each one has its own job ๐Ÿซถ

  1. To describe components of RFC 822 messages (or of 822-MTS components). For this, the lexical analysis defined in Section 3 of RFC 822 should be used. When these new EBNF tokens are referred to outside an EBNF definition, they get the string "EBNF." on the front (e.g., EBNF.bilateral-info).
  2. To describe the structure of IA5 or ASCII information that isn't 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.

3.1.2. ASN.1 ๐Ÿงฉ

here's how you refer to an element, written 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 these 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 names a type or value key in the context of the defined service specification. The ones after that name a value label or type inside the first identifier (SET or SEQUENCE). EBNF.context is a context tag, and it's used when there's no label or type that can uniquely identify a component. The special EBNF.identifier keyword "value" is how you denote an element of a sequence โœจ

for example, IPMS.Heading.subject defines the subject element of the IPMS heading. The same syntax works for element values too. MTS.EncodedInformationTypes.[0].g3Fax refers to a value of MTS.EncodedInformationTypes.[0]. โญ

3.2. ASCII and IA5 ๐ŸŒธ

a gateway will interpret all IA5 as ASCII. So mapping between these two forms is conceptual, not a real conversion ๐Ÿฆ‹

3.3. Standard Types ๐ŸŽ€

there's 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 throughout this specification, and it 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 should be 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) should be used [CCITT/ISO88a]. These will then be encoded in ASCII.

there's 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 bunch 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 has an optional day of the week, but that's redundant. So a symmetrical mapping can be made between these two 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.

the UTCTime format which specifies the timezone offset should be used ๐ŸŒ

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 called labelled-integer is provided. When mapping from EBNF to ASN.1, only the integer value is mapped, and the associated text is discarded. When mapping from ASN.1 to EBNF, adding an appropriate text label is strongly encouraged ๐Ÿท๏ธ

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

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

3.3.7. Object Identifier ๐Ÿ†”

object identifiers are represented in a form similar to the one given in ASN.1. The numbers are mandatory, to ease encoding. It is recommended that as many strings as possible are used, to facilitate user recognition ๐Ÿง 

object-identifier ::= [ defined-value ] oid-comp-list
oid-comp-list ::= oid-comp oid-comp-list
                | oid-comp

defined-value ::= key-string

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

3.4. Encoding ASCII in Printable String ๐Ÿ–‹๏ธ

some information in RFC 822 is represented in ASCII, and it 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 defined now. This is what you use to encode ASCII in the PrintableString character set:

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 it's read in decimal as the matching ASCII character. Special encodings exist for: at sign (@), percent (%), exclamation mark/bang (!), double quote ("), underscore (_), left bracket ((), and right bracket ()). These characters, except for the round brackets, aren't in PrintableString, but they show up all the time in RFC 822 addresses. The abbreviations make it easier to spell out RFC 822 addresses from an X.400 system. These special encodings should be mapped 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 (the ones with round braces) can't be generated from ASCII. So this mapping must only be used where the printable strings can only come from ASCII (and so have a restricted domain). For example, in this specification it's only applied to a Domain defined attribute that will have been generated by this specification, and a value such as "(" wouldn't be possible ๐Ÿ™ˆ

to encode ASCII as PrintableString, use the EBNF.ps-encoded syntax, with all EBNF.ps-restricted-char mapped directly. All other 822.CHAR values get encoded as EBNF.ps-encoded-char.

to encode PrintableString as ASCII, parse the PrintableString as EBNF.ps-encoded, and then reverse the previous mapping. If the PrintableString can't be parsed, then the mapping is being applied to an inappropriate value, and an error should be given to the procedure doing the mapping. In some cases, it may be preferable to pass the printable string through unaltered ๐Ÿซถ

some examples are next. Note the arrows, which show the 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)               <->   (

4. Addressing ๐Ÿ—บ๏ธ

addressing is probably the trickiest problem of an X.400 <-> RFC 822 gateway, so it gets its own chapter ๐Ÿ˜ญ This chapter also, as a side effect, defines a textual representation of an X.400 O/R Address.

first we look at 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 should be considered to be defined by a construct like this. In an RFC 822 header, the EBNF.822-address gets wrapped 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, which the MTS uses for routing, is defined by MTS.ORAddress. In IPMS, the MTS.ORAddress is wrapped inside 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's clearly necessary to be able to encode this in ASCII for gatewaying purposes. Everything should be encoded, in order to guarantee return of error messages, and to optimise third party replies ๐Ÿ’–

4.2. Basic Representation

Okay bestie, so every O/R Address is basically a bag of attributes โœจ. Some are unstructured, and for those we give each one a key and an encoding ๐ŸŽ€. Structured X.400 attributes get chopped up and mapped onto one or more attribute value pairs ๐Ÿ’…. For domain defined attributes, each element of the sequence turns into a triple (a key and two values), and both values share the same encoding ๐Ÿฆ‹. The table below has the 1984 attributes first, then the 88 only ones, with the X.402 / ISO 10021-2 section references and, for the 88 only attributes, the extension identifier ๐ŸŒธ.

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           N       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
MTS.PDSName                         PD-SYSTEM      P       18.3.11   7
MTS.PhysicalDeliveryCountryName     PD-C           P       18.3.13   8
MTS.PostalCode                      POSTCODE       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-D       P/T     18.3.4   12
MTS.PhysicalDeliveryPersonName      PD-PN          P/T     18.3.17  13
MTS.PhysicalDelivery                PD-O           P/T     18.3.16  14
   OrganizationName
MTS.ExtensionPhysicalDelivery
   AddressComponents                PD-EXT-LOC     P/T     18.3.5   15
MTS.UnformattedPostalAddress        PD-ADDRESS     P/T     18.3.25  16
MTS.StreetAddress                   STREET         P/T     18.3.22  17
MTS.PostOfficeBoxAddress            PO-BOX         P/T     18.3.18  18
MTS.PosteRestanteAddress            POSTE-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                    NET-TTYPE      I       18.3.24  23

Next up, the keys that tell you which encoding each one uses. These are the EBNF encodings tied to 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 comes from the spec "A String Encoding of Presentation Address" [Kille89a] ๐Ÿ“š.

Most of the time, the EBNF encoding maps straight across to the ASN.1 encoding of the attribute, but there are a few plot twists ๐Ÿ™ˆ. When an attribute could be either a PrintableString or a NumericString (that's Country, ADMD, and PRMD), either form can be mapped into the BNF. When you're generating ASN.1, though, the NumericString encoding is the one to use if the string only has digits ๐Ÿ”ข.

There are also a bunch of cases with the P/T (teletex-and-or-ps) representation. When the key maps to a single attribute, that choice shows up in the attribute's encoding (attributes 10-21). For most of the 1984 attributes and common name, you get a printablestring version and a teletex version. This pair gets squished into one component here, which gives a clean mapping for the common cases where only one form of the name gets used ๐Ÿ’–.

4.2.1. Encoding of Personal Name

Handling Personal Name and Teletex Personal Name purely with the EBNF.standard-type syntax from above would be kind of clumsy ๐Ÿ˜ญ. So it's nicer to use the "human" conventions for these parts. The syntax below gives a clean encoding for the common O/R address cases 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. If Surname contains full stop, then it may not be in the first two characters, and either initials or given name is present.

Here's the EBNF:

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

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

             surname         = printablestring

This can be used to map any string made only of printable string characters into an O/R address personal name. Parse the string according to the EBNF. Given name and surname get assigned directly, and all EBNF.initial tokens get concatenated (no full stops in between) to make the initials ๐ŸŒˆ.

If an O/R address follows the restrictions above, you can write the string in the natural way, and the mapping is reversible ๐Ÿ”. Check these out:

     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"

Heads up: X.400 suggests that Initials is used to encode ALL initials ๐Ÿ‘€. So the proposed encoding feels "natural" when either GivenName or Initials is present, but not both. You can encode the both-present case, but honestly it seems contrived ๐Ÿ™ƒ.

4.2.2. Standard Encoding of MTS.ORAddress

Now that we've got the structure, we can write a BNF representation of an O/R Address ๐ŸŽ€.

             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 can be any key from the table in Section 4.2, except PN and DD ๐Ÿ’…. After quote removal, the value should be read according to its defined encoding.

If the standard-type is PN, the value is read according to EBNF.encoded-pn, and the MTS.PersonalName and/or MTS.TeletexPersonalName components get derived to match โœจ.

If dd-key is the recognised Domain Defined string (DD), then the type and value should be read according to the syntax implied by the encoding, and lined up with either the teletex or printable string form. The key and value should share the same encoding ๐Ÿฆ‹.

If the 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 from this spec ๐Ÿš€.

Keyword matching should be done without caring about case ๐Ÿ”ค.

If the value is registered-dd-type, which means it's registered with the IANA and listed in the Assigned Numbers RFC, then it should be read accordingly. This restriction lets a gateway do more syntax checking ๐Ÿ›ก๏ธ.

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

Ideally, the mapping would be totally symmetrical and global, so addresses could be referred to transparently on the remote system, with the Message Transfer Service picking the gateway ๐ŸŒ. Sadly, two big reasons make that impossible ๐Ÿ˜ฉ:

  1. The syntaxes are different enough to make this awkward.
  2. In the general case, there wouldn't be the administrative co-operation between the X.400 and RFC 822 worlds that this would need.

So an asymmetrical mapping is defined instead, one that can be symmetrical wherever there's proper administrative control ๐Ÿ’œ.

4.3.1. X.400 encoded in RFC 822 ๐Ÿ“ฎ

okay so the std-or-address syntax is what we use to squish O/R Address info into the 822.local-part of an EBNF.822-address ๐Ÿ’…. Extra O/R Address info can also hide in the 822.domain part ๐ŸŽ€. Not gonna lie, that can't work in every case, because of character set drama and because X.400 O/R Addresses have no fixed order ๐Ÿ™ˆ. The only way to fit the full PrintableString character set into a domain is the 822.domain-ref syntax (aka 822.atom), and that's likely to cause problems on lots of systems ๐Ÿ’€. In practice, domains end up with a smaller character set than RFC 822 allows, thanks to domain conventions and policy ๐ŸŒธ.

A generic 822.address is a 822.local-part plus a bunch of 822.domains, like <@domain1,@domain2:user@domain3> โœจ. Every 822.domain except the one attached to the 822.local-part (domain3 in this case) should be treated as routing inside the RFC 822 world, and the gateway won't interpret them, even though they might have helped it find the gateway from inside RFC 822 land ๐Ÿงš.

This form of source routing is now discouraged in the Internet (Host Requirements, page 58 [Braden89a]).

The 822.domain attached to the 822.local-part can also point out the gateway from inside RFC 822 land ๐Ÿฆ‹. That final domain can tell you some O/R Address attributes too ๐Ÿ‘‘. These attributes form a hierarchy, and a domain can specify them (listed from top to bottom):

Country, ADMD, PRMD, Organisation, Organisational Unit

There can be multiple Organisational Units ๐Ÿซถ.

Domains can be linked to sets of attributes, and the link works hierarchically ๐ŸŒˆ. If a domain implies an ADMD, it also implies a country. Subdomains under it follow 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 to keep a domain/attribute mapping instead of just using subdomains ๐Ÿ“:

  1. As a shorthand, so you don't repeat X.400 info all the time. Usually there's only one ADMD per country, so it doesn't need to be spelled out โœจ.
  2. To handle cases where attribute values don't fit the syntax:
domain-syntax   = alphanum [ *alphanumhyphen alphanum ]
alphanum        = <ALPHA or DIGIT>
alphanumhyphen  = <ALPHA or DIGIT or HYPHEN>

RFC 822 allows a more general syntax, but this restricted one was picked because it's what the domain service administrations already use ๐ŸŽ€.

  1. To handle missing elements in the hierarchy. A domain can be linked to an omitted attribute alongside several present ones. When you algorithmically insert lower-level components, the omitted value gets skipped ๐Ÿงš. For example, if "HNE.EGM" is linked to "C=TC", "ADMD=ECQ", "PRMD=HNE", and an omitted organisation, then "ZI.HNE.EGM" maps to "C=TC", "ADMD=ECQ", "PRMD=HNE", "OU=ZI". Also, attributes can have null values, and those are treated separately from omitted attributes. Treating the two differently would be bad practice, but both cases still have to be allowed for ๐Ÿ™ˆ๐Ÿ’….

This set of mappings only needs to be known by the gateways relaying between the RFC 822 world and the O/R Address space the mapping belongs to ๐ŸŒธ. Still, it's desirable for all gateways to know these mappings, so third party addresses get mapped as well as possible ๐Ÿ’–. Appendix F defines a format for exchanging this info ๐Ÿฆ‹.

The remaining attributes get 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 come from the domain Widget.COM ๐Ÿ‘‘. Then the first element of OrganizationalUnitNames is worked out systematically, and the rest of the attributes go on the LHS ๐ŸŒˆ. In the most extreme case, every attribute lands on the LHS. The domain can't be null, so the RHS is just a domain pointing at the gateway ๐Ÿซถ.

The RHS (domain) encoding is built to handle common addresses neatly, so the amount of info on the RHS should be maximised ๐Ÿ’…. It covers the Mnemonic O/R Address with a 1984 compatible encoding โœจ. That's seen as the dominant form of O/R Address ๐Ÿ‘‘. Other O/R Address forms, and teletex encoded attributes, need an LHS encoding ๐Ÿงš.

There's one more trick to simplify common cases ๐ŸŽ€. If the only attributes going on the LHS are (non-Teletex) Personal Name attributes that follow the restrictions in 4.2.1, the 822.local-part shall be encoded as EBNF.encoded-pn. In the previous example, if the GenerationQualifier wasn't present, you'd get J.Linnimouth@Marketing.Widget.COM ๐Ÿ’–.

From the standpoint of the RFC 822 Message Transfer System, the domain specification is just used to route the message in the standard way ๐Ÿฆ‹. The standard domain mechanisms are are used to pick the right gateways for the matching O/R Address space ๐ŸŒธ. Usually you do this by registering the higher levels, and assuming the gateway can handle the lower levels ๐Ÿซถ.

4.3.2. RFC 822 encoded in X.400 ๐Ÿ’œ

Sometimes the encoding above can be reversed, to give a "natural" encoding of real RFC 822 addresses โœจ. That mostly depends on how management domains get allocated ๐ŸŒˆ.

The general case is handled with domain defined attributes ๐ŸŽ€. There's a Domain defined type called "RFC-822" ๐Ÿ’…. Its attribute value is an ASCII string encoded according to Section 3.3.3 of this specification ๐Ÿงš. What the ASCII string means depends on the gateway's context ๐Ÿ‘‘:

  1. In the context of RFC 822, and RFC 1034 [Crocker82a, Mockapetris87a], the string can be used directly โœจ.
  2. In the context of the JNT Mail protocol, and the NRS [Kille84a, Larmouth83a], the string should be interpreted according to Mailgroup Note 15 [Kille84b] ๐Ÿฆ‹.
  3. In the context of UUCP based systems, the string should be interpreted as defined in [Horton86a] ๐ŸŒธ.

Other O/R Address attributes identify the context the O/R Address gets interpreted in ๐Ÿ“. That could be a Management Domain, or part of one that 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"

Notice that in each case "@" gets written as "(a)", since that's its PrintableString encoding ๐Ÿ™ˆ. In the second example, the "RFC-822" domain defined attribute is interpreted everywhere inside the (Private) Management Domain ๐Ÿ‘‘. In the first example, you need more attributes inside the Management Domain to find the gateway ๐ŸŒˆ. So this scheme works with different levels of Management Domain co-operation ๐Ÿซถ.

4.3.3. Component Ordering ๐Ÿ”ฅ

In most cases, the order of O/R Address components doesn't matter for the mappings listed here ๐Ÿ’…. But Organisational Units (printable string and teletex forms) and Domain Defined Attributes are specified as SEQUENCE in MTS.ORAddress, so their order might matter ๐ŸŽ€. This spec has to deal with that for two reasons โœจ:

  1. To allow consistent mapping into the domain hierarchy ๐Ÿงš.
  2. To keep order preserved over multiple mappings ๐Ÿฆ‹.

There are three places where an order has to be specified ๐ŸŒธ:

  1. The text encoding (std-or-address) of MTS.ORAddress, used in the local-part of an RFC 822 address. An order is needed for the components that can 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's an Organisation Attribute, it shall be to the right of any Organisational Unit attributes ๐Ÿ’–. The reasons for this are:
    • Alignment with the hierarchy of other components in RFC 822 addresses, so Organisational Units show up in the same order whether they're encoded on the RHS or LHS. Check out the differences for JNT Mail in Appendix B ๐Ÿ‘‘.
    • Backwards compatibility with RFC 987/1026 ๐Ÿซถ.
    • To make sure gateways generate consistent addresses. That helps end users, and it generates identical message ids ๐Ÿ’œ.

Further, it is recommended that all other attributes are generated according to this ordering, so every attribute encoded that way follows one consistent hierarchy โœจ.

Some X.400 O/R addresses of this encoding will be typed in by an end user from outside info, so the ordering of attributes might be inverted or mixed up ๐Ÿ™ˆ. Because of that, these heuristics may be applied ๐ŸŒˆ:

  • If there's an Organisation attribute to the left of any Org Unit attribute, assume the hierarchy is inverted ๐ŸŽ€.
  • If inverting the Org Unit hierarchy gives a valid address when the preferred order doesn't, assume the hierarchy is inverted ๐Ÿ’….
  1. For the Organisational Units (OU) in MTS.ORAddress, the first OU in the SEQUENCE is the most significant, as specified in X.400 ๐Ÿงš.
  2. For the Domain Defined Attributes in MTS.ORAddress, the first Domain Defined Attribute in the SEQUENCE is the most significant ๐Ÿฆ‹.

Note that even though this ordering is mandatory for this mapping, it has NO implications for ordering significance inside X.400, where that's a Management Domain issue ๐ŸŒธ.

4.3.4. RFC 822 -> X.400 ๐Ÿ’Œ

okay so there are two basic cases, bestie ๐Ÿ’…

  1. X.400 addresses encoded in RFC 822. This also covers RFC 822 addresses that have reversible encodings.
  2. "Genuine" RFC 822 addresses.

The mapping goes like this, and we always start by assuming case 1) first ๐ŸŽ€

STAGE I.

  1. If the 822-address is not of the form:
local-part "@" domain

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. ๐Ÿ™ˆ
  1. Attempt to parse EBNF.domain as:
*( domain-syntax "." ) known-domain

Where EBNF.known-domain is the longest possible match in a list of supported mappings (see Appendix F). If this fails, and the EBNF.domain does not explicitly identify the local gateway, go to stage II. If it succeeds, allocate the attributes associated with EBNF.known-domain, and systematically allocate the attributes implied by each EBNF.domain-syntax component. If the domain explicitly identifies the gateway, allocate no attributes. โœจ

  1. If the local-part contains any characters not in PrintableString, go to stage II.
  2. If the 822.local-part uses the 822.quoted-string encoding, remove this quoting. Parse the (unquoted) 822.local-part according to the EBNF EBNF.std-or-address. If this parse fails, parse the local-part according to the EBNF EBNF.encoded-pn. The result is a set of type/value pairs. If the values generated conflict with those derived in step 2 (e.g., a duplicated country attribute), the domain should be assumed to be an RFC 987 gateway. In this case, take only the LHS derived attributes. Otherwise add LHS and RHS derived attributes together. ๐Ÿงš
  3. 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.
  4. Ensure that the set of attributes conforms both to the MTS.ORAddress specification and to the restrictions on this set given in X.400. If not go to stage II.
  5. Build the O/R Address from this information. ๐Ÿ’–

STAGE II.

This only gets reached if the RFC 822 EBNF.822-address is not a valid X.400 encoding. If the address is an 822-MTS recipient address, it must be rejected, because there is a need to interpret such an address in X.400. For the 822-MTS 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 "RFC-822" domain defined attribute should be generated from this string.
  3. Build the rest of the O/R Address in the local Management Domain agreed manner, so that the O/R Address will receive a correct global interpretation. ๐ŸŒธ

Note that the domain defined attribute value has a maximum length of MTS.ub-domain-defined-attribute-value-length (128). If this is exceeded by a mapping at the MTS level, then the gateway should reject the message in question. If this happens at the IPMS level, then the action should depend on the policy being taken, which is discussed in Section 5.1.3. ๐Ÿšจ

4.3.5. X.400 -> RFC 822 ๐Ÿฆ‹

There are two basic cases, again:

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

When an MTS Recipient O/R Address is interpreted, gatewaying gets selected if there is a single "RFC-822" domain defined attribute present. In this case, use mapping A. For other O/R Addresses which:

  1. Contain the special attribute.

AND

  1. Identify 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. ๐Ÿ™ˆ

Mapping A

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

Mapping B

This will be 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.
  2. 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.
  3. Following the 4.3.1 hierarchy and noting any omitted components implied by the mapping tables (see Appendix F), if each successive component exists, and 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 should not be mapped onto subdomain, as 822.local-part cannot be null.
  4. If the remaining components are personal-name components, conforming to the restrictions of 4.2.1, 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-or-address syntax. If necessary, the 822.quoted-string encoding should be used.

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 ๐Ÿ”

The mappings defined are symmetrical and reversible across a single gateway. The symmetry is especially useful with (mail exploder type) distribution list expansion. For example, an X.400 user sends to a list on an RFC 822 system which they belong to. The 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, this will apply to multiple gateways. ๐Ÿ’…

When a message traverses multiple gateways, the mapping will always be reversible, so a reply can be generated which will correctly reverse the path. In many cases, the mapping will also be symmetrical, which will look 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, 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 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 should be used. There is no requirement for reversibility in terms of the goals of this specification. There may be some loss of functionality for 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. ๐Ÿซถ

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-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 should be made for each component of MTS.PerRecipientMessageSubmissionFields:

  • recipient-name: this should be derived from the 822-MTS recipient by the basic ORAddress mapping.
  • originator-report-request: this should be set according to content return policy, as discussed in Section 5.2.
  • explicit-conversion: this optional component should be omitted, as this service is not needed.
  • extensions: the default value (no extensions) should be 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 should be present in these fields. There may also be the need to generate a delivery report. ๐ŸŒˆ

4.6.2.1. 822-MTS Mappings ๐ŸŽ€

Okay so first up, the 822-MTS originator (aka the return address ๐Ÿ’Œ) gets built from MTS.OtherMessageDeliveryFields.originator-name (MTS.ORName) using the basic ORAddress mapping. If MTS.ORName.directory-name is present, it should be discarded ๐Ÿ™…โ€โ™€๏ธ

The 822-MTS recipient is conceptually generated from MTS.OtherMessageDeliveryFields.this-recipient-name. You take that field and run it through the basic ORAddress mapping to make an 822-MTS recipient, dropping MTS.ORName.directory-name if it's there.

BUT, if we followed that model exactly, you could never have multiple 822-MTS recipients on one message ๐Ÿ˜ญ That's unacceptable, so layering gets bent a little here. The mapping needs to use the MTA level information instead, and map each value of MTA.PerRecipientMessageTransferFields.recipient-name where the responsibility bit is set onto an 822-MTS recipient. Main character energy for the MTA layer ๐Ÿ‘‘

4.6.2.2. Generation of RFC 822 Headers ๐Ÿฆ‹

Not all per-recipient info can get passed at the 822-MTS level, so we make two brand-new RFC 822 headers to carry it to the RFC 822 recipient: X400-Originator: and X400-Recipients: ๐Ÿงš

The X400-Originator: field should be set to the same value as the 822-MTS originator. Also, if MTS.OtherMessageDeliveryFields.originator-name (MTS.ORName) contains MTS.ORName.directory-name, then that Directory Name should be represented in an 822.comment.

Recipient names, pulled from each value of MTS.OtherMessageDeliveryFields.this-recipient-name and MTS.OtherMessageDeliveryFields.other-recipient-names, should be made available to the RFC 822 user through the X400-Recipients: field. Doing this at the MTS level means disclosure of recipients gets handled correctly ๐Ÿซถ If any MTS.ORName.directory-name is present, it should be represented in an 822.comment. And if MTS.OtherMessageDeliveryFields.orignally-intended-recipient-name is present, then it should be represented in an associated 822.comment that starts with the string "Originally Intended Recipient" ๐Ÿ’…

Next, the following per-recipient services from MTS.OtherMessageDeliveryFields.extensions should be represented in comments if they're used. ngl none of these can be provided on RFC 822 networks, so they're basically informative strings hanging off the other MTS recipients. Some have defined string values, and for the rest the implementor may choose the string value. If the parameter has a default value, then no comment should be inserted ๐Ÿ™ˆ

  • 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 asks for a positive delivery notification, the gateway should generate it. Supplementary Information should be set to indicate that the report is gateway generated, so everyone knows who made it ๐Ÿค–โœจ

4.6.3. Message IDs (MTS) ๐Ÿ†”

A mapping from 822.msg-id to MTS.MTSIdentifier is defined. The reverse mapping isn't needed, because MTS.MTSIdentifier always gets mapped onto new RFC 822 fields. The value of MTS.MTSIdentifier.local-part will make gateway errors way easier to correlate ๐Ÿ”

To map from 822.msg-id, apply the standard mapping to it so you get an MTS.ORAddress. The Country, ADMD, and PRMD components of that should be used to generate MTS.MTSIdentifier.global-domain-identifier. Then MTS.MTSIdentifier.local-identifier should be set to the 822.msg-id, including the braces "<" and ">". If this string is longer than MTS.ub-local-id-length (32), it should be truncated to that length โœ‚๏ธ

The reverse mapping isn't used in this spec. It would only be applicable where MTS.MTSIdentifier.local-identifier is of syntax 822.msg-id, and then it algorithmically identifies MTS.MTSIdentifier ๐Ÿง 

4.7. IPMS Mappings ๐Ÿ“จ

All RFC 822 addresses are assumed to use the 822.mailbox syntax. This should include all 822.comments tied to the lexical tokens of the 822.mailbox. IPMS O/R Names are encoded as MTS.ORName, and that's used inside IPMS.ORDescriptor, IPMS.RecipientSpecifier, and IPMS.IPMIdentifier. The mapping between these components is asymmetrical, so keep your eyes open ๐Ÿ‘€

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 the 822.route-addr syntax. It gets mapped to MTS.ORName as described above, and used as IMPS.ORDescriptor.formal-name.

2. Build a string 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, keeping the parentheses.

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

3. IPMS.ORDescriptor.telephone-number should be omitted ๐Ÿ“ต

If IPMS.ORDescriptor is being used in IPMS.RecipientSpecifier, then IPMS.RecipientSpecifier.reply-request and IPMS.RecipientSpecifier.notification-requests should be set to default values (none and false) โœจ

If the 822.group construct is present, any included 822.mailbox should be encoded as above to generate a separate IPMS.ORDescriptor. The 822.group should be mapped to T.61, and then an IPMS.ORDescriptor gets built with only a free-form-name component ๐ŸŽ€

4.7.2. X.400 -> RFC 822 ๐Ÿฆ‹

This is the mapping from IPMS.ORDescriptor to an 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 EBNF.822-address.

2a. If IPMS.ORDescriptor.free-form-name is present, convert it to ASCII (Chapter 3), and use it 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 should be added.

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

(Tel +44-1-387-7050)

4. If IPMS.ORDescriptor.formal-name.directory-name is present, then a text representation should be 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)" should be appended to the address. Honestly, correlating P1 and P2 information is too much effort to justify the gateway sending Receipt Notifications ๐Ÿ˜…

6. If IPMS.RecipientSpecifier.reply-request is True, an 822.comment "(Reply requested)" should be appended to the address ๐Ÿ’ฌ

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

Free Form Name ":" ";"

Steps 3-6 should then be followed. ๐ŸŒธ

4.7.3. IP Message IDs ๐Ÿชช

There's a need to map both ways between 822.msg-id and IPMS.IPMIdentifier. That lets X.400 Receipt Notifications, Replies, and Cross References point back to an RFC 822 Message ID, which beats a gateway generated ID. So a reversible, symmetrical mapping is defined, and good things can happen when messages cross the X.400/RFC 822 boundary multiple times ๐Ÿ”๐Ÿ’–

Here's the big issue: many systems use message IDs as uninterpreted keys, so they have to map to the exact form. Table driven mappings aren't always symmetrical, especially with alternative domain names and alternative management domains. So for this, a purely algorithmic mapping is used. It can be simpler than the address mapping 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 for message IDs generated on one side of the gateway to be represented on the other side in a systematic manner. It's defined so that the possibility of clashes 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.

4.7.3.2. IPMS.IPMIdentifier represented in RFC 822 ๐Ÿ’ซ

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

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

EBNF.printablestring is the IPMS.IPMIdentifier.user-relative-identifier, and std-or-address is 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>

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, its 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 that case, IPMS.IPMIdentifier.user-relative-identifier is set 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 with angle braces added, parses as 822.msg-id, then this is an RFC 822 generated ID.

Otherwise, the ID is X.400 generated. Use IPMS.IPMIdentifier.user to generate an EBNF.std-or-address form string. Then build the 822.local-part of the 822.msg-id with this 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

Okay bestie, so in Reply-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, you assign the phrase to IPMS.IPMIdentifier.user-relative-identifier. Going the other way for Reply-To: and References:, if IPMS.IPMIdentifier.user is absent and IPMS.IPMIdentifier.user-relative-identifier does not parse as 822.msg-id, you generate an 822.phrase instead of adding the domain MHS. It's giving clean mapping energy ๐ŸŽ€โœจ

4.7.3.6. RFC 987 backwards compatibility

Ngl this one's a little tea โ˜• The mapping proposed here is different to the one used in RFC 987, because the RFC 987 mapping led to changed message IDs in lots of cases ๐Ÿ˜ญ Fixing the problems is preferable to retaining backwards compatibility, so we're choosing the fix ๐Ÿ’… An implementation of this standard is encouraged to recognise message IDs generated by RFC 987, so it can still understand the old ones ๐Ÿซถ

Chapter 5 -- Detailed Mappings โœจ

This chapter gives detailed mappings for the functions outlined in Chapters 1 and 2. It makes extensive use of the notations and mappings defined in Chapters 3 and 4. Basically this is where the magic happens ๐Ÿฆ‹

5.1. RFC 822 -> X.400

5.1.1. Basic Approach

Here's the vibe: a single IP Message is generated ๐ŸŒธ The RFC 822 headers are used to generate the IPMS.Heading, and the IP Message will have one IA5 IPMS.BodyPart containing the RFC 822 message body.

Some RFC 822 fields cannot be mapped onto a standard IPM Heading field, so an extended field is defined in Section 5.1.2. That extension is then used for fields which cannot be mapped onto existing services. Not every field gets left behind ๐Ÿฅน

The message is submitted to the MTS, and the services required can be defined by specifying MTS.MessageSubmissionEnvelope. A few parameters of the MTA Abstract service are also specified, which are not in principle available to the MTS User. Using these services lets RFC 822 MTA level parameters be carried in the analogous X.400 service elements. The advantages of this mapping far outweigh the layering violation, and I will die on this hill ๐Ÿ’€๐Ÿ”ฅ

5.1.2. X.400 Extension Field

An IPMS Extension is defined like this:

                rfc-822-field HEADING-EXTENSION
                        VALUE RFC822Field
                        ::= id-rfc-822-field

                RFC822Field ::= IA5String

The Object Identifier id-rfc-822-field is defined in Appendix D ๐Ÿงš

To encode any RFC 822 Header using this extension, the RFC822Field should be set to the 822.field omitting the trailing CRLF (e.g., Fruit-Of-The-Day: Kiwi Fruit). Structured fields should be unfolded. There should be no space before the ":". The reverse mapping builds the RFC 822 field in a straightforward manner, so it's literally not that deep ๐Ÿ™ˆ

5.1.3. Generating the IPM

The IPM (IPMS Service Request) is generated according to the rules of this section. The IPMS.IPM.body usually consists of one IPMS.BodyPart of type IPMS.IA5TextbodyPart with IPMS.IA5TextBodyPart.parameters.repertoire set to the default (ia5), which contains the body of the RFC 822 message. The exception is where there is a Comments: field in the RFC 822 header ๐Ÿ‘€

If no specific 1988 features are used, the IPM generated should be encoded as content type 2. Otherwise, it should be encoded as content type 22. The latter will always be the case if extension heading fields are generated ๐ŸŒˆ

When generating the IPM, the issue of upper bounds must be considered. At the MTS and MTA level, this specification is strict about enforcing upper bounds. Three options are available at the IPM level, and using any of these options conforms to this standard. Pick your fighter:

  1. Ignore upper bounds, and generate messages in the natural manner. This assumes that if any truncation is done, it will happen at the recipient UA. This will maximise transfer of information, but may break some recipient UAs.
  2. Reject any inbound message which would cause a message violating constraints to be generated. This will be robust, but may prevent useful communication.
  3. Truncate fields to the upper bounds specified in X.400. This will prevent problems with UAs which enforce upper bounds, but will sometimes discard useful information.
These choices have different advantages and disadvantages, and the choice will depend on the exact application of the gateway. No single answer, bestie ๐Ÿซ 

The rest of this section concerns IPMS.IPM.heading (IPMS.Heading). The only mandatory component of IPMS.Heading is the IPMS.Heading.this-IPM (IPMS.IPMIdentifier). A default should be generated by the gateway. With the exception of Received:, the values of multiple fields should be merged (e.g., if there are two To: fields, then the mailboxes of both should be used). Information should be generated from the standard RFC 822 Headers as follows, and this is the big field-by-field glow-up ๐Ÿ’–

        Date:
             Ignore (Handled at MTS level)

        Received:
             Ignore (Handled at MTA level)

        Message-Id:
             Mapped to IPMS.Heading.this-IPM.  For these, and all other
             fields containing 822.msg-id the mappings of Chapter 4 are
             used for each 822.msg-id.

        From:
             If Sender: is present, this is mapped to
             IPMS.Heading.authorizing-users.  If not, it is mapped to
             IPMS.Heading.originator.  For this, and other components
             containing addresses, the mappings of Chapter 4 are used
             for each address.

        Sender:
             Mapped to IPMS.Heading.originator.

        Reply-To:
             Mapped to IPMS.Heading.reply-recipients.

        To:  Mapped to IPMS.Heading.primary-recipients

        Cc:  Mapped to IPMS.Heading.copy-recipients.

        Bcc: Mapped to IPMS.Heading.blind-copy-recipients.

        In-Reply-To:
             If there is one value, it is mapped to
             IPMS.Heading.replied-to-IPM, using the 822.phrase or
             822.msg-id mapping as appropriate.  If there are several
             values, they are mapped to IPMS.Heading.related-IPMs, along
             with any values from a "References:" field.

        References:
             Mapped to IPMS.Heading.related-IPMs.

        Keywords:
             Mapped onto a heading extension.

        Subject:
             Mapped to IPMS.Heading.subject.  The field-body uses the
             human oriented mapping referenced in Chapter 3 from ASCII to
             T.61.

        Comments:
             Generate an IPMS.BodyPart of type IPMS.IA5TextbodyPart with
             IPMS.IA5TextBodyPart.parameters.repertoire set to the
             default (ia5), containing the value of the fields, preceded
             by the string "Comments: ".  This body part should precede
             the other one.

        Encrypted:
             Mapped onto a heading extension.

        Resent-*
             Mapped onto a heading extension.

             Note that it would be possible to use a ForwardedIPMessage
             for these fields, but the semantics are (arguably) slightly
             different, and it is probably not worth the effort.

        Other Fields
             In particular X-* fields, and "illegal" fields in common
             usage (e.g., "Fruit-of-the-day:") are mapped onto a heading
             extension, unless covered by another section or appendix of
             this specification.  The same treatment should be applied to
             RFC 822 fields where the content of the field does not
             conform to RFC 822 (e.g., a Date: field with unparsable
             syntax).

5.1.4. Mappings to the MTS Abstract Service

The MTS.MessageSubmissionEnvelope comprises MTS.PerMessageSubmissionFields and MTS.PerRecipientMessageSubmissionFields. The mandatory parameters should be defaulted as follows, so there's no guessing ๐ŸŽ€

  • MTS.PerMessageSubmissionFields.originator-name: This is always generated from 822-MTS, as defined in Chapter 4.
  • MTS.PerMessageSubmissionFields.content-type: Set to the value implied by the encoding of the IPM (2 or 22).
  • MTS.PerRecipientMessageSubmissionFields.recipient-name: These will always be supplied from 822-MTS, as defined in Chapter 4.

Optional components should be left out, and default components defaulted, with two exceptions. For MTS.PerMessageSubmissionFields.per-message-indicators, the following settings should be made:

  • Alternate recipient should be allowed, as it seems desirable to maximise the opportunity for (reliable) delivery.
  • Content return request should be set according to the issues discussed in Section 5.2.

MTS.PerMessageSubmissionFields.original-encoded-information-types should be made a set of one element, BuiltInEncodedInformationTypes.ia5-text. ๐Ÿฆ‹

The MTS.PerMessageSubmissionFields.content-correlator should be encoded as IA5String, and contain the Subject:, Message-ID:, Date:, and To: fields (if present). This should include the strings "Subject:", "Date:", "To:", "Message-ID:", and appropriate folding. This should be truncated to MTS.ub-content-correlator-length (512) characters. In addition, if there is a Subject: field, the MTS.PerMessageSubmissionFields.content-identifier should be set to a printable string representation of the contents of it, truncated to MTS.ub-content-id-length (16). Both are used, due to the much larger upper bound of the content correlator, and because the content id is available in X.400(1984). Two fields, double the coverage, zero drama ๐Ÿ’…โœจ

5.1.5. Mappings to the MTA Abstract Service โœจ

okay so there's a real need to map directly onto some parts of the MTA Abstract Service, and it's for four reasons ๐Ÿงš

  • So the MTS Message Identifier can be generated from the RFC 822 Message-ID:.
  • So that the submission date can be generated from the 822.Date.
  • To prevent loss of trace information.
  • To prevent RFC 822/X.400 looping caused by distribution lists or redirects.

The following mappings are defined ๐Ÿ’…

Message-Id: ๐ŸŽ€ If this is present, the MTA.PerMessageTransferFields.message-identifier should be generated from it, using the mappings described in Chapter 4.

Date: ๐Ÿ“… This gets used to set the first component of MTA.PerMessageTransferFields.trace-information (MTA.TraceInformationElement). The 822-MTS originator should be mapped into an MTS.ORAddress, and that gets used to derive MTA.TraceInformationElement.global-domain-identifier. The optional components of MTA.TraceInformationElement.domain-supplied-information are omitted, and the mandatory components are set like this:

  • MTA.DomainSuppliedInformation.arrival-time: set to the date derived from Date:.
  • MTA.DomainSuppliedInformation.routing-action: set to relayed.

The first element of MTA.PerMessageTransferFields.internal-trace-information should be generated in an analogous manner, although this may later be dropped (see the procedures for "Received:") ๐Ÿซถ

Received: ๐Ÿ”ฅ All RFC 822 trace gets used to derive MTA.PerMessageTransferFields.trace-information and MTA.PerMessageTransferFields.internal-trace-information. Processing of Received: lines should follow processing of Date:, and should be done from the bottom to the top of the RFC 822 header (i.e., in chronological order). If other trace elements are processed (Via:, X400-Received:), care should be taken to keep the relative ordering correct. The initial element of MTA.PerMessageTransferFields.trace-information will already be generated (from Date:).

Okay, so look at the Received: field in question. If the "by" part of the received is present, use it to derive an MTS.GlobalDomainIdentifier. If this is different from the one in the last element of MTA.PerMessageTransferFields.trace-information (MTA.TraceInformationElement.global-domain-identifier), create a new MTA.TraceInformationElement, and optionally remove MTA.PerMessageTransferFields.internal-trace-information. This removal should be done in cases where the message is being transferred to another MD where there is no bilateral agreement to preserve internal trace beyond the local MD. The trace creation is as for internal trace described below, except that no MTA field is needed.

Then add a new element (MTA.InternalTraceInformationElement) to MTA.PerMessageTransferFields.internal-trace-information, creating this if needed. This shall be done, even if inter-MD trace is created. The MTA.InternalTraceInformationElement.global-domain-identifier should be set to the value derived. The MTA.InternalTraceInformationElement.mta-supplied-information (MTA.MTASuppliedInformation) should be set like this:

  • MTA.MTASuppliedInformation.arrival-time: derived from the date of the Received: line.
  • MTA.MTASuppliedInformation.routing-action: set to relayed.

The MTA.InternalTraceInformationElement.mta-name should be taken from the "by" component of the Received: field, truncated to MTS.ub-mta-name-length (32). For example:

           Received: from computer-science.nottingham.ac.uk by
              vs6.Cs.Ucl.AC.UK via Janet with NIFTP  id aa03794;
              28 Mar 89 16:38 GMT

This generates the string vs6.Cs.Ucl.AC.UK ๐Ÿงš

โš ๏ธ Heads up: before transferring the message to some ADMDs, additional trace stripping may be required, because the implied path through multiple MDs would violate ADMD policy.

Two extended fields must be mapped to prevent looping ๐Ÿ” DL-Expansion-History: is mapped to MTA.PerMessageTransferFields.extensions.dl-expansion-history, and Redirection-History: is mapped to MTA.PerRecipientMessageTransferFields.extensions.redirection-history.

5.1.6. Mapping New Fields ๐ŸŒˆ

This specification defines a bunch of new fields for Reports, Notifications and IP Messages in Section 5.3. Since this specification only aims to preserve existing services, a gateway conforming to this specification does not need to map these fields to X.400, with the exception of "DL-Expansion-History" and "Redirection-History" described in the previous section. That said, it's usually desirable and beneficial to do so, especially to help a message traversing multiple gateways. These mappings may be onto MTA, MTS, or IPMS services ๐Ÿ’œ

5.2. Return of Contents ๐Ÿ“ฆ

It's not clear how widely supported the X.400 return of contents service will be. Experience with X.400(1984) suggests that support of this service may not be universal. Since this service is expected in the RFC 822 world, two approaches are specified. The choice will depend on the use of X.400 return of contents within the X.400 community being serviced by the gateway.

In environments where return of contents is widely supported, content return can be requested as a service. The content return service can then be passed back to the end (RFC 822) user in a straightforward manner ๐ŸŒธ

In environments where return of contents is not widely supported, a gateway must make special provision to handle return of contents. For every message passing from RFC 822 -> X.400, content return request will not be requested, and report request always will be. When the delivery report comes back, the gateway can note that the message has been delivered to the recipient(s) in question. If a non-delivery report is received, a meaningful report (containing some or all of the original message) can be sent to the 822-MTS originator. If no report is received for a recipient, a (timeout) failure notice should be sent to the 822-MTS originator. The gateway may retransmit the X.400 message if it wishes. When this approach is taken, routing must be set up so that error reports are returned through the same MTA. This approach may be difficult to use in conjunction with some routing strategies ๐Ÿ˜ญ

5.3. X.400 -> RFC 822 ๐Ÿฆ‹

5.3.1. Basic Approach ๐Ÿ“

A single RFC 822 message is generated from the incoming IP Message, Report, or IP Notification. All IPMS.BodyParts get mapped onto a single RFC 822 body. Other services are mapped onto RFC 822 header fields. Where there is no appropriate existing field, new fields are defined for IPMS, MTS and MTA services.

The gateway mechanisms will correspond to MTS Delivery. As with submission, there are aspects where the MTA (transfer) services are also used. In particular, there's an optimisation to allow for multiple 822-MTS recipients ๐Ÿ‘‘

5.3.2. RFC 822 Settings โญ

An RFC 822 Service needs to have a number of mandatory fields in the RFC 822 Header. Some 822-MTS services mandate specification of an 822-MTS Originator. Even in cases where this is optional, it is usually desirable to specify a value. The following defaults are defined, which should be used if the mappings specified do not derive a value:

  • 822-MTS Originator: If this is not generated by the mapping (e.g., for a Delivery Report), a value pointing at a gateway administrator should be assigned.
  • Date:: A value will always be generated.
  • From:: If this is not generated by the mapping, it should be assigned equal to the 822-MTS Originator. If this is gateway generated, an appropriate 822.phrase should be added.
  • At least one recipient field: If no recipient fields are generated, a field To: list:; should be added.

This will ensure minimal RFC 822 compliance. When generating RFC 822 headers, folding should be used in an appropriate manner ๐ŸŽ€

5.3.3. Basic Mappings ๐Ÿง

5.3.3.1. Encoded Information Types ๐Ÿ’ซ

This mapping from MTS.EncodedInformationTypes is needed in several disconnected places. The EBNF is defined as follows:

               encoded-info    = 1#encoded-type

               encoded-type    = built-in-eit / object-identifier

               built-in-eit    = "Undefined"         ; undefined (0)
                               / "Telex"             ; tLX (1)
                               / "IA5-Text"          ; iA5Text (2)
                               / "G3-Fax"            ; g3Fax (3)
                               / "TIF0"              ; tIF0 (4)
                               / "Teletex"           ; tTX (5)
                               / "Videotex"          ; videotex (6)
                               / "Voice"             ; voice (7)
                               / "SFD"               ; sFD (8)
                               / "TIF1"              ; tIF1 (9)

MTS.EncodedInformationTypes is mapped onto EBNF.encoded-info. MTS.EncodedInformationTypes.non-basic-parameters is ignored. Built in types are mapped onto fixed strings (compatible with X.400(1984) and RFC 987), and other types are mapped onto EBNF.object-identifier ๐ŸŒˆ

5.3.3.2. Global Domain Identifier ๐Ÿซง

The following simple EBNF is used to represent MTS.GlobalDomainIdentifier:

               global-id = std-or-address

This is encoded using the std-or-address syntax, for the attributes within the Global Domain Identifier ๐Ÿงš

5.3.4. Mappings from the IP Message โœจ

Okay so, when an IPM needs to become an RFC 822 message, we're looking at an IPMS.IPM, which is made of an IPMS.IPM.heading and an IPMS.IPM.body. The heading goes first ๐Ÿ’…. There's some EBNF for the brand-new fields, and it's giving very organized ๐ŸŽ€:

             ipms-field = "Obsoletes" ":" 1#msg-id
                        / "Expiry-Date" ":" date-time
                        / "Reply-By" ":" date-time
                        / "Importance" ":" importance
                        / "Sensitivity" ":" sensitivity
                        / "Autoforwarded" ":" boolean
                        / "Incomplete-Copy" ":"
                        / "Language" ":" language
                        / "Message-Type" ":" message-type
                        / "Discarded-X400-IPMS-Extensions" ":" 1#oid



             importance      = "low" / "normal" / "high"


             sensitivity     = "Personal" / "Private" /
                                    "Company-Confidential"

             language        = 2*ALPHA [ language-description ]
             language-description = printable-string


             message-type    = "Delivery Report"
                             / "InterPersonal Notification"
                             / "Multiple Part"

Each element of the IPMS.Heading gets its own mapping and action now ๐Ÿฆ‹. Addresses and Message Identifiers follow Chapter 4 ๐ŸŒธ. Everything else is either explained or pretty straightforward (algorithmic) โœจ.

IPMS.Heading.this-IPM Mapped to Message-ID: ๐Ÿ’–.

IPMS.Heading.originator If IPMS.Heading.authorizing-users is present, this gets mapped to Sender:. If not, it goes to From: ๐Ÿงš.

IPMS.Heading.authorizing-users Mapped to From: ๐Ÿ’œ.

IPMS.Heading.primary-recipients Mapped to To: ๐Ÿ“.

IPMS.Heading.copy-recipients Mapped to Cc: ๐ŸŒˆ.

IPMS.Heading.blind-copy-recipients Mapped to Bcc: ๐Ÿ™ˆ.

IPMS.Heading.replied-to-ipm Mapped to In-Reply-To: ๐Ÿซถ.

IPMS.Heading.obsoleted-IPMs Mapped to the extended RFC 822 field Obsoletes: โญ.

IPMS.Heading.related-IPMs Mapped to References: โœจ.

IPMS.Heading.subject Mapped to Subject:. The contents get converted to ASCII (as defined in Chapter 3). Any CRLF doesn't get mapped, but it's used as a point where the subject field must be folded ๐Ÿ”ฅ. Yes, that's a MUST, bestie, so don't skip it ๐Ÿ’€.

IPMS.Heading.expiry-time Mapped to the extended RFC 822 field Expiry-Date: โฐ.

IPMS.Heading.reply-time Mapped to the extended RFC 822 field Reply-By: ๐Ÿ—“๏ธ.

IPMS.Heading.reply-recipients Mapped to Reply-To: ๐Ÿ’Œ.

IPMS.Heading.importance Mapped to the extended RFC 822 field Importance: ๐Ÿ‘‘.

IPMS.Heading.sensitivity Mapped to the extended RFC 822 field Sensitivity: ๐Ÿ”’.

IPMS.Heading.autoforwarded Mapped to the extended RFC 822 field Autoforwarded: ๐ŸŽ€.

The standard extensions (Annex H of X.420 / ISO 10021-7) are mapped like this ๐Ÿ“š:

incomplete-copy Mapped to the extended RFC 822 field Incomplete-Copy: ๐Ÿฆ„.

language Mapped to the extended RFC 822 field Language:, with the two letter code filled in. If possible, the language-description should be filled in with a human readable description of the language ๐ŸŒ. (I'm obsessed with this one, it's so thoughtful ๐Ÿฅน.)

If the RFC 822 extended header is found, it should be mapped onto an RFC 822 header, as described in Section 5.1.2 ๐Ÿ’….

If a non-standard extension shows up, it should be discarded, unless the gateway understands the extension and can do an appropriate mapping onto an RFC 822 header field ๐Ÿ™…โ€โ™€๏ธ. If extensions do get discarded, the list should be indicated in the extended RFC 822 field Discarded-X400-IPMS-Extensions: ๐Ÿ“.

The IPMS.Body gets mapped into the RFC 822 message body ๐ŸŒท. Each IPMS.BodyPart gets converted to ASCII like so:

IPMS.IA5Text The mapping is straightforward (see Chapter 3) ๐Ÿ˜Œ.

IPMS.MessageBodyPart The X.400 -> RFC 822 mapping should be applied recursively to generate an RFC 822 Message ๐Ÿช†. If IPMS.MessageBodyPart.parameters.delivery-envelope is present, it should be used for the MTS Abstract Service Mappings ๐Ÿ“ฆ. If IPMS.MessageBodyPart.parameters.delivery-time is present, it should be mapped to the extended RFC 822 field Delivery-Date: โณ.

Other If other body parts can be mapped to IA5, either using mappings defined in X.408 [CCITT88a] or other reasonable mappings, this should be done unless content conversion is prohibited ๐Ÿ”„.

If some or all of the body parts can't be converted, there are three options. All of these conform to this standard. A different choice MAY be made for the case where no body part can be converted ๐Ÿคทโ€โ™€๏ธ:

  1. The first option is to reject the message and send a non-delivery notification. This MUST always be done if conversion is prohibited ๐Ÿšซ. No exceptions, bestie.
  2. The second option is to map a missing body part to something like this:
*********************************

There was a foobar here

The widget gateway ate it

*********************************

This lets some useful info get transferred โœจ. Since the recipient is a human (IPMS), suitable action SHOULD be available ๐Ÿง‘โ€๐Ÿ’ป.

  1. Finally, both can be done. In this case, the supplementary information in the (positive) Delivery Report SHOULD make clear that something was sent on to the recipient with substantial loss of information ๐Ÿ“ฌ.

When there's more than one IPMS.BodyPart, the mapping defined by Rose and Stefferud in [Rose85a] SHOULD be used to map the separate IPMS.BodyParts into the single RFC 822 message body ๐Ÿงฉ. If you do this, a Message-Type: field with the value Multiple part SHOULD be added. That tells a receiving gateway that the message MAY be unfolded according to RFC 934 ๐Ÿฆ‹.

For backwards compatibility with RFC 987, the following procedures SHOULD also be followed ๐Ÿ•ฐ๏ธ. If there are two IA5 body parts, and the first one starts with the string RFC-822-Headers: as its first line, then the rest of that body part gets appended to the RFC 822 header ๐Ÿ’–.

5.3.5. Mappings from an IP Notification โœจ

A message gets generated with the following fields ๐Ÿ’Œ:

From: Set to the MTS.MessageDeliveryEnvelope.other-fields.originator-name ๐Ÿซก.

To: Set to the IPMS.IPN.ipm-originator ๐ŸŽฏ.

Subject: Set to something of the form "X.400 Inter-Personal Receipt Notification" ๐Ÿ“ฃ.

Message-Type: Set to "InterPersonal Notification" ๐Ÿท๏ธ.

References: Set to IPMS.IPN.subject-ipm ๐Ÿ”—.

The following EBNF is defined for the body of the message. This format exists so that all the info from an interpersonal notification is available to the end user in a uniform way ๐ŸŒˆ.

        ipn-body-format = ipn-description <CRLF>
                        [ ipn-extra-information <CRLF> ]
                        ipn-content-return

        ipn-description = ipn-receipt / ipn-non-receipt

        ipn-receipt = "Your message to:" preferred-recipient <CRLF>

                 "was received at" receipt-time <CRLF> <CRLF>
                 "This notification was generated"
                 acknowledgement-mode <CRLF>
                 "The following extra information was given:" <CRLF>
                 ipn-suppl <CRLF>

        ipn-non-receipt "Your message to:"
                preferred-recipient <CRLF>
                ipn-reason


        ipn-reason = ipn-discarded / ipn-auto-forwarded

        ipn-discarded = "was discarded for the following reason:"
                        discard-reason <CRLF>

        ipn-auto-forwarded = "was automatically forwarded." <CRLF>
                        [ "The following comment was made:"
                                auto-comment ]


        ipn-extra-information =
                 "The following information types were converted:"
                 encoded-info

        ipn-content-return = "The Original Message is not available"
                        / "The Original Message follows:"
                          <CRLF> <CRLF> message


        preferred-recipient = mailbox
        receipt-time        = date-time
        auto-comment        = printablestring
        ipn-suppl           = printablestring

        non-receipt-reason = "Discarded" / "Auto-Forwarded"

        discard-reason     = "Expired" / "Obsoleted" /
                                "User Subscription Terminated"

        acknowledgement-mode = "Manually" / "Automatically"

The mappings for the common fields of IPMS.IPN (IPMS.CommonFields) onto this structure and the message header are ๐Ÿ—บ๏ธ:

subject-ipm Mapped to References: ๐Ÿงต.

ipm-originator Mapped to To: ๐Ÿ’œ.

ipm-preferred-recipient Mapped to EBNF.preferred-recipient ๐ŸŽ€.

conversion-eits Mapped to EBNF.encoded-info in EBNF.ipn-extra-information ๐Ÿช„.

The mappings for the elements of IPMS.IPN.non-receipt-fields (IPMS.NonReceiptFields) are ๐Ÿ™ƒ:

non-receipt-reason Used to select between EBNF.ipn-discarded and EBNF.ipn-auto-forwarded ๐Ÿ”€.

discard-reason Mapped to EBNF.discard-reason ๐Ÿ—‘๏ธ.

auto-forward-comment Mapped to EBNF.auto-comment ๐Ÿ’ฌ.

returned-ipm If present, the second option of EBNF.ipn-content-return SHOULD be chosen, and an RFC 822 mapping of the message included. Otherwise, the first option SHOULD be chosen ๐Ÿงณ.

The mappings for the elements of IPMS.IPN.receipt-fields (IPMS.ReceiptFields) are ๐Ÿงพ:

receipt-time Mapped to EBNF.receipt-time โฑ๏ธ.

acknowledgement-mode Mapped to EBNF.acknowledgement-mode ๐Ÿค.

suppl-receipt-info Mapped to EBNF.ipn-suppl ๐Ÿ“‹.

Here's an example notification, and it's so cute ๐Ÿฅน๐Ÿงš:

   From: Steve Kille <steve@cs.ucl.ac.uk>
   To: Julian Onions <jpo@computer-science.nottingham.ac.uk>
   Subject: X400 Inter-personal Receipt Notification
   Message-Type: InterPersonal Notification
   References: <1229.614418325@UK.AC.NOTT.CS>
   Date: Wed, 21 Jun 89 08:45:25 +0100
   Your message to: Steve Kille <steve@cs.ucl.ac.uk>
   was automatically forwarded.
   The following comment was made:
   Sent on to a random destination

   The following information types were converted: g3fax

   The Original Message is not available

5.3.6. Mappings from the MTS Abstract Service โœจ

Okay bestie, this part is all about the MTS mappings for User Messages (IPM and IPN) ๐Ÿ“ฌ The whole mapping is defined by spelling out how MTS.MessageDeliveryEnvelope gets mapped, and to make that work we add a bunch of extended RFC 822 fields ๐Ÿฆ‹ Here's the grammar, it's giving very organised:

   mts-field = "X400-MTS-Identifier" ":" mts-msg-id
             / "X400-Originator" ":" mailbox
             / "X400-Recipients" ":" 1#mailbox
             / "Original-Encoded-Information-Types" ":"
                             encoded-info
             / "X400-Content-Type" ":" mts-content-type
             / "Content-Identifier" ":" printablestring
             / "Priority" ":" priority
             / "Originator-Return-Address" ":" 1#mailbox
             / "DL-Expansion-History" ":" mailbox ";" date-time ";"
             / "Redirection-History" ":" redirection
             / "Conversion" ":" prohibition
             / "Conversion-With-Loss" ":" prohibition
             / "Requested-Delivery-Method" ":"
                             1*( labelled-integer )
             / "Delivery-Date" ":" date-time
             / "Discarded-X400-MTS-Extensions" ":"
                             1#( oid / labelled-integer )


   prohibition     = "Prohibited" / "Allowed"

   mts-msg-id       = "[" global-id ";" *text "]"

   mts-content-type = "P2" /  labelled-integer
                   / object-identifer

   priority        = "normal" / "non-urgent" / "urgent"

   redirection     = mailbox ";" "reason" "="
                           redirection-reason
                           ";" date-time

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

These elements are only appropriate for physical delivery ๐Ÿ“ฎ They show up as comments in the X400-Recipients: field, as described in Section 4.6.2.2, so no drama there.

Next up is a list of elements that imply security services the RFC 822 world just doesn't have ๐Ÿ” Here they are:

  • originator-certificate
  • message-token
  • content-confidentiality-algorithm-identifier
  • content-integrity-check
  • message-origin-authentication-check
  • message-security-label
  • proof-of-delivery-request

For these, if they're marked as critical for transfer or delivery, the message SHOULD be rejected ๐Ÿ’€ Otherwise they SHOULD be discarded. Lowkey harsh, but that's the vibe.

  • redirection-history: each element gets mapped to the extended RFC 822 field Redirection-History:. They SHOULD be ordered in the message header so the most recent redirection comes first, same order as trace ๐Ÿ”
  • dl-expansion-history: each element gets mapped to the extended RFC 822 field DL-Expansion-History:. They SHOULD be ordered in the message header so the most recent expansion comes first, same order as trace ๐Ÿ“‹

Last bit for this section: if any MTS (or MTA) Extensions that aren't specified in X.400 show up and they're marked as critical for transfer or delivery, the message SHOULD be rejected ๐Ÿšซ If they're not marked that way, they can safely be discarded โœจ The list of discarded fields SHOULD be indicated in the extended header Discarded-X400-MTS-Extensions: ๐Ÿงš


5.3.7. Mappings from the MTA Abstract Service ๐ŸŒธ

There are some mappings at the MTA Abstract Service level too, and they're done for IPM and IPN ๐Ÿซถ You can derive them from MTA.MessageTransferEnvelope. The reasons for doing mappings at this level (aka the layering gets a little violated, periodt) are:

  • Allowing for multiple recipients to share a single RFC 822 message.
  • Making the X.400 trace information available on the RFC 822 side.
  • Making any information on deferred delivery available.

The 822-MTS recipients SHOULD be calculated from the full list of X.400 recipients ๐Ÿ‘‘ That means all of the members of MTA.MessageTransferEnvelope.per-recipient-fields getting passed through the gateway where the responsibility bit is set. In some cases, a different RFC 822 message would be calculated for each recipient. If that's because each recipient asked for different services, then a different message SHOULD be generated ๐Ÿ’… If it's only because someone asked for non-disclosure of recipients, then the X400-Recipients: field SHOULD be omitted, and only one message gets sent. Very discreet, very iconic ๐Ÿคซ

Here's the EBNF for the extended RFC 822 headers:

   mta-field       = "X400-Received" ":" x400-trace
                   / "Deferred-Delivery" ":" date-time
                   / "Latest-Delivery-Time" ":" date-time


   x400-trace       = "by" md-and-mta ";"
                    [ "deferred until" date-time ";" ]
                    [ "converted" "(" encoded-info ")" ";" ]
                    [ "attempted" md-and-mta ";"  ]
                       action-list
                       ";" arrival-time


   md-and-mta       = [ "mta" mta "in" ]  global-id
   mta              = word
   arrival-time     = date-time


   action-list      = 1#action
   action           = "Redirected"
                    / "Expanded"
                    / "Relayed"
                    / "Rerouted"

If MTA.PerMessageTransferFields.deferred-delivery-time is present, use it to generate a Deferred-Delivery: field โฐ Now, for some reason X.400 doesn't make this info available at the MTS level on delivery ๐Ÿคทโ€โ™€๏ธ X.400 profiles, and in particular the CEN/CENELEC profile for X.400(1984) [Systems85a], say this element MUST be supported at the first MTA. If it isn't, the function MAY optionally be implemented by the gateway: that is, the gateway SHOULD hold the message until the time specified in the protocol element. So it's expected that this value will often be in the past, which means the extended RFC 822 field is mostly there for information ๐Ÿ“š

Next, merge MTA.PerMessageTransferFields.trace-information and MTA.PerMessageTransferFields.internal-trace-information to produce a single ordered trace list ๐Ÿงต If internal trace from other management domains hasn't been stripped, this may require complex interleaving (honestly a lot, but we survive). Use the merged list to generate a sequence of X400-Received: fields. The only difference between external trace and internal trace is the extra MTA information in internal trace elements ๐Ÿ”

When generating an RFC 822 message, all trace fields (X400- Received and Received) SHOULD be at the beginning of the header, before any other fields ๐ŸŽ€ Trace SHOULD be in chronological order, with the most recent element at the front of the message. A simple external example looks like this:

X400-Received: by /PRMD=UK.AC/ADMD=Gold 400/C=GB/ ; Relayed ;
        Tue, 20 Jun 89 19:25:11 +0100

And a more complex internal example:

X400-Received: by mta UK.AC.UCL.CS in
                                   /PRMD=UK.AC/ADMD=Gold 400/C=GB/ ;
        deferred until  Tue, 20 Jun 89 14:24:22 +0100 ;
        converted (undefined, g3fax) ";" attempted /ADMD=Foo/C=GB/ ;
        Relayed, Expanded, Redirected ; Tue, 20 Jun 89 19:25:11 +0100

5.3.8. Mappings from Report Delivery ๐Ÿ“จ

Delivery reports get mapped at the MTS service level ๐Ÿ’– That means only reports destined for the MTS user will be mapped. Some additional services are also taken from the MTA service, so it's a team effort ๐ŸŒˆ

5.3.8.1. MTS Mappings ๐Ÿ“ฌ

Okay bestie, so a Delivery Report gets represented as MTS.ReportDeliveryEnvelope ๐Ÿฆ‹. It's made up of per-report fields (MTS.PerReportDeliveryFields) and per-recipient fields, and honestly it's giving organised. ๐Ÿ’…

A message should be made with these fields:

  • From: An administrator at the gateway system. This is also the 822-MTS originator.
  • To: A mapping of the MTA.ReportTransferEnvelope.report-destination-name. This is also the 822-MTS recipient.
  • Message-Type: Set to "Delivery Report".
  • Subject: Something of the form "X.400 Delivery Report".

The body format is a fixed template so that everything gets shown to the RFC 822 user in the same way ๐ŸŒธ. First you get a summary of the critical stuff, then a full listing of all the parameters. Here's the grammar:

dr-body-format = dr-summary <CRLF>
                 dr-recipients <CRLF>
                 dr-extra-information <CRLF>
                 dr-content-return


dr-content-return = "The Original Message is not available"
                / "The Original Message follows:"
                  <CRLF> <CRLF> message

dr-summary = "This report relates to your message:" <CRLF>
             content-correlator <CRLF> <CRLF>
             "of" date-time <CRLF> <CRLF>
             "It was generated by:" report-point <CRLF>
             "at" date-time <CRLF> <CRLF>
             "It was later converted to RFC 822 by:" mailbox <CRLF>
             "at" date-time <CRLF> <CRLF>


dr-recipients = *(dr-recipient <CRLF> <CRLF>)

dr-recipient = dr-recip-success / dr-recip-failure

dr-recip-success =
                "Your message was successfully delivered to:"
                mailbox "at" date-time

dr-recip-failure = "Your message was not delivered to:"
                mailbox <CRLF>
                "for the following reason:" *word


dr-extra-information =
 "-----------------------------------------------" <CRLF> <CRLF>
 "The following information is derived from the Report" <CRLF>
 "It may be useful for problem diagnosis:" <CRLF> <CRLF>
 drc-field-list

drc-field-list       = *(drc-field <CRLF>)

drc-field = "Subject-Submission-Identifier" ":"
                        mts-msg-id
          / "Content-Identifier" ":" printablestring
          / "Content-Type" ":" mts-content-type
          / "Original-Encoded-Information-Types" ":"
                        encoded-info
          / "Originator-and-DL-Expansion-History" ":"
                        dl-history
          / "Reporting-DL-Name" ":" mailbox
          / "Content-Correlator" ":" content-correlator
          / "Recipient-Info" ":" recipient-info
          / "Subject-Intermediate-Trace-Information" ":"
                        x400-trace


recipient-info  = mailbox "," std-or ";"
                report-type
                [ "converted eits" encoded-info ";" ]
                [ "originally intended recipient"
                         mailbox "," std-or ";" ]
                [ "last trace" [ encoded-info ] date-time ";" ]
                [ "supplementary info" <"> printablestring <"> ";" ]
                [ "redirection history" 1#redirection ";"
                [ "physical forwarding address"
                                      printablestring ";" ]


report-type     = "SUCCESS" drc-success
                / "FAILURE" drc-failure

drc-success     = "delivered at" date-time ";"
                [ "type of MTS user" labelled-integer ";" ]

drc-failure     = "reason" labelled-integer ";"
                [ "diagnostic" labelled-integer ";" ]

report-point = [ "mta" word "in" ] global-id
content-correlator = *word
dl-history = 1#( mailbox "(" date-time ")")

The format is a fixed definition, no wiggle room ๐Ÿ™…โ€โ™€๏ธ. The only exception is that EBNF.drc-fields should follow RFC 822 folding rules, so keep that in mind when you're folding lines โœจ.

Next, the elements of MTS.ReportDeliveryEnvelope.per-report-fields get mapped onto extended RFC 822 fields like this:

  • subject-submission-identifier: Mapped to EBNF.drc-field (Subject-Submission-Identifier).
  • content-identifier: Mapped to EBNF.drc-field (Content-Identifier).
  • content-type: Mapped to EBNF.drc-field (Content-Type).
  • original-encoded-information-types: Mapped to EBNF.drc-field (Encoded-Info).

The extensions from MTS.ReportDeliveryEnvelope.per-report-fields.extensions are mapped too:

  • originator-and-DL-expansion-history: Mapped to EBNF.drc-field (Originator-and-DL-Expansion-History).
  • reporting-DL-name: Mapped to EBNF.drc-field (Reporting-DL-Name).
  • content-correlator: Mapped to EBNF.content-correlator, provided that the encoding is IA5String (this should always be the case). This is used in EBNF.dr-summary and EBNF.drc-field-list. In the former, LWSP may be added, in order to improve the layout of the message.
  • message-security-label, reporting-MTA-certificate, report-origin-authentication-check: These security parameters should not be present. If they are, they should be discarded in preference to discarding the whole report. ๐Ÿ›ก๏ธ

For each element of MTS.ReportDeliveryEnvelope.per-recipient-fields, a value of EBNF.dr-recipient and an EBNF.drc-field (Recipient-Info) should be generated ๐Ÿงš. The components are mapped like this:

  • actual-recipient-name: Used to generate the first EBNF.mailbox and EBNF.std-or in EBNF.recipient-info. Both RFC 822 and X.400 forms are given, as there may be a problem in the mapping tables. It also generates the EBNF.mailbox in EBNF.dr-recip-success or EBNF.dr-recip-failure.
  • report: If it is MTS.Report.delivery, then set EBNF.dr-recipient to EBNF.dr-recip-success, and similarly set EBNF.report-type, filling in EBNF.drc-success. If it is a failure, set EBNF.dr-recipient to EBNF.dr-recip-failure, making a human interpretation of the reason and diagnostic codes, and including any supplementary information. EBNF.drc-failure should be filled in systematically.
  • converted-encoded-information-types: Set EBNF.drc-field ("converted eits").
  • originally-intended-recipient: Set the second ("originally intended recipient") mailbox and std-or in EBNF.drc-field.
  • supplementary-info: Set EBNF.drc-field ("supplementary info"), and include this information in EBNF.dr-recip-failure.
  • redirection-history: Set EBNF.drc-field ("redirection history").
  • physical-forwarding-address: Set ENBF.drc-field ("physical forwarding address").
  • recipient-certificate: Discard.
  • proof-of-delivery: Discard.
Any unknown extensions should be discarded, irrespective of criticality. ๐Ÿ—‘๏ธ

The original message should be included in the delivery port. The original message will usually be available at the gateway, as discussed in Section 5.2. ๐Ÿ’Œ


5.3.8.2. MTA Mappings ๐Ÿš‚

The single 822-MTS recipient is constructed from MTA.ReportTransferEnvelope.report-destination-name, using the mappings of Chapter 4. Unlike with a user message, this information is not available at the MTS level, so no cheating ๐Ÿ™ˆ.

The following additional mappings should be made:

  • MTA.ReportTransferEnvelope.report-destination-name: This should be used to generate the To: field.
  • MTA.ReportTransferEnvelope.identifier: Mapped to the extended RFC 822 field "X400-MTS-Identifier:". It may also be used to derive a "Message-Id:" field.
  • MTA.ReportTransferEnvelope.trace-information and MTA.ReportTransferEnvelope.internal-trace-information: Mapped onto the extended RFC 822 field "X400-Received:", as described in Section 5.3.7. The first element should also be used to generate the "Date:" field, and the EBNF.failure-point.
  • MTA.PerRecipientReportTransferFields.last-trace-information: Mapped to EBNF.recipient-info (last trace).
  • MTA.PerReportTransferFields.subject-intermediate-trace-information: Mapped to EBNF.drc-field (subject-Intermediate-Trace-Information). These fields should be ordered so that the most recent trace element comes first. โฐ

5.3.8.3. Example Delivery Report ๐ŸŽ€

This is an example of a moderately complex report, so buckle up ๐ŸŒˆ.

From: The Postmaster <postmaster@cs.ucl.ac.uk>
To: jpo@computer-science.nottingham.ac.uk
Subject: X.400 Delivery Report
Message-Type: Delivery Report
Date: Wed, 21 Jun 89 08:45:25 +0100
X400-MTS-Identifier: /PRMD=UK.AC/ADMD=Gold 400/C=GB/;13412345235
This report relates to your message:
  Date: Wed, 21 Jun 89 06:15:43 +0000
  Message-ID:  <8907140715.aa09015@CS.Nott.AC.UK>
  Subject: Now it's the fine tuning .... !
  To: Piete Brooks (Postmaster) <pb@computer-lab.cambridge.ac.uk>

of Wed, 21 Jun 89 06:15:43 +0000

It was generated by mta PK in /PRMD=UK/ADMD=DBP/C=DE/
at Wed, 21 Jun 89 08:45:25 +0100

It was later converted to RFC 822 by: Mail-Gateway@oxbridge.ac.uk
at Wed, 21 Jun 89 08:45:26 +0100

Your message was not delivered to: bad-user@nowhere
for the following reason: Rendition problem with punctuation
        (Umlaut failure)

-----------------------------------------------

The following information is derived from the Report
It may be useful for problem diagnosis:

Subject-Submission-Identifier:
                       [/PRMD=UK.AC/ADMD=Gold 400/C=GB/;148996]
Content-Identifier:  X.400 Delivery Report
Content-Type: P2-1988 (22)
Original-Encoded-Information-Types: ia5
Content-Correlator: Date: Wed, 21 Jun 89 06:15:43 +0000
    Message-ID:  <8907140715.aa09015@CS.Nott.AC.UK>
    Subject: Now it's the fine tuning .... !
    To: Piete Brooks (Postmaster) <pb@computer-lab.cambridge.ac.uk>
Recipient-Info:
    bad-user@nowhere, /S=bad-user/PRMD=nowhere/ADMD=DBP/C=DE/ ;
    FAILURE reason Physical-Rendition-Not-Performed (3) ;
    diagnostic Punctuation-Symbol-Loss (23) ;
    supplementary info Umlaut failure

The Original Message follows:

Subject: Now it's the fine tuning .... !
Date: Wed, 21 Jun 89 06:15:43 +0000
From: Julian Onions <jpo@computer-science.nottingham.ac.uk>
To: Piete Brooks (Postmaster) <pb@computer-lab.cambridge.ac.uk>
Cc: bad-user@nowhere
Message-ID:  <8907140715.aa09015@CS.Nott.AC.UK>

A short test

5.3.9. Probe ๐Ÿ”

This is an MTS internal issue. Any probe should be serviced by the gateway, as there is no equivalent RFC 822 functionality. The value of the reply is dependent on whether the gateway could service an MTS Message with the values specified in the probe. The reply should make use of MTS.SupplementaryInformation to indicate that the probe was serviced by the gateway. ๐Ÿซถ


Appendix A - Differences with RFC 987 ๐Ÿ“

This appendix summarises changes between this document and RFC 987/RFC 1026. Let's see the glow-up ๐Ÿ’–.

1. Introduction

  • The model has shifted from a protocol based mapping to a service based mapping. This has increased the generality of the specification, and improved the model. This change affects the entire document. โœจ
  • A restriction on scope has been added.

2. Service Elements

  • The new service elements of X.400 are dealt with.
  • A clear distinction is made between origination and reception.

3. Basic Mappings

  • Add teletex support.
  • Add object identifier support.
  • Add labelled integer support.
  • Make PrintableString <-> ASCII mapping reversible.
  • The printable string mapping is aligned to the NBS mapping derived from RFC 987. ๐ŸŒธ

4. Addressing โœจ

Okay bestie, here's what's new with addressing ๐Ÿ’–

  • Support for new addressing attributes ๐Ÿก
  • The message ID mapping is no longer table driven, so it's a whole vibe change ๐ŸŒธ

5. Detailed Mappings ๐Ÿ’Œ

  • Define an extended IPM Header and use it instead of a second body part for RFC 822 extensions ๐ŸŽ€
  • Realign the element names ๐Ÿ“
  • New report syntax! The header is simpler and there's now a mandatory body format, because the RFC 987 header format was literally unusable ๐Ÿ’€
  • Drop the complex autoforwarded mapping ๐Ÿ™ˆ
  • Add a full mapping for IP Notifications, including a body format ๐Ÿฆ‹
  • Adopt an MTS Identifier syntax that lines up with the O/R Address syntax ๐Ÿงš
  • A new format for X400 Trace representation on the RFC 822 side โœจ

6. Appendices ๐ŸŽ€

  • Move the Appendix on restricted 822 mappings to a separate RFC ๐Ÿ“„
  • Delete the Phonenet and SMTP Appendixes ๐Ÿ—‘๏ธ

Appendix B - Mappings specific to the JNT Mail ๐Ÿ’Œ

Okay so this Appendix is all about the JNT Mail Protocol. It spells out the specific changes that apply in that context ๐Ÿซถ

1. Introduction

There are five aspects of a gateway that are JNT Mail specific, and each one gets its own section of this appendix ๐Ÿ’…

2. Domain Ordering

When you're interpreting and generating domains, the UK NRS domain ordering must be used ๐ŸŒˆ

3. Acknowledge-To:

Okay, this field has no direct functional equivalent in X.400, which is a little sad ๐Ÿ˜ญ But it can be supported to an extent, and it can be used to improve X.400 support, so we're not totally out of luck โœจ

If an Acknowledge-To: field is present when going from JNT Mail to X.400, then MTS.PerRecipientSubmissionFields.originator-request-report.report shall be set for each recipient. If there is more than one address in the Acknowledge-To: field, or if the one address is not equivalent to the 822-MTS return address, then:

  1. Acknowledgement(s) should be generated by the gateway. The text of these acknowledgements should indicate that they were generated by the gateway ๐Ÿค–
  2. The Acknowledge-To: field should also be passed as an extension heading ๐ŸŽ€

When going from X.400 to JNT Mail, in cases where MTA.PerRecipientMessageTransferFields.per-recipient-indicators.originator-report is set, the copy of the message to that recipient should have an Acknowledge-To: field containing the MTS.OtherMessageDeliveryFields.originator-name ๐Ÿ’Œ No special treatment should be given when MTA.PerRecipientMessageTransferFields.per-recipient-indicators.originating-MTA-report is set ๐Ÿ™…โ€โ™€๏ธ And no attempt should be made to map Receipt notification requests onto Acknowledge-To:, because no association can be guaranteed between IPMS and MTS level addressing information. That's a hard no from me ๐Ÿ’€

4. Trace

JNT Mail trace uses the Via: syntax ๐Ÿฆ‹ When going from JNT Mail to X.400, a mapping similar to the one for Received: is used. No MTS.GlobalDomainIdentifier of the site making the trace can be derived from the Via:, so a value for the gateway should be used instead ๐ŸŒธ The trace text, including the "Via:", should be unfolded, truncated to MTS.ub-mta-name-length (32), and mapped to MTA.InternalTraceInformationElement.mta-name. There is no JNT Mail specific mapping for the reverse direction, so no drama there ๐Ÿซถ

5. Timezone specification

The extended syntax of zone defined in the JNT Mail Protocol should be used in the mapping of UTCTime defined in Chapter 3 ๐ŸŒ

6. Lack of 822-MTS originator specification

Okay this one is a little messy ๐Ÿฅด In JNT Mail, the default mapping of MTS.OtherMessageDeliveryFields.originator-name is to the Sender: field. That can cause a problem going from X.400 to JNT Mail if the mapping of IPMS.Heading has already generated a Sender: field. To fix it, a new extended JNT Mail field is defined. It's chosen to line up with the JNT recommendation for interworking with full RFC 822 systems [Kille84b] ๐Ÿค

The new field is defined like this:
original-sender     = "Original-Sender" ":" mailbox

If an IPM has no IPMS.Heading.authorising-users component and IPMS.Heading.originator.formal-name is different from MTS.OtherMessageDeliveryFields.originator-name, then map MTS.OtherMessageDeliveryFields.originator-name onto the Sender: field ๐Ÿ’โ€โ™€๏ธ

If an IPM does have an IPMS.Heading.authorising-users component, and IPMS.Heading.originator.formal-name is different from MTS.OtherMessageDeliveryFields.originator-name, then MTS.OtherMessageDeliveryFields.originator-name should be mapped onto the Sender: field, and IPMS.Heading.originator should be mapped onto the Original-Sender: field ๐ŸŽ€

In other cases, MTS.OtherMessageDeliveryFields.originator-name is already correctly represented, so we can all relax ๐Ÿงš

Appendix C - Mappings specific to UUCP Mail ๐Ÿ“ฎ

Gatewaying UUCP and X.400 is handled by first gatewaying the UUCP address into RFC 822 syntax (using RFC 976), and then gatewaying the resulting RFC 822 address into X.400. For example, this X.400 address:

Country         US
Organisation    Xerox
Personal Name   John Smith

might be expressed from UUCP as inthop!gate!gatehost.COM!/C=US/O=Xerox/PN=John.Smith/ ๐Ÿฆ‹

(assuming gate is a UUCP-Internet gateway and gatehost.COM is an Internet-X.400 gateway) or as inthop!gate!Xerox.COM!John.Smith ๐Ÿ’–

(assuming that Xerox.COM and /C=US/O=Xerox/ are equivalent ๐Ÿค“)

Going the other way, a UUCP address like Smith@ATT.COM, integrated into 822, would be handled as any other 822 address ๐ŸŒˆ A non-integrated address such as inthop!dest!user might be handled through a pair of gateways:

Country         US
ADMD            ATT
PRMD            Internet
Organisation    GateOrg
RFC-822         inthop!dest!user@gatehost.COM

or through a single X.400 to UUCP gateway:

Country         US
ADMD            ATT
PRMD            UUCP
Organisation    GateOrg
RFC-822         inthop!dest!user

Appendix D - Object Identifier Assignment ๐Ÿงš

An object identifier is needed for the extension IPMS element, and the following value should be used ๐Ÿ”ฅ

      rfc-987-88 OBJECT IDENTIFIER ::=
          {ccitt data(9) pss(2342) ucl(234219200300) rfc-987-88(200)}

      id-rfc-822-field OBJECT IDENTIFIER ::= {rfc987-88 field(0)}

Appendix E - BNF Summary โœจ

okay bestie, this is the grammar cheat sheet, the BNF summary, all the little rules that tell every implementation exactly what's allowed ๐Ÿ’… I'm keeping every line exactly as it's written, typos and all ๐Ÿซถ

   boolean = "TRUE" / "FALSE"


   numericstring = *DIGIT


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


   ps-encoded       = *( ps-restricted-char / ps-encoded-char )
   ps-encoded-char  = "(a)"               ; (@)
                     / "(p)"               ; (%)
                     / "(b)"               ; (!)
                     / "(q)"               ; (")
                     / "(u)"               ; (_)
                     / "(l)"               ; "("
                     / "(r)"               ; ")"
                     / "(" 3DIGIT ")"

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


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


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

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


   object-identifier ::= [ defined-value ] oid-comp-list

   oid-comp-list ::= oid-comp oid-comp-list
                   | oid-comp

   defined-value ::= key-string

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


   encoded-info    = 1#encoded-type

   encoded-type    = built-in-eit / object-identifier

   built-in-eit    = "Undefined"         ; undefined (0)
                   / "Telex"             ; tLX (1)
                   / "IA5-Text"          ; iA5Text (2)
                   / "G3-Fax"            ; g3Fax (3)
                   / "TIF0"              ; tIF0 (4)
                   / "Teletex"           ; tTX (5)
                   / "Videotex"          ; videotex (6)
                   / "Voice"             ; voice (7)
                   / "SFD"               ; sFD (8)
                   / "TIF1"              ; tIF1 (9)


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

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

   initial         = ALPHA

   surname         = printablestring
   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


   dmn-or-address  = dmn-part *( "." dmn-part )
   dmn-part        = attribute "$" value
   attribute       = standard-type
                   / "~" dmn-printablestring
   value           = dmn-printablestring
                   / "@"
   dmn-printablestring =
                   = *( dmn-char / dmn-pair )
   dmn-char        = <"{", "}", "*", and any ps-char
                                         except ".">
   dmn-pair        = "."


   global-id = std-or-address


   mta-field       = "X400-Received" ":" x400-trace
                   / "Deferred-Delivery" ":" date-time
                   / "Latest-Delivery-Time" ":" date-time


   x400-trace       = "by" md-and-mta ";"
                    [ "deferred until" date-time ";" ]
                    [ "converted" "(" encoded-info ")" ";" ]
                    [ "attempted" md-and-mta ";"  ]
                       action-list
                       ";" arrival-time

   md-and-mta       = [ "mta" mta "in" ]  global-id
   mta              = word
   arrival-time     = date-time


   action-list      = 1#action
   action           = "Redirected"
                    / "Expanded"
                    / "Relayed"
                    / "Rerouted"

ok so that was the first chunk, and it's already a lot ๐Ÿ˜ญ the next bit is all about delivery reports, which is giving very "your message did or did not arrive" energy ๐Ÿ“ฌ

   dr-body-format = dr-summary <CRLF>
                    dr-recipients <CRLF>
                    dr-extra-information <CRLF>
                    dr-content-return


   dr-content-return = "The Original Message is not available"
                   / "The Original Message follows:"
                     <CRLF> <CRLF> message

   dr-summary = "This report relates to your message:" <CRLF>
                   content-correlator <CRLF> <CRLF>
                "of" date-time <CRLF> <CRLF>
                "It was generated by:" report-point <CRLF>
                "at" date-time <CRLF> <CRLF>
                "It was later converted to RFC 822 by:" mailbox <CRLF>
                "at" date-time <CRLF> <CRLF>


   dr-recipients = *(dr-recipient <CRLF> <CRLF>)

   dr-recipient = dr-recip-success / dr-recip-failure

   dr-recip-success =
                   "Your message was successfully delivered to:"
                   mailbox "at" date-time


   dr-recip-failure = "Your message was not delivered to:"
                           mailbox <CRLF>
                      "for the following reason:" *word


   dr-extra-information =
    "-----------------------------------------------" <CRLF> <CRLF>
    "The following information is derived from the Report" <CRLF>
    "It may be useful for problem diagnosis:" <CRLF> <CRLF>
   drc-field-list

   drc-field-list       = *(drc-field <CRLF>)

   drc-field = "Subject-Submission-Identifier" ":"
                                   mts-msg-id
             / "Content-Identifier" ":" printablestring
             / "Content-Type" ":" mts-content-type
             / "Original-Encoded-Information-Types" ":"
                           encoded-info
             / "Originator-and-DL-Expansion-History" ":"
                           dl-history
             / "Reporting-DL-Name" ":" mailbox
             / "Content-Correlator" ":" content-correlator
             / "Recipient-Info" ":" recipient-info


   recipient-info  = mailbox "," std-or ";"
                   report-type
                   [ "converted eits" encoded-info ";" ]
                   [ "originally intended recipient"
                           mailbox "," std-or ";" ]
                   [ "supplementary info" <"> printablestring <"> ";" ]
                   [ "redirection history" 1#redirection ";"
                   [ "physical forwarding address"
                                         printablestring ";" ]


   report-type     = "SUCCESS" drc-success
                   / "FAILURE" drc-failure

   drc-success     = "delivered at" date-time ";"
                   [ "type of MTS user" labelled-integer ";" ]

   drc-failure     = "reason" labelled-integer ";"
                   [ "diagnostic" labelled-integer ";" ]


   report-point = [ "mta" word "in" ] global-id
   content-correlator = *word
   dl-history = 1#( mailbox "(" date-time ")")


   mts-field = "X400-MTS-Identifier" ":" mts-msg-id
             / "X400-Originator" ":" mailbox
             / "X400-Recipients" ":" 1#mailbox
             / "Original-Encoded-Information-Types" ":"

                               encoded-info
             / "X400-Content-Type" ":" mts-content-type
             / "Content-Identifier" ":" printablestring
             / "Priority" ":" priority
             / "Originator-Return-Address" ":" 1#mailbox
             / "DL-Expansion-History" ":" mailbox ";" date-time ";"
             / "Redirection-History" ":" redirection
             / "Conversion" ":" prohibition
             / "Conversion-With-Loss" ":" prohibition
             / "Requested-Delivery-Method" ":"
                             1*( labelled-integer )
             / "Delivery-Date" ":" date-time
             / "Discarded-X400-MTS-Extensions" ":"
                             1#( oid / labelled-integer )


   prohibition     = "Prohibited" / "Allowed"

   mts-msg-id       = "[" global-id ";" *text "]"

   mts-content-type = "P2" /  labelled-integer
                   / object-identifer

   priority        = "normal" / "non-urgent" / "urgent"

   redirection     = mailbox ";" "reason" "="
                           redirection-reason
                           ";" date-time
   redirection-reason =
             "Recipient Assigned Alternate Recipient"
           / "Originator Requested Alternate Recipient"
           / "Recipient MD Assigned Alternate Recipient"

next up: the IPN stuff ๐Ÿฆ‹ ipn-body-format is basically the "we got your message" notifications, and the grammar for those is so dramatic ๐ŸŽ€

   ipn-body-format = ipn-description <CRLF>
                   [ ipn-extra-information <CRLF> ]
                   ipn-content-return

   ipn-description = ipn-receipt / ipn-non-receipt

   ipn-receipt = "Your message to:" preferred-recipient <CRLF>
            "was received at" receipt-time <CRLF> <CRLF>
            "This notification was generated"
            acknowledgement-mode <CRLF>
            "The following extra information was given:" <CRLF>
            ipn-suppl <CRLF>

   ipn-non-receipt "Your message to:"

            preferred-recipient <CRLF>
            ipn-reason


   ipn-reason = ipn-discarded / ipn-auto-forwarded

   ipn-discarded = "was discarded for the following reason:"
                   discard-reason <CRLF>

   ipn-auto-forwarded = "was automatically forwarded." <CRLF>
                   [ "The following comment was made:"
                           auto-comment ]


   ipn-extra-information =
            "The following information types were converted:"
            encoded-info

   ipn-content-return = "The Original Message is not available"
                   / "The Original Message follows:"
                   <CRLF> <CRLF> message


   preferred-recipient = mailbox
   receipt-time        = date-time
   auto-comment        = printablestring
   ipn-suppl           = printablestring


   non-receipt-reason = "Discarded" / "Auto-Forwarded"

   discard-reason     = "Expired" / "Obsoleted" /
                           "User Subscription Terminated"

   acknowledgement-mode = "Manually" / "Automatically"

and last but definitely not least, the message-field stuff ๐Ÿ“ this is where the importance, sensitivity, and language values live, so it's kinda the glow-up section โœจ

   ms-field = "Obsoletes" ":" 1#msg-id
            / "Expiry-Date" ":" date-time
            / "Reply-By" ":" date-time
            / "Importance" ":" importance
            / "Sensitivity" ":" sensitivity
            / "Autoforwarded" ":" boolean
            / "Incomplete-Copy" ":"
            / "Language" ":" language
            / "Message-Type" ":" message-type
            / "Discarded-X400-IPMS-Extensions" ":" 1#oid

   importance      = "low" / "normal" / "high"


   sensitivity     = "Personal" / "Private" /
                          "Company-Confidential"

   language        = 2*ALPHA [ language-description ]
   language-description = printable-string


   message-type    = "Delivery Report"
                   / "InterPersonal Notification"
                   / "Multiple Part"

that's the whole BNF summary, periodt ๐ŸŒˆ๐Ÿ‘‘ ๐Ÿ’œ more of this document is coming, so stay tuned bestie ๐Ÿงš

Appendix F - Format of address mapping tables ๐ŸŽ€โœจ

okay bestie, this appendix is about the map between the domain world and the X.400 world ๐Ÿ—บ๏ธ๐Ÿ’– There's a real need for it, because when both sides of the gateway know the mapping, the service is just so much better for everyone ๐Ÿซถ So the doc strongly encourages defining mappings and sharing them in the format defined right here ๐Ÿ’…

The syntax starts out as tables, but it's built so it can work with domain nameservers too (like the Internet Domain nameservers or the UK NRS) ๐Ÿฆ‹ The mapping is not symmetric, so you need a separate table for each direction ๐Ÿ™ˆ And if more than one match is possible, the longest possible match should be used ๐Ÿ’œ

First up is an address syntax that's compatible with the syntax used for 822.domains. It's meant to be used with systems that support this kind of name ๐ŸŒธ

To represent null attributes, there's a pseudo-value called @ (which is not a printable string character) that means "this level of the hierarchy is left out" ๐Ÿงš That's different from including the element with no value, although a correct X.400 implementation will treat both the same way ๐Ÿ’… Also, this syntax isn't meant for users to touch directly ๐Ÿ™ˆ

Here's the grammar, copied exactly:

   dmn-or-address  = dmn-part *( "." dmn-part )
   dmn-part        = attribute "$" value
   attribute       = standard-type
                   / "~" dmn-printablestring
   value           = dmn-printablestring
                   / "@"

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

Here's an example usage:

   ~ROLE$Big.Chief.ADMD$ATT.C$US
   PRMD$DEC.ADMD$@.C$US

The first one shows how a "." gets quoted, and the second shows the ADMD level being left out ๐ŸŽ€

There are also some extra rules for dmn-or-address, and they're important ๐Ÿ‘‘

  1. Only C, ADMD, PRMD, O, and OU may be used.
  2. There must be a strict ordering of all components, with the most significant components on the RHS.
  3. No components may be omitted from the hierarchy, although the hierarchy may terminate at any level. If the mapping is to an omitted component, the @ syntax is used.

For domain -> X.400, the format is:

   domain-syntax "#" dmn-or-address "#"

The trailing "#" is there for clarity, because a dmn-or-address can end up with trailing blanks ๐Ÿ™ˆ Also, lines starting with "#" are comments ๐Ÿ’œ

Some examples:

   AC.UK#PRMD$UK.AC.ADMD$GOLD 400.C$GB#
   XEROX.COM#O$Xerox.ADMD$ATT.C$US#
   GMD.DE#O$@.PRMD$GMD.ADMD$DBP.C$DE#

For X.400 -> domain, the format flips around:

   dmn-or-address "#" domain-syntax "#"

And an example:

   #
   # Mapping table
   #
   PRMD$UK.AC.ADMD$GOLD 400.C$GB#AC.UK#

References ๐Ÿ“š

  • [Braden89a] Braden, R., Editor, "Requirements for Internet Hosts -- Application and Support", RFC 1123, USC/Information Sciences Institute, October 1989.
  • [CCITT88a] CCITT, "CCITT Recommendations X.408", Message Handling Systems: Encoded Information Type Conversion Rules, CCITT, December 1988.
  • [CCITT/ISO88a] CCITT/ISO, "CCITT Recommendations X.400/ ISO IS 10021-1", Message Handling: System and Service Overview, CCITT/ISO, December 1988.
  • [CCITT/ISO88b] CCITT/ISO, "CCITT Recommendations X.420/ ISO IS 10021-7", Message Handling Systems: Interpersonal Messaging System, CCITT/ISO, December 1988.
  • [CCITT/ISO88c] CCITT/ISO, "CCITT Recommendations X.411/ ISO IS 10021-4", Message Handling Systems: Message Transfer System: Abstract Service Definition and Procedures, CCITT/ISO, December 1988.
  • [CCITT/ISO88d] CCITT/ISO, "Specification of Abstract Syntax Notation One (ASN.1)", CCITT Recommendation X.208 / ISO IS 8824, CCITT/ISO, December 1988.
  • [Crocker82a] Crocker, D., "Standard of the Format of ARPA Internet Text Messages", RFC 822, August 1982.
  • [Horton86a] Horton, M., "UUCP Mail Interchange Format Standard", RFC 976, February 1986.
  • [Kille84b] Kille, S., "Gatewaying between RFC 822 and JNT Mail", JNT Mailgroup Note 15, May 1984.
  • [Kille84a] Kille, S., Editor, "JNT Mail Protocol (revision 1.0)", Joint Network Team, Rutherford Appleton Laboratory, March 1984.
  • [Kille86a] Kille, S., "Mapping Between X.400 and RFC 822", UK Academic Community Report (MG.19) / RFC 987, June 1986.
  • [Kille87a] Kille, S., "Addendum to RFC 987", UK Academic Community Report (MG.23) / RFC 1026, August 1987.
  • [Kille89a] Kille, S., "A String Encoding of Presentation Address", UCL Research Note 89/14, March 1989.
  • [Kille89b] Kille, S., "Mapping Between Full RFC 822 and RFC 822 with Restricted Encoding", RFC 1137, December 1989.
  • [Larmouth83a] Larmouth, J., "JNT Name Registration Technical Guide", Salford University Computer Centre, April 1983.
  • [Mockapetris87a] Mockapetris, P., "Domain Names - Concepts and Facilities", RFC 1034, USC/Information Sciences Institute, November 1987.
  • [Postel82a] Postel, J., "Simple Mail Transfer Protocol", RFC 821, USC/Information Sciences Institute, August 1982.
  • [Rose85a] Rose M., and E. Stefferud, "Proposed Standard for Message Encapsulation", RFC 934, January 1985.
  • [Systems85a] CEN/CENELEC/Information Technology/Working Group on Private Message Handling Systems, "FUNCTIONAL STANDARD A/3222", CEN/CLC/IT/WG/PMHS N 17, October 1985.

Security Considerations ๐Ÿ”’๐Ÿ˜ฑ

Security issues are not discussed in this memo. ๐Ÿ’€ Yep, that's the whole section, so keep your guard up and don't assume anything about this mapping is protected ๐Ÿ™ˆ

Author's Address ๐Ÿ’Œ

   Steve Kille
   University College London
   Gower Street
   WC1E 6BT
   England

   Phone: +44-1-380-7294

   EMail: S.Kille@Cs.Ucl.AC.UK

And that's the whole RFC, bestie! ๐ŸŒˆ๐Ÿ‘‘๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from