Network Working Group S. Kille Request for Comments: 2156 Isode Ltd. Obsoletes: 987, 1026, 1138, 1148, 1327, 1495 January 1998 Updates: 822 Category: Standards Track MIXER (Mime Internet X.400 Enhanced Relay): Mapping between X.400 and RFC 822/MIME Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. Copyright Notice Copyright (C) The Internet Society (1998). All Rights Reserved. Table of Contents 1 - Overview ...................................... 3 1.1 - X.400 ......................................... 3 1.2 - RFC 822 and MIME .............................. 3 1.3 - The need for conversion ....................... 4 1.4 - General approach .............................. 4 1.5 - Gatewaying Model .............................. 5 1.6 - Support of X.400 (1984) ....................... 8 1.7 - X.400 (1992) .................................. 8 1.8 - MIME .......................................... 8 1.9 - Body Parts .................................... 8 1.10 - Local and Global Scenarios .................... 9 1.11 - Compatibility with previous versions .......... 10 1.12 - Aspects not covered ........................... 10 1.13 - Subsetting .................................... 11 1.14 - Specification Language ........................ 11 1.15 - Related Specifications ........................ 11 1.16 - Document Structure ............................ 12 1.17 - Acknowledgements .............................. 12 2 - Service Elements .............................. 13 2.1 - The Notion of Service Across a Gateway ........ 13 2.2 - RFC 822 ....................................... 15 2.3 - X.400 ......................................... 18 3 - Basic Mappings ................................ 27 3.1 - Notation ...................................... 27 Kille Standards Track [Page 1] RFC 2156 MIXER January 1998 3.2 - ASCII and IA5 ................................. 29 3.3 - Standard Types ................................ 29 3.4 - Encoding ASCII in Printable String ............ 33 3.5 - RFC 1522 ...................................... 34 4 - Addressing and Message IDs .................... 35 4.1 - A textual representation of MTS.ORAddress ..... 36 4.2 - Global Address Mapping ........................ 43 4.3 - EBNF.822-address <-> MTS.ORAddress ............ 46 4.4 - Repeated Mappings ............................. 59 4.5 - Directory Names ............................... 62 4.6 - MTS Mappings .................................. 62 4.7 - IPMS Mappings ................................. 67 5 - Detailed Mappings ............................. 71 5.1 - RFC 822 -> X.400: Detailed Mappings ........... 71 5.2 - Return of Contents ............................ 86 5.3 - X.400 -> RFC 822: Detailed Mappings ........... 86 Appendix A - Mappings Specific to SMTP ..................... 114 1 - Probes ........................................ 114 2 - Long Lines .................................... 114 3 - SMTP Extensions ............................... 114 3.1 - SMTP Extension mapping to X.400 ............... 114 3.2 - X.400 Mapping to SMTP Extensions .............. 115 Appendix B - Mapping with X.400(1984) ...................... 116 Appendix C - RFC 822 Extensions for X.400 access ........... 118 Appendix D - Object Identifier Assignment .................. 119 Appendix E - BNF Summary ................................... 120 Appendix F - Text format for MCGAM distribution ............ 127 1 - Text Formats .................................. 127 2 - Mechanisms to register and to distribute MCGAMs ........................................ 127 3 - Syntax Definitions ............................ 128 4 - Table Lookups ................................. 129 5 - Domain -> OR Address MCGAM format ............. 129 6 - OR Address -> Domain MCGAM format ............. 129 7 - Domain -> OR Address of Preferred Gateway table ......................................... 130 8 - OR Addresss -> domain of Preferred Gateway table ......................................... 130 Appendix G - Conformance ................................... 131 Appendix H - Change History: RFC 987, 1026, 1138, 1148 ............................................... 133 1 - Introduction .................................. 133 2 - Service Elements .............................. 133 3 - Basic Mappings ................................ 133 4 - Addressing .................................... 134 5 - Detailed Mappings ............................. 134 6 - Appendices .................................... 134 Appendix I - Change History: RFC 1148 to RFC 1327 .......... 135 Kille Standards Track [Page 2] RFC 2156 MIXER January 1998 1 - General ....................................... 135 2 - Basic Mappings ................................ 135 3 - Addressing .................................... 135 4 - Detailed Mappings ............................. 135 5 - Appendices .................................... 136 Appendix J - Change History: RFC 1327 to this Document ............................................... 137 1 - General ....................................... 137 2 - Service Elements .............................. 137 3 - Basic Mappings ................................ 137 4 - Addressing .................................... 137 5 - Detailed Mappings ............................. 138 6 - Appendices .................................... 138 Appendix L - ASN.1 Summary ................................. 139 Security Considerations .................................... 141 Author's Address ........................................... 141 References ................................................. 141 Full Copyright Statement ................................... 144 Chapter 1 -- Overview 1.1. X.400 This document relates primarily to the ITU-T 1988 and 1992 X.400 Series Recommendations / ISO IEC 10021 International Standard. This ISO/ITU-T standard is referred to in this document as "X.400", which is a convenient shorthand. Any reference to the 1984 Recommendations will be explicit. Any mappings relating to elements which are in the 1992 version and not in the 1988 version will be noted explicitly. X.400 defines an Interpersonal Messaging System (IPMS), making use of a store and forward Message Transfer System. This document relates to the IPMS, and not to wider application of X.400, such as EDI as defined in X.435. 1.2. RFC 822 and MIME RFC 822 evolved as a messaging standard on the DARPA (the US Defense Advanced Research Projects Agency) Internet. RFC 822 specifies an end to end message format, consisting of a header and an unstructured text body. MIME (Multipurpose Internet Mail Extensions) specifies a structured message body format for use with RFC 822. The term "RFC 822" is used in this document to refer to the combination of MIME and RFC 822. RFC 822 and MIME are used in conjunction with a number of different message transfer protocol environments. The core of the MIXER specification is designed to work with any supporting message transfer protocol. Kille Standards Track [Page 3] RFC 2156 MIXER January 1998 One transfer protocol, SMTP, is of particular importance and is covered in MIXER. On the Internet and other TCP/IP networks, RFC 822 is used in conjunction with RFC 821, also known as Simple Mail Transfer Protocol (SMTP) [30], in a manner conformant with the host requirements specification [10]. Use of MIXER with SMTP is defined in Appendix A. 1.3. The need for conversion There is a large community using RFC 822 based protocols for mail services, who will wish to communicate with users of the IPMS provided by X.400 systems. This will also be a requirement in cases where communities intend to make a transition between the different technologies, as conversion will be needed to ensure a smooth service transition. It is expected that there will be more than one gateway, and this specification will enable them to behave in a consistent manner. Note that the term gateway is used to describe a component performing the mapping between RFC 822 and X.400. This is standard usage amongst mail implementors, but differs from that used by transport and network service implementors. Consistency between gateways is desirable to provide: 1. Consistent service to users. 2. The best service in cases where a message passes through multiple gateways. 1.4. General approach There are a number of basic principles underlying the details of the specification. These principles are goals, and are not achieved in all aspects of the specification. 1. The specification should be pragmatic. There should not be a requirement for complex mappings for "Academic" reasons. Complex mappings should not be required to support trivial additional functionality. 2. Subject to 1), functionality across a gateway should be as high as possible. 3. It is always a bad idea to lose information as a result of any transformation. Hence, it is a bad idea for a gateway to discard information in the objects it processes. This includes requested services which cannot be fully mapped. Kille Standards Track [Page 4] RFC 2156 MIXER January 1998 4. Mail gateways operate at a level above the layer on which they perform mappings. This implies that the gateway shall not only be cognisant of the semantics of objects at the gateway level, but also be cognisant of higher level semantics. If meaningful transformation of the objects that the gateway operates on is to occur, then the gateway needs to understand more than the objects themselves. 5. Subject to 1), the mapping 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 X.400 defines the IPMS Abstract Service in X.420 , [11] which comprises of three basic services: 1. Origination 2. Reception 3. Management Management is a local interaction between the user and the IPMS, and is therefore not relevant to gatewaying. The first two services consist of operations to originate and receive the following two objects: 1. IPM (Interpersonal Message). This has two components: a heading, and a body. The body is structured as a sequence of body parts, which may be basic components (e.g., IA5 text, or G3 fax), or forwarded Interpersonal Messages. The heading consists of fields containing end to end user information, such as subject, primary recipients (To:), and importance. 2. IPN (Inter Personal Notification). A notification about receipt of a given IPM at the UA level. The Origination service also allows for origination of a probe, which is an object to test whether a given IPM could be correctly received. The Reception service also allows for receipt of Delivery Reports (DR), which indicate delivery success or failure. Kille Standards Track [Page 5] RFC 2156 MIXER January 1998 These IPMS Services utilise the Message Transfer System (MTS) Abstract Service [12]. The MTS Abstract Service provides the following three basic services: 1. Submission (used by IPMS Origination) 2. Delivery (used by IPMS Reception) 3. Administration (used by IPMS Management) Administration is a local issue, and so does not affect this standard. Submission and delivery relate primarily to the MTS Message (comprising Envelope and Content), which carries an IPM or IPN (or other uninterpreted contents). The Envelope includes a message identifier, an originator, and a list of recipients. Submission also includes the probe service, which supports the MTS Probe. Delivery also includes Reports, which indicate whether a given MTS Message has been delivered or not (or for a probe if delivery would have happened). The MTS is provided by MTAs which interact using 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 is based on the assumption that there is an underlying service, which is here called the 822-MTS service. The 822-MTS service provides three basic functions: 1. Identification of a list of recipients. 2. Identification of an error return address. 3. Transfer of an RFC 822 message. It is possible to achieve 2) within the RFC 822 header. This specification will be used most commonly with SMTP as the 822- MTS service. The core MIXER specification is written so that it does not rely on non-basic 822-MTS services. Use of non-basic SMTP services is described in Appendix A. The core of this document is written using SMTP terminology for 822-MTS services. An RFC 822 message consists of a header, and content which is uninterpreted ASCII text. The header is divided into fields, which are the protocol elements. Most of these fields are analogous to IPM Kille Standards Track [Page 6] RFC 2156 MIXER January 1998 heading fields, although some are analogous to MTS Service Elements or MTA Service Elements. RFC 822 supports delivery status notifications by use of the NOTARY mechanisms [28]. 1.5.3. The Gateway Given this functional description of the two services, the functional nature of a gateway can now be considered. It would be elegant to consider the SMTP (822-MTS) service mapping onto the MTS Service Elements and RFC 822 mapping onto an IPM, but there is a not a clear match between these services. Another elegant approach would be to treat this document as the definition of an X.400 Access Unit (AU). In this case, the abstraction level is too high, and some necessary mapping function is lost. It is necessary to consider that the IPM format definition, the IPMS Service Elements, the MTS Service Elements, and MTA Service Elements on one side are mapped into RFC 822 + SMTP 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. When going from RFC 822 to X.400, an RFC 822 message and the associated SMTP information is always mapped into an IPM (MTA, MTS, and IPMS Services) and a Delivery Status Notification is mapped onto a Report. Going from X.400 to RFC 822, an RFC 822 message and the associated SMTP information may be derived from: 1. An IPN (MTA, MTS, and IPMS services) 2. An IPM (MTA, MTS, and IPMS services) A Report (MTA, and MTS Services) is mapped onto a delivery status notification. Probes (MTA Service) shall 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 shall be rejected at the gateway if no other gatewaying procedure is defined. This specification is concerned with X.400 IPMS. Future specifications may defined mappings for other X.400 content types. Kille Standards Track [Page 7] RFC 2156 MIXER January 1998 1.5.4. Repeated Mappings The primary goal of this specification is to support single mappings, so that X.400 and RFC 822 users can communicate with maximum functionality. 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). Some RFC 822 networks may wish to use X.400 as an interconnection mechanism (typically for policy reasons), and this is fully supported. Where an X.400 message transfers to RFC 822 and then back to X.400, there is no expectation of X.400 services which do not have an equivalent service in standard RFC 822 being preserved - although this may be possible in some cases. 1.6. Support of X.400 (1984) The MIXER definition is based on the initial specification of RFC 987 and in its addendum RFC 1026, which defined a mapping between X.400(1984) and RFC 822. The core MIXER mapping is defined using the full 1988 version of X.400, and not to a 1984 compatible subset. New features of X.400(1988) can be used to provide a much cleaner mapping than that defined in RFC 987. To interwork with 1984 systems, Appendix B shall be followed. If a message is being transferred to an X.400(1984) system by way of X.400(1988) MTA it will give a slightly better service to follow the rules of Appendix B, than to downgrade without this knowledge. Downgrading specifications which supplement those specified in X.400 (X.419) are given in RFC 1328 [22] and RFC 1496 (HARPOON) [5]. 1.7. X.400 (1992) X.400 (1992) features are not used by the core of this mapping, and so there is not an equivalent downgrade problem. 1.8. MIME MIME format messages are generated by this mapping. As MIME messages are fully RFC 822 compliant, this will not cause problems with systems which are not MIME capable. Kille Standards Track [Page 8] RFC 2156 MIXER January 1998 1.9. Body Parts MIME and X.400 IPMS can both carry arbitrary body parts. MIME defines a mechanism for adding new body parts, and new body parts are registered with the IANA. X.400 defines a mechanism adding new body parts, usually referred to as Body Part 15. Extensions are defined by Object Identifiers, so there is no requirement for a central body part registration authority. The Electronic Messaging Association (EMA) maintains a list of some commonly used body parts. The EMA has specified a mechanism to use the File Transfer Body Part (FTBP) as a more generic means to support message attachments. This approach is gaining widespread commercial support. The mapping between X.400 and MIME body parts is defined in the companion MIXER specification, referenced here as RFC 2157 [8]. This document is an update of RFC 1494 [6]. Editor's Note: References to 2157 will be resolved as these two documents are expected to progress in parallel. These two specifications together form the complete MIXER Mapping. 1.10. Local and Global Scenarios There are two basic scenarios for X.400/MIME interworking: Global Scenario There are two global mail networks (Internet/MIME and X.400), interconnected by multiple gateways. Objects may be transferred over multiple gateways, and so it is important that gateways behave in a coherent fashion. MIXER is critical to support this scenario. Local Scenario A gateway is used to connect a closed community to a global mail network (this could be enforced by connectivity or gateway authorisation policy). This is a common commercial scenario. MIXER is useful to support this scenario, as it allows an industry standard provision of service, but this could be supported by something which was MIXER-like. A solution for the global scenario will work for the local scenario. However, there are aspects of MIXER which have significant implementation or deployment effort (the global mapping is the major one, but there are other details too) which and are needed to support Kille Standards Track [Page 9] RFC 2156 MIXER January 1998 the global scenario, but are not needed in the local scenario. Note that the local scenario may be the driving force for most deployments, and support of the global scenario may be an important secondary goal. There is also a transition effect. Gateways which are initially deployed in a strict local scenario situation start to find themselves in a global scenario. A common case is ADMD provided gateways, which are targeted strictly at the local scenario. In practice they soon start to operate in the global scenario, because of distribution lists and messages exchanged with X.400 users that are not customers of the ADMD. At this point, users are hurt by the restrictions of a local scenario gateway. Note that conformance to MIXER applies to an instantiation of a gateway, not just an implementation (although clearly it is critical that the implementation is capable of being operated in a conformant manner). MIXER's conformance target is the global scenario, and the specification of MIXER defines operation in this way. 1.11. Compatibility with previous versions The changes between this and older versions of the document are given in Appendices H, I and J. These are RFCs 987, 1026, 1138, 1148 and 1327. This document is a revision of RFC 1327 [21]. As far as possible, changes have been made in a compatible fashion. 1.12. Aspects not covered There have been a number of cases where previous versions of this document were used in a manner which was not intended. This section is to make 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 MIXER as Kille Standards Track [Page 10] RFC 2156 MIXER January 1998 an interface - 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. Some optional and limited extensions in this area have proved useful, and are defined in Appendix C. 1.13. 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 non-conformant and strongly discouraged. 1.14. Specification Language ISO and Internet standards have clear definitions as to the style of language used. This specification maps between ISO/ITU-T protocol and Internet protocols. This document uses ISO terminology for the following reasons: 1. This was done in previous versions. 2. ISO language may be mechanically converted to Internet language, but not vice versa. The key elements of the ISO rules are: 1. All mandatory features shall clearly be indicated by imperative statements or the word "shall" or "shall not". 2. Optional features shall be indicated by the word "may". 3. The word "should" and the phrase "may not" shall not be used. In some cases the specification issues guidance on use of optional features, by use of the the phrase word "recommended" or "not recommended". To interpet this document according to Internet rules, replace every occurrence of "shall" with "must". 1.15. Related Specifications Mappings between Mail-11 and X.400 and Mail-11 and RFC 822 are described in RFC 2162, using mappings related to those defined here [2]. Kille Standards Track [Page 11] RFC 2156 MIXER January 1998 1.16. Document Structure This document has five chapters: 1. Overview - this chapter. 2. Service Elements - This describes the (end user) services mapped by a gateway. 3. Basic mappings - This describes some basic notation used in Chapters 3-5, the mappings between character sets, and some fundamental protocol elements. 4. Addressing - This considers the mapping between X.400 OR names and RFC 822 addresses, which is a fundamental gateway component. 5. Detailed Mappings - This describes the details of all other mappings. There are also ten appendices. 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.17. Acknowledgements The work in this specification was substantially based on RFC 987 and RFC 1148, which had input from many people, who are credited in the respective documents. A number of comments from people on RFC 1148 lead to RFC 1327. In particular, there were comments and suggestions from: Maurice Abraham (HP); Harald Alvestrand (Sintef); Peter Cowen (X-Tel); Jim Craigie (JNT); Ella Gardner (MITRE); Christian Huitema (Inria); Erik Huizer (SURFnet); Neil Jones (DEC); Ignacio Martinez (IRIS); Julian Onions (X-Tel); Simon Poole (SWITCH); Clive Roberts (Data General); Pete Vanderbilt (SUN); Alan Young (Concurrent). RFC 1327 has been widely adopted, and a review team was formed. This comprised of: Urs Eppenberger (SWITCH)(Chair); Claudio Allocchio (INFN); Harald Alvestrand (UNINETT); Dave Crocker (Brandenburg); Ned Freed (Innosoft); Erik Huizer (SURFnet); Steve Kille (Isode); Peter Sylvester (GC Tech). Kille Standards Track [Page 12] RFC 2156 MIXER January 1998 Harald Alvestrand also supplied the tables mapping DSN status codes with X.400 codes. Ned Freed defined parts of the File Transfer Body Part mapping. Comment and input has also been received from: Bengt Ackzell (Generic Systems); Samir Albadine (Transpac); Mark Boyes (DEC); Larry Campbell (Boston Software Works); Jacqui Caren (Cray); Allan Cargille (MCI); Kevin Carrosso (Innosoft); Charlie Combs (OIW); Jim Craigie (Net- Tel); Eamon Doyle (Isocor); Efifion Edem (SITA); Jyrki Heikkinen (ICL); Edward Hibbert (DCL); Jeroun Houttin (Terena); Kevin Jordan (CDS); Paul Kingsnorth (DEC); Carl-Uno Manros (Manros Consulting); Suzan Mendes (Telis); Robert Miles (Softswitch); Roger Mizumorri (Enterprise Solutions Ltd); Keith Moore (University of Tennessee); Ruth Moulton (Net-Tel) Michel Musy (Bull); Kenji Nonaka (NTT): The OIW MHSIG; Tom Oliphant (SWITCH); Julian Onions (NEXOR); Jacob Palme (KTH); Olivier Paridaens (ULB); Mary la Roche (Citicorp); John Setsaas (Maxware); Russell Sharpe (DCL); Patrick Soulier (CCETT); Eftimios Tsigros (Universite Libre de Bruxelles); Sean Turner (IECA); Mark Wahl (Isode); David Wilson (Isode); Bill Wohler (Worldtalk); Alan Young (Isode); Alain Zahm (Telis). 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 When a user originates a message, a number of services are available. Some of these imply actions (e.g., delivery to a recipient), and some are insertion of known data (e.g., specification of a subject field). This chapter describes, for each offered service, to what extent it is supported for a recipient accessed through a gateway. There are three levels of support: Kille Standards Track [Page 13] RFC 2156 MIXER January 1998 Supported The corresponding protocol elements map well, and so the service can be fully provided. Not Supported The service cannot be provided, as there is a complete mismatch. Partial Support The service can be partially fulfilled. In the first two cases, the service is simply marked as "Supported" or "Not Supported". Some explanation may be given if there are additional implications, or the (non) support is not intuitive. For partial support, the level of partial support is summarised. Where partial support is good, this will be described by a phrase such as "Supported by use of.....". A common case of this is where the service is mapped onto a non-standard service on the other side of the gateway, and this would have lead to support if it had been a standard service. In many cases, this is equivalent to support. For partial support, an indication of the mechanism is given, in order to give a feel for the level of support 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. In many cases, the required action will simply be to make the information available to the end user. In other cases, actions may imply generating a delivery report. 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 Kille Standards Track [Page 14] RFC 2156 MIXER January 1998 originated. 2.2. RFC 822 RFC 822 does not 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 mechanism of mapping, 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 which are interested in these services. Communities which require significant RFC 822 interworking are recommended to require that their X.400 User Agents are able to display these heading extensions. Support for the various service elements (headers) is now listed. Date: Supported. From: Supported. For messages where there is also a sender field, the mapping is to "Authorising Users Indication", which has subtly different semantics to the general RFC 822 usage of From:. Sender: Supported. Reply-To: Supported. To: Supported. Cc: Supported. Bcc: Supported. Message-Id: Supported. In-Reply-To: Supported, for a single reference. Where multiple references are given, partial support is given by mapping to "Cross Referencing Indication". This gives similar semantics. References: Supported. Kille Standards Track [Page 15] RFC 2156 MIXER January 1998 Keywords: Supported by use of a heading extension. Subject: Supported. Comments: Supported by use of a heading extension. Encrypted: Supported by use of a heading extension. Content-Language: Supported. Resent-* Supported by use of a heading extension. Note that addresses in these fields are mapped onto text, and so are not 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. MIME introduces a number of headings. Support is defined in RFC 2157. 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: Kille Standards Track [Page 16] RFC 2156 MIXER January 1998 Message-Id: In-Reply-To: References: Subject: Content-Type: (See RFC 2157) Content-Transfer-Encoding: (See RFC 2157) MIME-Version: (See RFC 2157) The following services (headers) may be present in the header of a message. These are defined in more detail in Chapter 5 (5.3.4, 5.3.6, 5.3.7): Autoforwarded: Autosubmitted: X400-Content-Identifier: Content-Language: Conversion: Conversion-With-Loss: Delivery-Date: Discarded-X400-IPMS-Extensions: Discarded-X400-MTS-Extensions: DL-Expansion-History: Deferred-Delivery: Expires: Importance: Incomplete-Copy: Latest-Delivery-Time: Kille Standards Track [Page 17] RFC 2156 MIXER January 1998 Message-Type: Original-Encoded-Information-Types: Originator-Return-Address: Priority: Reply-By: Sensitivity: Supersedes: 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 which are not supported by RFC 822, new RFC 822 headers are defined, and registered by publication in this standard. It is intended that co-operating RFC 822 systems may also use them. Where these new fields are used, and no system action is implied, the service can be regarded as being 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, which are marked with different comments: N/A (local) These elements are only applicable to User Agent / Message Transfer Agent interaction and so they cannot apply to RFC 822 recipients. Kille Standards Track [Page 18] RFC 2156 MIXER January 1998 N/A (PDAU) These service elements are only applicable where the recipient is reached by use of a Physical Delivery Access Unit (PDAU), and so 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 shall 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 (X400-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 Kille Standards Track [Page 19] RFC 2156 MIXER January 1998 RFC 822 has only one (see IP Message Identification Non-delivery Notification Not supported in all cases. Supported where the recipient system supports NOTARY DSNs. In general all RFC 822 systems 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 Support is defined in RFC 2157. User Capabilities Registration N/A (local). 2.3.1.2. IPM Service Optional User Facilities This section describes support for the optional (user selectable) IPM services as listed in Section 19.9 of X.400 / ISO/IEC 10021- 1, listed here in the order given. Section 19.9 has cross references to short definitions of each service. Additional Physical Rendition N/A (PDAU). Alternate Recipient Allowed Not supported. There is no RFC 822 service equivalent to prohibition of alternate recipient assignment (e.g., an RFC 822 system may freely send an undeliverable message to a local postmaster). A MIXER gateway has two conformant options. The first is not to gateway a message requesting prohibition of alternate recipient, as this control cannot be guaranteed. This option supports the service, but may cause unacceptable level of message rejections. The second is to gateway the message on the basis that there is no alternate recipient service in RFC 822. RFC 1327 allowed only the second option. If the first option is shown to be operationally effective, it may be the only option in future versions of MIXER. Authorising User's Indication Supported. Kille Standards Track [Page 20] RFC 2156 MIXER January 1998 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. Operation defined in RFC 2157. Conversion Prohibition in Case of Loss of Information Supported. Operation defined in RFC 2157. Counter Collection N/A (PDAU). Counter Collection with Advice N/A (PDAU). Cross Referencing Indication Supported. Deferred Delivery N/A (prior). This service shall always be provided by the MTS prior to the gateway. A new RFC 822 header (Deferred-Delivery:) is provided to transfer information on this service to the recipient. Deferred Delivery Cancellation N/A (local). Delivery Notification Supported. This is performed at the gateway, but may be performed at the end system if the end system supports NOTARY. Thus, a notification is sent by the gateway to the originator. Kille Standards Track [Page 21] RFC 2156 MIXER January 1998 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 Distribution List means MTS supported distribution list, in the manner of X.400. This service does not exist in the RFC 822 world, although RFC 822 supports distribution list functionality. There is no SMTP leve control to prohibit distribution list expansion. A MIXER gateway has two conformant options. The first is not to gateway a message requesting DL expansion prohibition, as this control cannot be guaranteed. This option supports the service, but may cause unacceptable level of message rejections. The second is to gateway the message on the basis that there is no distribution list service in RFC 822. RFC 1327 allowed only the second option. If the first option is shown to be operationally effective, it may be the only option in future versions of MIXER. Express Mail Service N/A (PDAU). Expiry Date Indication Supported as new RFC 822 header (Expires:). In general, no automatic action can be expected. Explicit Conversion N/A (prior). Forwarded IP Message Indication Supported. Grade of Delivery Selection Not Supported. There is no equivalent service in RFC 822. Importance Indication Supported as new RFC 822 header (Importance:). Kille Standards Track [Page 22] RFC 2156 MIXER January 1998 Incomplete Copy Indication Supported as new RFC 822 header (Incomplete-Copy:). Language Indication Supported as new RFC 822 header (Content-Language:). Latest Delivery Designation Not supported. A new RFC 822 header (Latest-Delivery-Time:) is provided, which may be used by the recipient for general information, but will not be acted on by the SMTP infrastrucuture. 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. 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 (Supersedes:). Ordinary Mail N/A (PDAU). Originator Indication Supported. Kille Standards Track [Page 23] RFC 2156 MIXER January 1998 Originator Requested Alternate Recipient Not supported, but is placed as comment next to 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 where SMTP and NOTARY are available. In other cases formally supported, as delivery notifications cannot be generated by RFC 822. In practice, errors will be returned as IP Messages, and so this service may appear not to be supported (see Non- delivery Notification). Primary and Copy Recipients Indication Supported Probe Supported at the gateway (i.e., 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. Kille Standards Track [Page 24] RFC 2156 MIXER January 1998 Redirection Disallowed by Originator Redirection means MTS supported redirection, in the manner of X.400. This service does not exist in the RFC 822 world. RFC 822 redirection (e.g., aliasing) is regarded as an informal redirection mechanism, beyond the scope of this control. Messages will be sent to RFC 822, irrespective of whether this service is requested. In practice, control of this service is not supported. Registered Mail N/A (PDAU). Registered Mail to Addressee in Person N/A (PDAU). Reply Request Indication Supported as comment next to 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 service request is dealt with at submission time. Any such request is made available through the gateway by use of a comment associated with the recipient in question. Return of Content Supported where SMTP and NOTARY are used. In principle for other situations, this is N/A, as 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). Kille Standards Track [Page 25] RFC 2156 MIXER January 1998 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, this service can be regarded as supported. Auto-Submitted Indication Supported 2.3.2. Reception by X.400 2.3.2.1. Standard Mandatory Services The following standard IPM mandatory user facilities are 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 Kille Standards Track [Page 26] RFC 2156 MIXER January 1998 2.3.2.2. Standard Optional Services The following standard IPM optional user facilities are 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 X.400 service "RFC 822 Header Field" is defined using the extension facilities. This allows for any RFC 822 header field to be represented. It may be present in RFC 822 originated messages which are received by an X.400 UA. Chapter 3 Basic Mappings 3.1. Notation The X.400 protocols are encoded in a structured manner according to ASN.1, whereas RFC 822 is text encoded. To define a detailed mapping, it is necessary to refer to detailed protocol elements in each format. A notation to achieve this is described in this section. 3.1.1. RFC 822 Structured text is defined according to the Extended Backus Naur Form (EBNF) defined in Section 2 of RFC 822 [16]. In the EBNF definitions used in this specification, the syntax rules given in Appendix D of RFC 822 are assumed. When these EBNF tokens are referred to outside an EBNF definition, they are identified by the string "822." appended to the beginning of the string (e.g., 822.addr-spec). Additional syntax rules, to be used throughout this specification, are defined in this chapter. The EBNF is used in two ways. Kille Standards Track [Page 27] RFC 2156 MIXER January 1998 1. To describe components of RFC 822 messages (or of SMTP components). When these new EBNF tokens are referred to outside an EBNF definition, they are identified by the string "EBNF." appended to the beginning of the string (e.g., EBNF.importance). 2. To describe the structure of IA5 or ASCII information not in an RFC 822 message. For all new EBNF, tokens will either be self delimiting, or be delimited by self delimiting tokens. Comments and LWSP are not used as delimiters, except for the following cases, where LWSP may be inserted according to RFC 822 rules. - Around the ":" in all headers - EBNF.labelled-integer - EBNF.object-identifier - EBNF.encoded-info RFC 822 folding rules are applied to all headers. Comments are never used in these new headers. This notation is used in a modified form to refer to NOTARY EBNF [28]. For this EBNF, the keyword EBNF it replaces with DSN, for example DSN.final-recipient-field fields. 3.1.2. ASN.1 An element is referred to with the following syntax, defined in EBNF: element = service "." definition *( "." definition ) service = "IPMS" / "MTS" / "MTA" definition = identifier / context identifier = ALPHA *< ALPHA or DIGIT or "-" > context = "[" 1*DIGIT "]" The EBNF.service keys are shorthand for the following service specifications: IPMS IPMSInformationObjects defined in Annex E of X.420 / ISO 10021- 7. MTS MTSAbstractService defined in Section 9 of X.411 / ISO 10021-4. TA MTAAbstractService defined in Section 13 of X.411 / ISO 10021-4. Kille Standards Track [Page 28] RFC 2156 MIXER January 1998 FTBP File Transfer Body Part, as defined in [27]. The first EBNF.identifier identifies a type or value key in the context of the defined service specification. Subsequent EBNF.identifiers identify a value label or type in the context of the first identifier (SET or SEQUENCE). EBNF.context indicates a context tag, and is used where there is no label or type to uniquely identify a component. The special EBNF.identifier keyword "value" is used to denote an element of a sequence. For example, IPMS.Heading.subject defines the subject element of the IPMS heading. The same syntax is also used to refer to element values. For example, MTS.EncodedInformationTypes.[0].g3Fax refers to a value of MTS.EncodedInformationTypes.[0] . 3.2. ASCII and IA5 A gateway will interpret all IA5 as ASCII. Thus, mapping between these forms is conceptual. 3.3. Standard Types There is a need to convert between ASCII text and some of the types defined in ASN.1 [14]. For each case, an EBNF syntax definition is given, for use in all of this specification, which leads to a mapping between ASN.1, and an EBNF construct. All EBNF syntax definitions of ASN.1 types are in lower case, whereas ASN.1 types are referred to with the first letter in upper case. Except as noted, all mappings are symmetrical. 3.3.1. Boolean Boolean is encoded as: boolean = "TRUE" / "FALSE" 3.3.2. NumericString NumericString is encoded as: numericstring = *(DIGIT / " ") Kille Standards Track [Page 29] RFC 2156 MIXER January 1998 3.3.3. PrintableString PrintableString is a restricted IA5String defined as: printablestring = *( ps-char ) ps-restricted-char = 1DIGIT / 1ALPHA / " " / "'" / "+" / "," / "-" / "." / "/" / ":" / "=" / "?" ps-delim = "(" / ")" ps-char = ps-delim / ps-restricted-char This can be used to represent real printable strings in EBNF. 3.3.4. T.61String In cases where T.61 strings are only used for conveying human interpreted information, the aim of a mapping is to render the characters appropriately in the remote character set, rather than to maximise reversibility. For these cases, there are two options, both of which are conformant to this specification: 1. The mappings to IA5 defined in ITU-T Recommendation X.408 (1988) may be used [13]. These will then be encoded in ASCII. This is the approach mandated in RFC 1327. 2. This mapping may be used if the characters are not contained within ASCII repertoire, but are all in an IANA-registered character set. Use the encoding defined in RFC 1522 [9] to generate appropriate encoded-words. If this mapping is used, the character set ISO-8859-1 shall be used if all of the characters needed are available in this repertoire. In other cases, the character set TELETEX shall be used. The details of this character set is defined in the Appendix C of RFC 2157. There is also a need to represent Teletex Strings in ASCII, for some aspects of OR Address. For these, the following encoding is used: teletex-string = *( ps-char / t61-encoded ) t61-encoded = "{" 1* t61-encoded-char "}" t61-encoded-char = 3DIGIT Characters in EBNF.ps-char are mapped simply. Other octets, including control characters, are mapped using a quoting mechanism similar to the printable string mechanism. Each octet is represented as 3 decimal digits. For example, the Yen character (hex A5) is represented as {165}. As the three character string, a, yen character, b, would be represented as either "a{165}b". Kille Standards Track [Page 30] RFC 2156 MIXER January 1998 The use of escape sequences follows that set down for ASN1. in ISO 8825-1, with the additional specifiction that the default G1 page is ISO Latin 1. The page settings may be changed by escape sequences. Changes of the settings hold within a pair of curly brackets ({}), and the settings revert to the default after the right bracket (}) (i.e., they do not carry forward to subsequent T.61 encoding). There are a number of places where a string may have a Teletex and/or Printable String representation. The following EBNF 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. An example is: "yen*{165}" 3.3.5. UTCTime Both UTCTime and the RFC 822 822.date-time syntax contain: Year, Month, Day of Month, hour, minute, second (optional), and Timezone (technically a time differential in UTCTime). 822.date-time also contains an optional day of the week, but this is redundant. With the exception of Year, a symmetrical mapping can be made between these constructs. Note: In practice, a gateway will need to parse various illegal variants on 822.date-time. In cases where 822.date-time cannot be parsed, it is recommended that the derived UTCTime is set to the value at the time of translation. Such errors may be noted in an RFC 822 comment, to aid detection and correction. When mapping to X.400, the UTCTime format which specifies the timezone offset shall be used. When mapping to RFC 822, the 822.date-time format shall include a numeric timezone offset (e.g., -0500). When mapping time values, the timezone shall be preserved as specified. The date shall not be normalised to any other timezone. Kille Standards Track [Page 31] RFC 2156 MIXER January 1998 RFC 822, as modified by RFC 1123, requires use of a four digit year. Note that the original RFC 822 uses a two digit date, which is no longer legal. UTCTime uses a two digit date. To map a year from RFC 822 to X.400, simply use the last two digits. To map a year from X.400 to RFC 822, assume that the two digit year refers to a year in the 10 year epoch 1980-2079. 3.3.6. Integer A basic ASN.1 Integer will be mapped onto EBNF.numericstring. In many cases ASN.1 will enumerate Integer values or use ENUMERATED. An EBNF encoding labelled-integer is provided. When mapping from EBNF to ASN.1, only the integer value is mapped, and the associated text is discarded. When mapping from ASN.1 to EBNF, a text label may be added. It is recommended that this is done wherever possible and that clear text labels are chosen. A second encoding labelled-integer-2 is provided. This is used in DSNs, where the parsing rules will treat the text as a comment. This definition was not present in RFC 1327. labelled-integer ::= [ key-string ] "(" numericstring ")" labelled-integer-2 ::= [ numericstring ] "(" key-string ")" key-string = *key-char key-char = 3.3.7. Object Identifier Object identifiers are represented in a form similar to that given in ASN.1. The order is the same as for ASN.1 (big-endian). The numbers are mandatory, and used when mapping from the ASCII to ASN.1. The key-strings are optional. It is recommended that as many strings as possible are generated when mapping from ASN.1 to ASCII, to facilitate user recognition. object-identifier ::= oid-comp object-identifier | oid-comp oid-comp ::= [ key-string ] "(" numericstring ")" Kille Standards Track [Page 32] RFC 2156 MIXER January 1998 An example representation of an object identifier is: joint-iso-ccitt(2) mhs (6) ipms (1) ep (11) ia5-text (0) or (2) (6) (1)(11)(0) Because of the use of brackets and the conflict with the RFC 822 comment convention, MIXER is defines so that the EBNFobject- identifier definition is not used in structured fields. 3.4. Encoding ASCII in Printable String Some information in RFC 822 is represented in ASCII, and needs to be mapped into X.400 elements encoded as printable string. For this reason, a mechanism to represent ASCII encoded as PrintableString is needed. A structured subset of EBNF.printablestring is now defined. This shall be used to encode ASCII in the PrintableString character set. 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 shall have range 0-127, and is interpreted in decimal as the corresponding ASCII character. Special encodings are given for: at sign (@), percent (%), exclamation mark/bang (!), double quote ("), underscore (_), left bracket ((), and right bracket ()). These characters, with the exception of round brackets, are not included in PrintableString, but are common in RFC 822 addresses. The abbreviations will ease specification of RFC 822 addresses from an X.400 system. These special encodings shall be interpreted in a case insensitive manner, but always generated in lower case. A reversible mapping between PrintableString and ASCII can now be defined. The reversibility means that some values of printable string (containing round braces) cannot be generated from ASCII. Therefore, this mapping shall only be used in cases where the printable strings have been derived from ASCII (and will therefore Kille Standards Track [Page 33] RFC 2156 MIXER January 1998 have a restricted domain). For example, in this specification, it is only applied to a Domain Defined Attribute which will have been generated by use of this specification and a value such as "(" would not be possible. To encode ASCII as PrintableString, the EBNF.ps-encoded syntax is used, with all EBNF.ps-restricted-char mapped directly. All other 822.CHAR are encoded as EBNF.ps-encoded-char. To encode PrintableString as ASCII, parse PrintableString as EBNF.ps-encoded, and then reverse the previous mapping. If the PrintableString cannot be parsed, then the mapping is being applied in to an inappropriate value, and an error shall be given to the procedure doing the mapping. In some cases, it may be preferable to pass the printable string through unaltered. Some examples are now given. Note the arrows which indicate asymmetrical mappings: PrintableString ASCII 'a demo.' <-> 'a demo.' foo(a)bar <-> foo@bar (q)(u)(p)(q) <-> "_%" (a) <-> @ (A) -> @ (l)a(r) <-> (a) (126) <-> ~ ( -> ( (l) <-> ( 3.5. RFC 1522 RFC 1522 defines a mechanism for encoding other character set information into elements of RFC 822 Headers. A gateway may ignore this encoding and treat the elements as ASCII. A preferred approach is for the gateway to interpret the RFC 1522 encoding. This will not always be straightforward, because: 1. RFC 1522 permits an openly extensible character set choice, which may be broader than T.61. 2. It is not always possible to map all characters into the equivalent X.400 field. RFC 1522 is only applied to fields which are "for information only". A gateway which interprets header elements according to RFC 1522 may Kille Standards Track [Page 34] RFC 2156 MIXER January 1998 apply reasonable heuristics to minimise information loss. Chapter 4 - Addressing and Message IDs Addressing is the most complex aspect of X.400 <-> RFC 822 gateway and is therefore given a separate chapter. This chapter also discusses message identifiers, as they are closely linked to addresses. This chapter, as a side effect, also defines a textual representation of an X.400 OR Address. This specification has much similarity to the X.400(92) representation of addresses. This was because early versions of this specification were a major input to this work. This specification retains compatibility with earlier versions. The X.400 specification of address representation can be parsed but is not generated. Initially we consider an address in the (human) mail user sense of "what is typed at the mailsystem to reference a mail user". A basic RFC 822 address is defined by the EBNF EBNF.822-address: 822-address = [ route ] addr-spec These definitions are taken from RFC 822. In SMTP (or another 822- MTS protocol), the originator and each recipient are considered to be defined by such a construct. In an RFC 822 header, the EBNF.822- address is encapsulated in the 822-address syntax rule, and there may also be associated comments. None of this extra information has any semantics, other than to the end user. The basic X.400 OR Address, used by the MTS for routing, is defined by MTS.ORAddress. In IPMS, the MTS.ORAddress is encapsulated within IPMS.ORDescriptor. The RFC 822 822.address is mapped with IPMS.ORDescriptor, and that RFC 822 EBNF.822-address is mapped with MTS.ORAddress. Section 4.1 defines a textual representation of an OR Address, which is used throughout the rest of this specification. This text representation is designed to represent an X.400 address in the LHS (left hand side) or local part of an RFC 822 address, and so this representation gives a mechanism to represent X.400 addresses within RFC 822 addresses. Section 4.2 describes global equivalence mapping between parts of the X.400 and RFC 822 name spaces, and defines the concept of a MIXER Conformant Global Address Mapping (MCGAM). Gateways conforming to this specification shall support MCGAMs. Kille Standards Track [Page 35] RFC 2156 MIXER January 1998 Section 4.3 is the core part of this chapter, and defines the mapping mechanism. 4.1. A textual representation of MTS.ORAddress MTS.ORAddress is structured as an ordered set of attributes (type/value pairs). It is clearly necessary to be able to encode this in ASCII for gatewaying purposes. All components shall be encoded, in order to guarantee return of error messages, and to optimise third party replies. 4.1.1. Basic OR Address Representation An OR Address has a number of structured and unstructured attributes. For each unstructured attribute, a key and an encoding is specified. For structured attributes, the X.400 attribute is mapped onto one or more attribute value pairs. For domain defined attributes, each element of the sequence will be mapped onto a triple (key and two values), with each value having the same encoding. The attributes are as follows, with 1984 attributes given in the first part of the attribute key table. For each attribute, a reference is given, consisting of the relevant sections in X.402 / ISO 10021-2, and the extension identifier for 88 only attributes. The attribute key table follows: Attribute (Component) Key Enc Ref Id 84/88 Attributes MTS.CountryName C P 18.3.3 MTS.AdministrationDomainName ADMD P 18.3.1 MTS.PrivateDomainName PRMD P 18.3.21 MTS.NetworkAddress X121 N 18.3.7 MTS.TerminalIdentifier T-ID P 18.3.23 MTS.OrganizationName O P/T 18.3.9 MTS.OrganizationalUnitNames.value OU P/T 18.3.10 MTS.NumericUserIdentifier UA-ID N 18.3.8 MTS.PersonalName PN P/T 18.3.12 MTS.PersonalName.surname S P/T 18.3.12 MTS.PersonalName.given-name G P/T 18.3.12 MTS.PersonalName.initials I P/T 18.3.12 MTS.PersonalName .generation-qualifier GQ P/T 18.3.12 MTS.DomainDefineAttribute.value DD P/T 18.1 Kille Standards Track [Page 36] RFC 2156 MIXER January 1998 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-SERVICE P 18.3.11 7 MTS.PhysicalDeliveryCountryName PD-C P 18.3.13 8 MTS.PostalCode PD-CODE P 18.3.19 9 MTS.PhysicalDeliveryOfficeName PD-OFFICE P/T 18.3.14 10 MTS.PhysicalDeliveryOfficeNumber PD-OFFICE-NUM P/T 18.3.15 11 MTS.ExtensionORAddressComponents PD-EXT-ADDRESS P/T 18.3.4 12 MTS.PhysicalDeliveryPersonName PD-PN P/T 18.3.17 13 MTS.PhysicalDeliveryOrganizationName PD-O P/T 18.3.16 14 MTS.ExtensionPhysicalDelivery AddressComponents PD-EXT-DELIVERY P/T 18.3.5 15 MTS.UnformattedPostalAddress PD-ADDRESS UPA 18.3.25 16 MTS.StreetAddress PD-STREET P/T 18.3.22 17 MTS.PostOfficeBoxAddress PD-BOX P/T 18.3.18 18 MTS.PosteRestanteAddress PD-RESTANTE P/T 18.3.20 19 MTS.UniquePostalName PD-UNIQUE P/T 18.3.26 20 MTS.LocalPostalAttributes PD-LOCAL P/T 18.3.6 21 MTS.ExtendedNetworkAddress .e163-4-address.number NET-NUM N 18.3.7 22 MTS.ExtendedNetworkAddress .e163-4-address.sub-address NET-SUB N 18.3.7 22 MTS.ExtendedNetworkAddress .psap-address NET-PSAP X 18.3.7 22 MTS.TerminalType T-TY I 18.3.24 23 Kille Standards Track [Page 37] RFC 2156 MIXER January 1998 The following keys identify different EBNF encodings, which are associated with the ASCII representation of MTS.ORAddress. Key Encoding P printablestring N numericstring T teletex-string P/T teletex-and-or-ps UPA upa-string I labelled-integer X presentation-address The EBNF for presentation-address is taken from the specification RFC 1278 "A String Encoding of Presentation Address" [23]. In most cases, the EBNF encoding maps directly to the ASN.1 encoding of the attribute. There are a few exceptions. In cases where an attribute can be encoded as either a PrintableString or NumericString (Country, ADMD, PRMD), either form is mapped into the EBNF. When generating ASN.1, the NumericString encoding shall be used if the string contains digits and only digits. There are a number of cases where the P/T (teletex-and-or-ps) representation is used. Where the key maps to a single attribute, this choice is reflected in the encoding of the attribute (attributes 10-21). For example: /CN=yen*{165}/ For most of the 1984 attributes and common name, there is a printablestring and a teletex variant. This pair of attributes is mapped onto the single component here. This will give a clean mapping for the common cases where only one form of the name is used. If there is teletex attribute or teletex component only, and it contains only characters in the printable string character set, it shall be represented in the EBNF as if it had been encoded as printable string. A single printable string representation shall also be done when both forms are present and they have the same printable string representation. The Unformatted Postal Address has a slightly more complex mapping onto a variant of (teletex-and-or-ps), defined as: upa-string = [ printable-upa ] [ "*" teletex-string ] printable-upa = printablestring *( "|" printablestring ) Kille Standards Track [Page 38] RFC 2156 MIXER January 1998 The optional teletex part is straightforward. There is an (optional) sequence of printable strings which are mapped in order. For example: /PD-ADDRESS=The Dome|The Square|Richmond|England/ X.400 (1992) has introduced a string representation of OR Addresses (see F.401, Annex B). This has specified a number of string keywords for attributes. As earlier versions of this specification were an input to this work, many of the keywords are the same. To increase compatibility, the following alternative values shall be recognised when mapping from RFC 822 to X.400. These shall not be generated when mapping from X.400 to RFC 822. The following keyword alternative table and the subsequent paragraph lists alternative keywords. Keyword Alternative ADMD A PRMD P GQ Q X121 X.121 UA-ID N-ID PD-OFFICE-NUM PD-OFFICE NUMBER PD-OFFICE-NUM PD-OFN PD-EXT-ADDRESS PD-EA PD-EXT-DELIVERY PD-ED PD-OFFICE PD-OF PD-STREET PD-S PD-UNIQUE PD-U PD-LOCAL PD-L PD-RESTANTE PD-R PD-BOX PD-B PD-CODE PD-PC PD-SERVICE PD-SN DD DDA NET-NUM E.164 NET-PSAP PSAP PD-ADDRESS PD-A When mapping from RFC 822 to X.400, the keywords defined in this paragraph shall be recognized. The ordered keywords: OU1, OU2, OU3, and OU4, shall be recognised. If these are present, no keyword OU shall be present. These will be treated as ordered values of OU. PD-A1, PD-A2, PD-A3, PD-A4, PD-A5, PD-A6 shall be treated as ordered lines. If present, these will be assembled with separating line feeds to form a single physical address. In Kille Standards Track [Page 39] RFC 2156 MIXER January 1998 this case PD-ADDRESS (or PD-A) shall not be present. Similarly, there are ordered keywords for domain defined attributes: DD1, DD2, DD3, DD4, If ISDN is present, it may be interpreted as an E.163/164 address, using local heuristics to parse the string. X.400 defines the key, but does not give an interpretation of the value. For T-TY (Terminal Type), the X.400 recommended values are preferred, but other values are allowed. These values are: tlx (3); ttx (4); g3fax (5); g4fax (6); ia5 (7); and vtx (8). 4.1.2. Encoding of Personal Name Handling of Personal Name and Teletex Personal Name is a common requirement. Therefore MIXER defines an alternative to the EBNF.standard-type syntax, which utilises the "human" conventions for encoding these components. A syntax is defined, which is designed to provide a clean encoding for the common cases of OR Address specification where: 1. There is no generational qualifier 2. Initials, if present, contain only letters 3. Given Name, if present, does not contain full stop ("."), and is at least two characters long. 4. Surname does not contain full stop in the first two characters. 5 If Surname is the only component, it does not contain full stop. The following EBNF is defined: encoded-pn = [ given "." ] *( initial "." ) surname given = 2* initial = ALPHA surname = printablestring Kille Standards Track [Page 40] RFC 2156 MIXER January 1998 This is used to map from any string containing only printable string characters to an OR address personal name. To map from a string to OR Address components, parse the string according to the EBNF. The given name and surname are assigned directly. All EBNF.initial tokens are concatenated without intervening full stops to generate the initials component. For an OR address which follows the above restrictions, a string is derived in the natural manner. In this case, the mapping will be reversible. For example: GivenName = "Marshall" Surname = "Rose" Maps with "Marshall.Rose" Initials = "MT" Surname = "Rose" Maps with "M.T.Rose" GivenName = "Marshall" Initials = "MT" Surname = "Rose" Maps with "Marshall.M.T.Rose" Note that X.400 suggests that Initials is used to encode all initials except the surname (X.402 section 18.3.12). Therefore, the defined encoding is "natural" when either GivenName or Initials, but not both, are present. The case where both are present can be encoded. 4.1.3. Standard Encoding of MTS.ORAddress Given this structure, we can specify an EBNF representation of an OR Address. The output format of addresses is defined by EBNF.std-or- address. The more flexible input format is defined by EBNF.std-or- address-input. The input EBNF has been added subsequent to RFC 1327, to reflect the formal incorporation of a number of heuristics. The address element separator on input may be "/", ";", or a mixture of these. The output format is used in all examples. std-or-address = 1*( "/" attribute "=" value ) "/" attribute = standard-type / "RFC-822" / dd-key "." std-printablestring Kille Standards Track [Page 41] RFC 2156 MIXER January 1998 std-or-address-input = [ sep pair ] sep pair *( sep pair ) sep [ pair sep ] sep = "/" / ";" pair = input-attribute "=" value input-attribute = attribute / dd-key ":" std-printablestring standard-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 For address generation, the standard-type is any key defined in the key table in Section 4.1, except PN, and DD. For address parsing, other key values from Section 4.1 are also valid. The EBNF leads to a set of attribute/value pairs. The value is interpreted according to the EBNF encoding defined in the table. If the standard-type is PN, the value is interpreted according to EBNF.encoded-pn, and the components of MTS.PersonalName and/or MTS.TeletexPersonalName derived accordingly. If dd-key is the recognised Domain Defined string (DD) or one of the alternatives defined in Section 4.1, then the type and value are interpreted according to the syntax implied from the encoding, and aligned to either the teletex or printable string form. Key and value shall have the same encoding. If value is "RFC-822", then the (printable string) Domain Defined Type of "RFC-822" is assumed. This is an optimised encoding of the domain defined type defined by this specification. The matching of all keywords shall be done in a case-independent manner. EBNF.std-or-address uses the characters "/" and "=" as delimiters. Domain Defined Attributes and any value may contain these characters. A quoting mechanism, using the non-printable string "$" is used to allow these characters to be represented. Kille Standards Track [Page 42] RFC 2156 MIXER January 1998 If an address of this syntax is parsed, and a country value is present, but no ADMD, the string shall be interpreted as if an ADMD value of single space had been specified. 4.2. Global Address Mapping From a user perspective, the ideal mapping would be entirely symmetrical and global, to enable addresses to be referred to transparently in the remote system, with the choice of gateway being left to the Message Transfer Service. There are two fundamental reasons why this is not possible: 1. The syntaxes are sufficiently different to make this impossible. 2 There is insufficient administrative co-operation between the X.400 and RFC 822 name registration authorities for this to work. Another way to view this situation is to see that there is not a full global equivalence between X.400 and RFC 822 addressing. To meet user needs to the extent possible, this specification provides for equivalence where there is sufficient co-operation. To be useful, this equivalence shall be recognised and interpreted in the same way by all gateways. Therefore, an asymmetrical mapping is defined, which can be symmetrical where there is appropriate administrative co-operation. Section 4.3 describes the asymetrical aspects. This section describes a mechanism to enable the administrative co- ordination for symmetrical mappings. In order to achieve a symmetrical mapping there is a need to define an administrative equivalence between parts of the OR Address and Domain namespaces. Previous version of this specification did this by definition of a global set of mappings. MIXER defines the concept of a MIXER Conformant Global Address Mapping (MCGAM). This acronym is defined so that it is very clear what is being referenced. The X.400 and Internet Mail address spaces are hierarchical. It is possible to define an equivalence between two points in the hierarchies, such that addresses below that point can be derived in an algorithmic manner. An MCGAM is a mapping from a point in one hierarchy to a point in the other hierarchy. An "MGGAM pair" is a pair of symmetrical mappings between two points. To define an MCGAM, the following shall apply: 1. The authority defining the MCGAM shall have responsibility for BOTH of the namespaces between which the MCGAM is defined. Kille Standards Track [Page 43] RFC 2156 MIXER January 1998 2. The authority defining the MCGAM is responsible to ensure that addresses allocated below the two equivalence points conform to the rules set out below. 3. The authority defining the MCGAM is responsible to ensure that addresses which are generated according to the MCGAM are routed correctly. In general, MCGAMs will be independent. In some cases, a set of MCGAMs may be related (e.g., where one MCGAM defines a mapping for an organization and a second MCGAM defines an excpetion for a subtree within the organization). In this case, the related set of MCGAMs shall be treated as a single MCGAM for distribution purposes. The existence of an MCGAM does not imply routability and access for all users. The authority defining an MCGAM may simply use this mapping locally. This will often be the case in a "local scenario" gateway. Because of third party addressing, a MIXER gateway will work best with the maximum number of MCGAMs. Therefore, three mechanisms are defined to enable publication and exchange of MCGAMs: 1. Distribution of text tables. This is described in Appendix F of this specification. 2. Distribution by Domain Name Service. This is described in RFC 2163 [3]. 3. Distribution by X.500 Directory Service. This is defined in RFC 2164 [26]. The following sections define how the MCGAM namespace equivalence is modelled. The Internet Domain Namespace defines a simple hierarchy. For the purposes of this mapping, only parts of the namespace where domains conform to the EBNF domain-syntax are allowed. domain-syntax = alphanum [ *alphanumhyphen alphanum ] alphanum = alphanumhyphen = Although RFC 822 allows for a more general syntax, this restricted syntax is used in MIXER as it is the one chosen by the various domain service administrations. In practice, it reflects all RFC 822 usage. Kille Standards Track [Page 44] RFC 2156 MIXER January 1998 The following OR Address attributes are considered as a hierarchy, and may be specified by the domain. They are (in order of the hierarchy defined by MIXER): Country, ADMD, PRMD, Organization, Organizational Units There may be up to four ordered Organizational Units. This hierarchy reflects most usage of X.400, although X.400 may be used in other ways. In particular, it covers the Mnemonic OR Address using a 1984 compatible encoding. This is seen as the dominant form of OR Address. MCGAMs may only be used when this hierarchy applies. An equivalence mapping is defined between two nodes in the respective hierarchies. For example: => "AC.UK" might be mapped with PRMD="UK.AC", ADMD="GOLD 400", C="GB" The mapping identifies that the management of these points in the respective hierarchies is the same (or co-operate very closely). The equivalence means that the namespaces below this equivalence point map 1:1, except where the mapping is overridden by further equivalence mappings lower down the hierarchy. This equivalence may be achieved in three ways: 1. All of the nodes below this point are RFC 822, and the MIXER mapping defines the X.400 addresses for these nodes. 2. All of the nodes below this point are X.400, and the MIXER mapping defines the RFC 822 addresses for these nodes. 3. There are X.400 and RFC 822 nodes below this point, and addressing is managed in a manner which ensures the equivalence. The rules to achieve this are defined by MIXER. Each of these ways gives a framework for MCGAM definition. When an MCGAM is defined, a systematic mapping for the inferior nodes in the two hierarchies follows. This is a 1:1 mapping between the nodes in the subtrees. For example, given the MCGAM pair defined above: the domain "R-D.Salford.AC.UK" algorithmically maps with OU="R-D", O="Salford", PRMD="UK.AC", ADMD="GOLD 400", C="GB" Kille Standards Track [Page 45] RFC 2156 MIXER January 1998 Note that when an equivalence is defined, that this can be re-defined for lower points in the hierarchy. However, it is not possible to declare contained subtrees to be un-mappable. The equivalence mapping also provides a mechanism to deal with missing elements in the X.400 hierarchy (most commonly the PRMD, which is the only element that may be ommitted when conforming to recent versions of X.400). A domain may be associated with an omitted attribute in conjunction with several present ones. When performing the algorithmic insertion of components lower in the hierarchy, the omitted value shall be skipped. For example: If there is an MCGAM pair between domain HNE.EGM" and "O=HNE", "ADMD=ECQ", "C=TC", and omitted PRMD then "ZI.HNE.EGM" is algorithmically mapped with "OU=I", "O=HNE", "ADMD=ECQ", "C=TC" Attributes may have null values, and this is treated separately from omitted attributes (while it is not ideal to make this distinction, it is useful in practice). 4.2.1. Directory and Nameserver Mappings When a set of MCGAMs are supported by X.500 or DNS, there is the possibility that results will be indeterminate due to timeout. Lookup shall be repeated until a value is determined, in order to maintain consistent gateway operation. Where the mapping relates to an envelope address, the gateway shall non-deliver messages according to the associated MTA's normal timeout policy. Where the mapping relates to addresses in the message header, there shall be a timeout in the range of 1-4 hours or shorter if this is required to maintain quality of service constraints. If a mapping cannot be done in this time, address encapsulation shall be used. 4.3. EBNF.822-address <-> MTS.ORAddress This section defines the basic address mapping. 4.3.1. X.400 encoded in RFC 822 This section defines how X.400 addresses are represented in RFC 822 addresses. Kille Standards Track [Page 46] RFC 2156 MIXER January 1998 The std-or-address syntax is used to encode OR Address information in the 822.local-part of EBNF.822-address. Where there is an applicable equivalence mapping, further OR Address information is associated with the 822.domain component. This cannot be used in the general case, due to character set problems, and to the variants of X.400 OR Addresses which use different attribute types. The only way to encode the full PrintableString character set in a domain is by use of the 822.domain-ref syntax (i.e. 822.atom). This is likely to cause problems on many systems. The effective character set of domains is in practice reduced from the RFC 822 set, by restrictions imposed by domain conventions and policy [10], and by the EBNF definition in SMTP. A generic 822.address consists of a 822.local-part and a sequence of 822.domains (e.g., <@domain1,@domain2:user@domain3>). All except the 822.domain associated with the 822.local-part (domain3 in this case) are considered to specify routing within the RFC 822 world, and will not be interpreted by the gateway (although they may have identified the gateway from within the RFC 822 world). The 822.domain associated with the 822.local-part identifies the gateway from within the RFC 822 world. This final 822.domain may be used to determine some number of OR Address attributes, where this does not conflict with the first role. RFC 822 routing to gateways will usually be set up to facilitate the 822.domain being used for both purposes. In the case that there is no applicable equivalence mapping, all of the X.400 address is encoded in the 822.local-part and the 822.domain identifies the gateway to which the message is being sent. This technique may be used by the RFC 822 user for any X.400 address where the equivalence mapping is not known. In the case that there is an applicable MCGAM, the maximum number of attributes are encoded in the 822.domain. The remaining attributes are encoded on the LHS, using the EBNF.std-or-address syntax. For example: /I=J/S=Linnimouth/GQ=5/@Marketing.Widget.COM encodes the MTS.ORAddress consisting of: MTS.CountryName = "TC" MTS.AdministrationDomainName = "BTT" MTS.OrganizationName = "Widget" MTS.OrganizationalUnitNames.value = "Marketing" MTS.PersonalName.surname = "Linnimouth" Kille Standards Track [Page 47] RFC 2156 MIXER January 1998 MTS.PersonalName.initials = "J" MTS.PersonalName.generation-qualifier = "5" on the basis of an MCGAM pair between: Domain: Widget.COM OR Address: O="Widget", ADMD="BTT", C="TC" Given the OR address, the domain Widget.COM is determined from the equivalence mapping and the next component is determined algorithmically to give Marketing.Widget.COM. The remaining attributes are encoded on the LHS in 822.local-part. There is a further mechanism to simplify the encoding of common cases, where the only attributes to be encoded on the LHS are (non- Teletex) Personal Name attributes which comply with the restrictions of 4.1.2. To achieve this, the 822.local-part shall be encoded as EBNF.encoded-pn. In the previous example, if the GenerationQualifier was not present in the OR Address, it would map with the RFC 822 address: J.Linnimouth@Marketing.Widget.COM. From the standpoint of the RFC 822 Message Transfer System, the domain specification is used to route the message in the standard manner. The standard domain mechanisms are used to select appropriate gateways for the corresponding OR Address space. It is the responsibility of the management that defines the equivalence mapping to define routing in the manner which will enable the message to be delivered. 4.3.2. RFC 822 encoded in X.400 The previous section showed a mapping from X.400 to RFC 822. In the case where the mapping was symmetrical and based on the equivalence mapping, this has also shown how RFC 822 is encoded in the X.400. This equivalence cannot be used for all RFC 822 addresses. The general case is mapped by use of domain defined attributes. A (Printable String) Domain defined type "RFC-822" is defined. The associated attribute value is an ASCII string encoded according to Section 3.3.3 of this specification. The interpretation of the ASCII string follows RFC 822, and RFC 1123 [10,16]. Domains shall always be fully qualified. Kille Standards Track [Page 48] RFC 2156 MIXER January 1998 Other OR Address attributes will be used to identify a context in which the OR Address will be interpreted. This might be a Management Domain, or some part of a Management Domain which identifies a gateway MTA. For example: C = "GB" ADMD = "GOLD 400" PRMD = "UK.AC" O = "UCL" OU = "CS" "RFC-822" = "Jimmy(a)WIDGET-LABS.CO.UK" OR C = "TC" ADMD = "Wizz.mail" PRMD = "42" "rfc-822" = "postel(a)venera.isi.edu" Note in each case the PrintableString encoding of "@" as "(a)". In the second example, the "RFC-822" domain defined attribute is interpreted everywhere within the (Private) Management Domain. In the first example, further attributes are needed within the Management Domain to identify a gateway. Thus, this scheme can be used with varying levels of Management Domain co-operation. There is a limit of 128 characters in the length of value of a domain defined attribute, and an OR Address can have a maxmimum of four domain defined attributes. Where the printable string generated from the RFC 822 address exceeds 128 characters, additional domain defined attributes are used to enable up to 512 characters to be encoded. These attributes shall be filled completely before the next one is started. The (Printable String) DDA keywords are: RFC822C1; RFC822C2; RFC822C3. Longer addresses cannot be encoded. MIXER defines a representation of RFC 822 addresses in printable string domain defined attributes. Teletex domain defined attributes with a key of RFC-822, RFC822C1; RFC822C2; RFC822C3 shall not be generated. This is for backwards compatibility reasons. Kille Standards Track [Page 49] RFC 2156 MIXER January 1998 Reception of these attributes in the manner defined below is mandatory. This is to allow the possibility for future versions of MIXER to allow generation of teletex domain defined attributes. Where the values of all of these teletex domain defined attributes are printable string characters, they shall be interpreted in the same way as the printable string domain defined attributes. If this is not the case, the printable string encoding translation shall be omitted. If both teletex and printable string attributes are present, this is valid if and only if they represent exactly the same RFC 822 address. 4.3.3. Component Ordering In most cases, ordering of OR Address components is not significant for the mappings specified. However, Organizational Units (printable string and teletex forms) and Domain Defined Attributes are specified as SEQUENCE in MTS.ORAddress, and so their order may be significant. This specification needs to take account of this: 1. To allow consistent mapping into the domain hierarchy 2. To ensure preservation of order over multiple mappings. There are three places where an order is specified: 1. The text encoding (std-or-address) of MTS.ORAddress as used in the local-part of an RFC 822 address. An order is needed for those components which may have multiple values (Organizational 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 (right hand side or domain part). If there is an Organization Attribute, it shall be to the right of any Organizational Unit attributes. These requirements are for the following reasons: - Alignment to the hierarchy of other components in RFC 822 addresses (thus, Organizational Units will appear in the same order, whether encoded on the RHS or LHS). - Backwards compatibility with RFC 987/1026. - To ensure that gateways generate consistent addresses. This is both to help end users, and to generate identical message ids. Kille Standards Track [Page 50] RFC 2156 MIXER January 1998 Further, it is recommended that all other attributes are generated according to this ordering, so that all attributes so encoded follow a consistent hierarchy. When generating 822.msg-id, this order shall be followed. 2. For the Organizational Units (OU) in MTS.ORAddress, the first OU in the SEQUENCE is the most significant, as specified in X.400. 3. For the Domain Defined Attributes in MTS.ORAddress, the First Domain Defined Attribute in the SEQUENCE is the most significant. Note that although this ordering is mandatory for this mapping, MIXER does not give additional implications on the ordering significance within X.400. 4.3.4. RFC 822 -> X.400 Basic Address Mapping There are two basic cases: 1. X.400 addresses encoded in RFC 822. This will also include RFC 822 addresses which are given reversible encodings. 2. "Genuine" RFC 822 addresses. The mapping shall proceed as follows, by first assuming case 1). STAGE I. 1. If the 822-address is not of the form: local-part "@" domain take the domain which will be routed on and apply step 2 of stage 1 to derive (a possibly null) set of attributes. Then go to stage II. The gateway may reduce a source route address to this form by removal of all but the last domain. In terms of the design intentions of RFC 822, this would be an incorrect action. (Note that an address of the form local%part@domain is not a source route). However, in most cases, it will provide a better service Kille Standards Track [Page 51] RFC 2156 MIXER January 1998 to the end user, and is in line with the Internet Host Requirements. This is a reflection on the common inappropriate use of source routing in RFC 822 based systems, despite the discussion in the Host Requirements [10]. Either approach, or the intermediate approach of stripping only domain references which reference the local gateway are conformant to this specification. 2. If the 822.local-part uses the 822.quoted-string encoding, remove this quoting. If the resulting unquoted 822.local-part has leading space, trailing space, or two adjacent spaces go to stage II. 3. If the unquoted 822.local-part contains any characters not in PrintableString, "{", "}", "*", and "$", go to stage II. 4. Parse the (unquoted) 822.local-part according to the EBNF EBNF.std-or-address-input. Checking of upper bounds shall not be done at this point. If this parse fails, parse the local-part according to the EBNF EBNF.encoded-pn. If this parse fails, go to stage II. The result is a set of type/value pairs. 5. 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. 6. If the set of attributes forms a valid X.400 address, according to X.402, then go to step 9. All forms of X.400 address are allowed at this stage. Steps 7-8 default attributes for certain types of OR Address. 7. If the set of attributes cannot form a mnemonic form of X.400 address after addition of attributes which may be derived from the EBNF.domain (C, ADMD, PRMD, O, OU), go to stage II. 8. Attempt to parse EBNF.domain as: *( domain-syntax "." ) known-domain Where EBNF.known-domain is the longest possible match in the set of MCGAMs being used by the gateway (described in Section 4.2). EBNF.domain-syntax is the restricted domain syntax defined in Section 4.2, to which all of the domain components shall conform for the parse to be successful. If this fails, go to stage II. Kille Standards Track [Page 52] RFC 2156 MIXER January 1998 For each component, systematically allocate the attribute implied by each EBNF.domain-syntax component in the order: C, ADMD, PRMD, O, OU. Note that if the MCGAM used identifies an "omitted attribute", then this attribute shall be omitted in the systematic allocation. If this new component exceed an upper bound (ADMD: 16; PRMD: 16; O: 64; OU: 32) or it would lead to more than four OUs, then go to stage II with the attributes derived. The attributes derived in this step (referred to as RHS attributes) are merged with the ones derived from the LHS (step 6). In some cases, not all of the RHF attributes are used. LHS attributes are all used. C will not be in the LHS attributes. If ADMD is in the LHS attributes, only C is taken from the RHS attributes. If PRMD is in the LHS attributes, C and ADMD are taken from the RHS attributes. If O is on the LHS, C, ADMD and PRMD (if present) are taken from the RHS attributes. In other cases all RHS attributes are taken. 9. Ensure that the set of attributes conforms both to the MTS.ORAddress specification and to the restrictions on this set given in X.400, and that no upper bounds are exceeded for any attribute. If not go to stage II. 10. Build the OR Address from this information. STAGE II. This will only be reached if the RFC 822 EBNF.822-address is not a valid X.400 encoding. This implies that the address refers to a recipient on an RFC 822 system or that the encoding of the address is invalid. Such addresses shall be encoded in an X.400 OR Address using a domain defined attribute. 1. Convert the EBNF.822-address to PrintableString, as specified in Chapter 3. 2. Generate the "RFC-822" domain defined attribute from this string. 3. Build the rest of the OR Address in the manner described below. Kille Standards Track [Page 53] RFC 2156 MIXER January 1998 It is not always possible to encode the domain defined attribute due to length restrictions. If the limit is exceeded by a mapping at the MTS level, then the gateway shall reject the message in question. If this occurs at the IPMS level, then the action will depend on the policy being taken for IPMS encoding, which is discussed in Section 5.1.3. Use Stage I, step 8, to generate a set of attributes to build the remainder of the address. The administrative equivalence of the mappings will ensure correct routing through X.400 to a gateway back to RFC 822. If Stage I, step 8 does not generate a set of attributes or the address generated is unroutable, the remained of the OR address is generated as follows. The remainder of the OR address effectively identifies a source route to a gateway from the X.400 side. There are three cases, which are handled differently: SMTP Return Address This shall be set up so that errors are returned through the same gateway. Therefore, the OR Address of the local gateway shall be used. IPMS Addresses These are optimised for replying. In general, the message may end up anywhere within the X.400 world, and so this optimisation identifies a gateway appropriate for the RFC 822 address being converted. The 822.domain to which the address would be routed is used to select an appropriate gateway. In this case, it may be useful to use a non-local gateway, which will optimise the reply address. This information may be looked up in gateway tables in a manner equivalent to the MCGAM lookup. Because of the similarity of lookup, the three MCGAM lookup mechanisms (table, X.500, DNS) are also available to look up this information. This information is local, and a gateway may insert any appropriate (gateway) OR Address. The longest possible match on the 822.domain defines which gateway to use. This mechanism is used for any part of the X.400 namespace for which it is desirable to identify a preferred X.400 gateway in order to optimise routing. If no mapping is found for the 822.domain, a default value (typically that of the local gateway) is used. It is never appropriate to ignore the locally used MCGAMs. Kille Standards Track [Page 54] RFC 2156 MIXER January 1998 SMTP Recipient As the RFC 822 and X.400 worlds are in principle fully connected, there is no technical reason for this situation to occur. In practice, this is not the case. In some cases, routing may be configured to use X.400 to connect an RFC 822 island to the Internet. The information that this part of the domain space is to be routed by X.400 rather than remaining within the RFC 822 world shall be configured privately into the gateway in question. X.400 routing shall not make use of the presence of the RFC-822 DDA to perform X.400 routing. The OR address shall then be generated in the same manner as for an IPMS address, using the locally available MCGAMs. It is to support this case that the definition of the global domain to gateway mapping is important, as the use of this mapping will lead to a remote X.400 address, which can be routed by X.400 routing procedures. The information in this mapping shall not be used as a basis for deciding to convert a message from RFC 822 to X.400. Three examples are given, neither of which has applicable MCGAMs. Example 1: (Address not in "localpart" "@" "domainpart") @relay.co.uk:userb@host2 maps to c=gb; a= ; p=uk.ac; o=mr; dd.rfc-822=(a)relay.co.uk:userb(a)host2; Example 2: (Address with non printablestring characters) Tom_Harris@cs.widget.com maps to c=us; a=MCI; P=relay; dd.rfc-822=Tom(u)Harris(a)cs.widget.com; Example 3: (Address with an entry for alter.net into the OR Address of Preferred Gateway table, pointing to c=gb; A=BTglobal; P=relay) postmaster@UK.alter.net maps to c=gb; a=BTglobal; P=relay; dd.rfc-822=postmaster(a)UK.alter.net; Kille Standards Track [Page 55] RFC 2156 MIXER January 1998 4.3.4.1. Heuristic for mapping RFC 822 to X.400 The following heuristic, which relates to ordering of address components, may be used when mapping from RFC 822 to X.400. The ordering of attributes may be inverted or mixed, and so the following heuristics may be applied: If there is an Organization attribute to the left of any Org Unit attribute, assume that the hierarchy is inverted. This is to facilitate the situation where a user has input the attributes in reverse hierarchical order. To do this the gateway shall first map according to the order defined in 4.3.3. If this mapping generates an address which X.400 address verification shows to be invalid, this heuristic may be applied as an alternative to immediate rejection of the address. 4.3.5. X.400 -> RFC 822 Basic Address Mapping There are two basic cases: 1. RFC 822 addresses encoded in X.400. 2. "Genuine" X.400 addresses. This may include symmetrically encoded RFC 822 addresses. When an MTS Recipient OR Address is interpreted, gatewaying will be selected if there is a single "RFC-822" domain defined attribute present. In this case, use mapping A and in other cases, use mapping B. RFC 1327 specified that this shall only be done when the gateway identfied is local or otherwise known, and identified the approach specified here as a pragmatic option. Experience has shown that this is effective in practice, despite theoretical problems. If a gateway wishes to make a mapping in a manner similar to RFC 1327, but does not wish for this global interpretation (e.g., to support an RFC 822 local system, which does not use global addressing), then it may choose a private domain defined attribute, different to "RFC-822". An RFC 1327 gateway might be configurable to operate in this manner. Mapping A 1. Map the domain defined attribute value to ASCII, as defined in Chapter 3, and drop all other attributes. Kille Standards Track [Page 56] RFC 2156 MIXER January 1998 Mapping B This is used for X.400 addresses which do not use the explicit RFC 822 encoding. 1. For all string encoded attributes, remove any leading or trailing spaces, and replace adjacent spaces with a single space. The only attribute which is permitted to have zero length is the ADMD. This shall be mapped onto a single space. These transformations are for lookup only. If an EBNF.std-or-address mapping is used as in 4), then the original values shall be used. 2. The numeric country codes may be mapped to the two letter values (as defined in ISO 3166). Global mappings are usually only defined in terms of the ISO 3166 codes. 3. Noting the hierarchy specified in 4.3.1 and including omitted attributes, determine the maximum set of attributes which have an associated domain specification in the local set of MCGAMs. If no match is found, allocate the domain as described below, and go to step 5. The default domain to be used is the specification of the local gateway. A gateway may use other domains according to private mapping tables or heuristics. For example, it may choose a domain which it knows to provide a free gateway service to the mapped address. In cases where the address refers to an X.400 UA, it is important that the generated domain will correctly route to a gateway. In general, this is achieved by carefully co- ordinating RFC 822 routing with the definition of the MCGAMs, as there is no easy way for the gateway to make this check. One rule that shall be used is that domains with only one component will not route to a gateway. If the generated domain does not route correctly, the address is treated as if no match is found. The gateway may also make use of a mapping equivalent to the MCGAM mapping to determine the domain to use. This mapping is done from the OR Address hierarchy. This is not a global mapping, but is a routing style mapping from the OR Address space, to enable a best choice domain to be inserted. This mapping is supported by the three MCGAM lookup mechanisms. Kille Standards Track [Page 57] RFC 2156 MIXER January 1998 4. The mapping identified in 3) gives a domain, and an OR address prefix. Follow the hierarchy: C, ADMD, PRMD, O, OU. For each successive component below the OR address prefix, which conforms to the syntax EBNF.domain-syntax (as defined in 4.3.1), allocate the next subdomain. At least one attribute of the X.400 address shall not be mapped onto subdomain, as 822.local- part cannot be null. If there are omitted attributes in the OR address prefix, these will have correctly and uniquely mapped to a domain component. Where there is an attribute omitted below the prefix, all attributes remaining in the OR address shall be encoded on the LHS. This is to ensure a reversible mapping. For example, if there is an address /S=XX/O=YY/ADMD=A/C=NN/ and a mapping for /ADMD=A/C=NN/ is used, then /S=XX/O=YY/ is encoded on the LHS. 5. If the address contains any attribute not used in mnemonic form, then all of the attributes in the address shall be encoded on the LHS in EBNF.std-or-address syntax, as described below. For addresses of mnemonic form, if the remaining components are personal-name components, conforming to the restrictions of 4.2.1, then EBNF.encoded-pn is derived to form 822.local-part. In other cases the remaining components are simply encoded as 822.local-part using the EBNF.std-or-address syntax. If necessary, the 822.quoted-string encoding is used. The following are examples of legal quoting: "a b".c@x; "a b.c"@x. Either form may be generated. Generation of the latter style is strongly recommended. Four examples are given. Example 1: (Address with missing X.400 elements and no specific mapping rule for "o=sales; a=Master400; C=it", where a mapping exists for a=master400; C=it;) S=Support; O=sales; A=Master400; C=it; maps to /S=Support/o=sales/@Master400.it Kille Standards Track [Page 58] RFC 2156 MIXER January 1998 Example 2: (Address with illegal characters in RFC822 generated domain if default hierarchical translation (specific mapping rule is existing for c=fr; a=atlas; p=autoroutes) is used) S=renseignements; O=Region Parisienne; P=autoroutes; A=atlas; C=fr; maps to "/S=renseignements/o=Region Parisienne/"@autoroutes.fr Example 3: (Address containing elements not mappable into RFC822 local part) S=Rossi; DD.cap=20100; DD.ph1=Via Larga 11; DDA.city=Milano; A=PtPostel; C=it; maps to "/DD.cap=20100/DD.ph1=Via Larga 11/DD.city=Milano/S=Rossi/"@ptpostel.it Example 4: (Address with an entry for A=ATT; C=us; into the domain of Preferred Gateway table, pointing to attmail.com) G=Andy; S=Wharol; O=MMNY; A=ATT; C=us; maps to /G=Andy/S=Wharol/O=MMNY@attmail.com 4.4. Repeated Mappings There are two types of repeated mapping: 1. A recursive mapping, where the repeat is within one gateway 2 A source route, where the repetition occurs across multiple gateways Kille Standards Track [Page 59] RFC 2156 MIXER January 1998 4.4.1. Recursive Mappings It is possible to supply an address which is recursive at a single gateway. For example: C = "XX" ADMD = "YY" O = "ZZ" "RFC-822" = "Smith(a)ZZ.YY.XX" This is mapped first to an RFC 822 address, and then back to the X.400 address: C = "XX" ADMD = "YY" O = "ZZ" Surname = "Smith" In some situations this type of recursion may be frequent. It is important where this occurs, that no unnecessary protocol conversion occurs. This will minimise loss of service. 4.4.2. Source Routes The mappings defined are symmetrical and reversible across a single gateway. The symmetry is particularly useful in cases of (mail exploder type) distribution list expansion. For example, an X.400 user sends to a list on an RFC 822 system which he belongs to. The received message will have the originator and any 3rd party X.400 OR Addresses in correct format (rather than doubly encoded). In cases (X.400 or RFC 822) where there is common agreement on gateway identification, then this will apply to multiple gateways. When a message traverses multiple gateways, the mapping will always be reversible, in that a reply can be generated which will correctly reverse the path. In many cases, the mapping will also be symmetrical, which will appear clean to the end user. For example, if countries "AB" and "XY" have RFC 822 networks, but are interconnected by X.400, the following may happen: The originator specifies: Joe.Soap@Widget.PTT.XY Kille Standards Track [Page 60] RFC 2156 MIXER January 1998 This is routed to a gateway, which generates: C = "XY" ADMD = "PTT" PRMD = "Griddle MHS Providers" Organization = "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 equivalences are defined. In other cases, the reversibility is more important, due to the (far too frequent) cases where RFC 822 and X.400 services are partitioned. The syntax may be used to source route. THIS IS STRONGLY DISCOURAGED. For example: X.400 -> RFC 822 -> X.400 C = "UK" ADMD = "Gold 400" PRMD = "UK.AC" "RFC-822" = "/PN=Duval/DD.Title=Manager/(a)Inria.ATLAS.FR" This will be sent to an arbitrary UK Academic Community gateway by X.400. Then it will be sent by JNT Mail to another gateway determined by the domain Inria.ATLAS.FR (FR.ATLAS.Inria). This will then derive the X.400 OR Address: C = "FR" ADMD = "ATLAS" PRMD = "Inria" PN.S = "Duval" "Title" = "Manager" Kille Standards Track [Page 61] RFC 2156 MIXER January 1998 Similarly: RFC 822 -> X.400 -> RFC 822 "/RFC-822=jj(a)seismo.css.gov/PRMD=AC/ADMD=BT/C=GB/"@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 OR Name, along with OR Address. The RFC 822 addresses are mapped onto the OR Address component. As there is no functional mapping for the Directory Name on the RFC 822 side, a textual mapping is used. There is no requirement for reversibility in terms of the goals of this specification. There may be some loss of functionality in terms of third party recipients where only a directory name is given, but this seems preferable to the significant extra complexity of adding a full mapping for Directory Names. The Directory Name shall be represented within an RFC 822 comment using the comaptible formats of RFC 1484 or RFC 1485. It is recommended that the directory string format of RFC 1485 is used [24]. The User Friendly Name form of RFC 1484 may be used [25]. 4.6. MTS Mappings The basic mappings at the MTS level are: 1) SMTP originator -> MTS.PerMessageSubmissionFields.originator-name MTS.OtherMessageDeliveryFields.originator-name -> SMTP originator 2) SMTP recipient -> MTS.PerRecipientMessageSubmissionFields MTS.OtherMessageDeliveryFields.this-recipient-name -> SMTP recipient SMTP 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. Kille Standards Track [Page 62] RFC 2156 MIXER January 1998 4.6.1. RFC 822 -> X.400 MTS Mappings From the SMTP Originator, use the basic ORAddress mapping, to generate MTS.PerMessageSubmissionFields.originator-name (MTS.ORName), without a DirectoryName. For recipients, the following settings are made for each component of MTS.PerRecipientMessageSubmissionFields. recipient-name This is derived from the SMTP recipient by the basic ORAddress mapping. originator-report-request This may either be set to "delivery-report", or set according to SMTP extensions as set out in Appendix A. explicit-conversion This optional component is omitted, as this service is not needed extensions The default value (no extensions) is used 4.6.2. X.400 -> RFC 822 MTS Mappings The basic functionality is to generate the SMTP originator and recipients. There is information present on the X.400 side, which cannot be mapped into analogous SMTP services. For this reason, new RFC 822 fields are added for the MTS Originator and Recipients. The information discarded at the SMTP level will be present in these fields. In some cases a (positive) delivery report will be generated. 4.6.2.1. SMTP Mappings Use the basic ORAddress mapping, to generate the SMTP originator (return address) from MTS.OtherMessageDeliveryFields.originator-name (MTS.ORName). If MTS.ORName.directory-name is present, it is discarded. (Note that it will be presented to the user, as described in 4.6.2.2). The mapping uses the MTA level information, and maps each value of MTA.PerRecipientMessageTransferFields.recipient-name, where the responsibility bit is set, onto an SMTP recipient. Note:The SMTP recipient is conceptually generated from MTS.OtherMessageDeliveryFields.this-recipient-name. This is done by taking MTS.OtherMessageDeliveryFields.this-recipient-name, and generating an SMTP recipient according to the basic ORAddress Kille Standards Track [Page 63] RFC 2156 MIXER January 1998 mapping, discarding MTS.ORName.directory-name if present. However, if this model was followed exactly, there would be no possibility to have multiple SMTP recipients on a single message. This is unacceptable, and so layering is violated. 4.6.2.2. Generation of RFC 822 Headers Not all per-recipient information can be passed at the SMTP level. For this reason, two new RFC 822 headers are created, in order to carry this information to the RFC 822 recipient. These fields are "X400-Originator:" and "X400-Recipien