RFC 1138
Mapping between X.400(1988) / ISO 10021 and RFC 822
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
- 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
- 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:
- Consistent service to users. ๐
- 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 ๐
- 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 ๐
- Subject to 1), functionality across a gateway should be as high as possible. ๐
- 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. ๐ญ๐ซถ
- 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 ๐ง
- 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:
- Origination
- Reception
- 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:
- 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 ๐.
- 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:
- Submission (used by IPMS Origination)
- Delivery (used by IPMS Reception)
- 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:
- Identification of a list of recipients.
- Identification of an error return address.
- 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:
- A Report (MTA, and MTS Services)
- An IPN (MTA, MTS, and IPMS Services)
- 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:
- Overview - this chapter.
- Service Elements - This describes the (end user) services mapped by a gateway.
- Basic mappings - This describes some basic notation used in Chapters 3-5, the mappings between character sets, and some fundamental protocol elements.
- Addressing - This considers the mapping between X.400 O/R names and RFC 822 addresses, which is a fundamental gateway component.
- 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 ofFrom:๐ค.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 ๐ซถ
- 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). - 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:
- There is no generational qualifier
- Initials contain only letters
- Given Name does not contain full stop ("."), and is at least two characters long.
- 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 ๐ฉ:
- The syntaxes are different enough to make this awkward.
- 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 ๐:
- 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 โจ.
- 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 ๐.
- 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 ๐:
- In the context of RFC 822, and RFC 1034 [Crocker82a, Mockapetris87a], the string can be used directly โจ.
- In the context of the JNT Mail protocol, and the NRS [Kille84a, Larmouth83a], the string should be interpreted according to Mailgroup Note 15 [Kille84b] ๐ฆ.
- 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 โจ:
- To allow consistent mapping into the domain hierarchy ๐ง.
- To keep order preserved over multiple mappings ๐ฆ.
There are three places where an order has to be specified ๐ธ:
- 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 ๐ .
- For the Organisational Units (OU) in MTS.ORAddress, the first OU in the SEQUENCE is the most significant, as specified in X.400 ๐ง.
- 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 ๐
- X.400 addresses encoded in RFC 822. This also covers RFC 822 addresses that have reversible encodings.
- "Genuine" RFC 822 addresses.
The mapping goes like this, and we always start by assuming case 1) first ๐
STAGE I.
- 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. ๐
- 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. โจ
- If the local-part contains any characters not in PrintableString, go to stage II.
- 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. ๐ง
- 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.
- 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.
- 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:
- Convert the EBNF.822-address to PrintableString, as specified in Chapter 3.
- The "RFC-822" domain defined attribute should be generated from this string.
- 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:
- RFC 822 addresses encoded in X.400.
- "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:
- Contain the special attribute.
AND
- 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
- 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.
- For all string encoded attributes, remove any leading or trailing spaces, and replace adjacent spaces with a single space.
- 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.
- 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.
- 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-methodphysical-forwarding-prohibitedโ"(Physical Forwarding Prohibited)"physical-forwarding-address-requestโ"(Physical Forwarding Address Requested)"physical-delivery-modesregistered-mail-typerecipient-number-for-advicephysical-rendition-attributesphysical-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:
- 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.
- Reject any inbound message which would cause a message violating constraints to be generated. This will be robust, but may prevent useful communication.
- 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 fromDate:.MTA.DomainSuppliedInformation.routing-action: set torelayed.
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 theReceived:line.MTA.MTASuppliedInformation.routing-action: set torelayed.
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 fieldTo: 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 ๐คทโโ๏ธ:
- 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.
- 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 ๐งโ๐ป.
- 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-certificatemessage-tokencontent-confidentiality-algorithm-identifiercontent-integrity-checkmessage-origin-authentication-checkmessage-security-labelproof-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 fieldRedirection-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 fieldDL-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 inEBNF.dr-summaryandEBNF.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.mailboxandEBNF.std-orinEBNF.recipient-info. Both RFC 822 and X.400 forms are given, as there may be a problem in the mapping tables. It also generates theEBNF.mailboxinEBNF.dr-recip-successorEBNF.dr-recip-failure. - report: If it is
MTS.Report.delivery, then setEBNF.dr-recipienttoEBNF.dr-recip-success, and similarly setEBNF.report-type, filling inEBNF.drc-success. If it is a failure, setEBNF.dr-recipienttoEBNF.dr-recip-failure, making a human interpretation of the reason and diagnostic codes, and including any supplementary information.EBNF.drc-failureshould 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 inEBNF.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:
- Acknowledgement(s) should be generated by the gateway. The text of these acknowledgements should indicate that they were generated by the gateway ๐ค
- 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 ๐
- Only C, ADMD, PRMD, O, and OU may be used.
- There must be a strict ordering of all components, with the most significant components on the RHS.
- 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
- ietf: rfc1138 1989-12
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms