RFC 1506
A Tutorial on Gatewaying between X.400 and Internet Mail
RFC 1506: A Tutorial on Gatewaying between X.400 and Internet Mail โจ
Part 1 of 8 ๐
- Network Working Group ๐ธ
- RFC: 1506
- Title: A Tutorial on Gatewaying between X.400 and Internet Mail
- Author: J. Houttuin, RARE Secretariat ๐
- Series: RARE Technical Report: 6
- Date: August 1993 ๐
- Status: informational. It provides information for the Internet community and does not specify an Internet standard ๐ฆ
- Obsoletes / Updates: the title block doesn't list anything this one obsoletes or updates ๐
Status of this Memo ๐ฆ
Okay so this memo is here to inform the Internet community ๐ It does not specify an Internet standard. Distribution of this memo is unlimited โจ
Introduction ๐
Okay bestie, so there are SO many ways X.400 and Internet mail systems can be hooked up to each other ๐ญ Addresses and service elements can get mapped onto each other in different ways. The early gateway implementations weren't necessarily better or worse than each other, but the fact that each one handled the mappings differently caused major interworking problems ๐ It got especially messy when a message (or address) crossed more than one gateway.
The world needed ONE global standard for X.400 and Internet mail gatewaying, and that came from the Internet Request For Comments 1327, titled "Mapping between X.400(1988)/ISO 10021 and RFC 822." ๐
This tutorial was made specially for new gateway managers who need help getting into the complicated topic of mail gatewaying according to RFC 1327 ๐ง You can see why it's needed from this super discouraging paragraph in RFC 1327, chapter 1:
"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."
Honestly, the RFC 1327 energy is a LOT ๐ญ So this intro is written generally enough that e-mail managers who are new to gatewaying, or new to one of the two e-mail worlds in general, can read it too. Some parts of this intro can be skipped if you need to ๐ธ
For novice end-users, even this tutorial will be a struggle. They're encouraged to use the COSINE MHS pocket user guide [14] instead ๐
Also, this document can be used as a reference guide for X.400 <-> RFC 822 gatewaying ๐ Wherever the tutorial is missing detail, it points to the matching chapters in other documents. So it shields the RFC 1327 novice from too much detail. Iconic. ๐
Acknowledgements ๐ซถ
This tutorial is heavily based on other documents, like [2], [6], [7], [8], and [11]. Large parts of text were reproduced (slightly edited) with kind permission from the authors ๐ท
Huge thanks to these people for their thorough reviews: Peter Cowen (Nexor), Urs Eppenberger (SWITCH), Erik Huizer (SURFnet), Steve Kille (ISODE Consortium), Paul Klarenberg (NetConsult), Felix Kugler (SWITCH), Sabine Luethi. Main character reviewers ๐โจ
Disclaimer ๐
Real talk: this document isn't everywhere exact and/or complete when it describes the standards involved. Irrelevant details get left out, and some concepts are simplified so they're easier to understand ๐ง For reference purposes, always use the original documents ๐
Table of Contents ๐ง
1. An overview of relevant standards ........................ 4
1.1. What is X.400 ? ...................................... 5
1.2. What is an RFC ? ..................................... 8
1.3. What is RFC 822 ? .................................... 9
1.4. What is RFC 1327 ? ................................... 11
2. Service Elements ......................................... 12
3. Address mapping .......................................... 14
3.1. X.400 addresses ...................................... 15
3.1.1. Standard Attributes .............................. 15
3.1.2. Domain Defined Attributes ........................ 17
3.1.3. X.400 address notation ........................... 17
3.2. RFC 822 addresses .................................... 19
3.3. RFC 1327 address mapping ............................. 20
3.3.1. Default mapping .................................. 20
3.3.1.1. X.400 -> RFC 822 ............................. 20
3.3.1.2. RFC 822 -> X.400 ............................. 22
3.3.2. Exception mapping ................................ 23
3.3.2.1. PersonalName and localpart mapping ........... 25
3.3.2.2. X.400 domain and domainpart mapping .......... 26
3.3.2.2.1. X.400 -> RFC 822 ......................... 27
3.3.2.2.2. RFC 822 -> X.400 ......................... 28
3.4. Table co-ordination .................................. 31
3.5. Local additions ...................................... 31
3.6. Product specific formats ............................. 32
3.7. Guidelines for mapping rule definition ............... 34
4. Conclusion ............................................... 35
Appendix A. References ...................................... 36
Appendix B. Index (Only available in the Postscript version) 37
Appendix C. Abbreviations ................................... 37
Appendix D. How to access the MHS Co-ordination Server ...... 38
Security Considerations ..................................... 39
Author's Address ............................................ 39
1. An overview of relevant standards ๐
This chapter covers the history, status, future, and contents of the standards involved ๐
There's a major difference between the mail systems used in the USA and Europe ๐บ๐ธ๐ช๐บ Mail systems started mainly in the USA, where their explosive growth began as early as the seventies. Lots of company-specific mail systems were developed at the same time, which, of course, meant a high degree of incompatibility ๐ The Advanced Research Projects Agency (ARPA) had to use machines from many different manufacturers, so it triggered the development of the Internet and the TCP/IP protocol suite. That suite was later accepted as a standard by the US Department of Defense (DoD) ๐ฆ The Internet mail format is defined in STD 11, RFC 822, and the protocol used for exchanging mail is the simple mail transfer protocol (SMTP) [1]. Together with UUCP and the BITNET protocol NJE, SMTP became one of the main de facto mail standards in the US ๐ธ
Unfortunately, all these protocols were incompatible, which is exactly why a global mail standard that everyone could accept was needed ๐ญ CCITT and ISO started working on a norm, and their work converged into what's now known as the X.400 Series Recommendations โจ One of the goals was to define a superset of the existing systems, so integration would be easier later on. Some typical positive features of X.400 are the store-and-forward mechanism, the hierarchical address space, and the possibility of combining different types of body parts into one message body ๐
In Europe, the mail system boom came later. Since there wasn't much equipment in place yet, it made sense to use X.400 as much as possible right from the start ๐ง A strong X.400 lobby existed, especially in West-Germany (DFN). In the R&D world, mostly EAN was used, because it was the only affordable X.400 product at that time (source-code licenses were free for academic institutions) ๐
Right now, the two worlds of X.400 and SMTP are moving closer together ๐ For instance, the United States Department of Defense, one of the early forces behind the Internet, has decided that future DoD networking should be based on ISO standards. That implies a migration from SMTP to X.400 ๐ And as an important example of harmonisation in the other direction, X.400 users in Europe need to communicate with the Internet ๐ Because of the large traffic volume between the two nets, interconnecting them through a single international gateway isn't enough. The load on that one gateway would be too heavy, so direct access using local gateways is more feasible ๐ช
Even though X.400's expected success has been a bit disappointing (mainly because no good products were available), many people still see the future of e-mail systems in this standard ๐
And no matter whether X.400 takes over the e-mail world in the long run or not, SMTP can't be neglected over the next ten years ๐ซถ Especially its simple installation procedures and high degree of connectivity will keep contributing to a growing number of RFC 822 installations in Europe and worldwide in the near future ๐
1.1. What is X.400 ? ๐
okay so bestie, we need to talk about X.400 ๐ In October 1984, the Plenary Assembly of the CCITT accepted a standard to facilitate international message exchange between subscribers to computer based store-and-forward message services. This standard is known as the CCITT X.400 series recommendations ([16], from now on called X.400(84)) and happens to be the first CCITT recommendation for a network application ๐ฅ It should be noted that X.400(84) is based on work done in the IFIP Working Group 6.5, and that ISO at the same time was proceeding towards a compatible document. However, the standardisation efforts of CCITT and ISO did not converge in time (not until the 1988 version), to allow the publication of a common text. so close, and yet ๐ญ
X.400(84) triggered the development of software implementing (parts of) the standard in the laboratories of almost all major computer vendors and many software houses. Similarly, public carriers in many countries started to plan X.400(84) based message systems that would be offered to the users as value added services. Early implementations appeared shortly after first drafts of the standard were published and a considerable number of commercial systems are available nowadays. the whole industry was lowkey obsessed ๐ฆ
X.400(84) describes a functional model for a Message Handling System (MHS) and associates services and protocols. The model illustrated in Figure 1.1. defines the components of a distributed messaging system. picture this ๐ง
Users in the MHS environment are provided with the capability of sending and receiving messages. Users in the context of an MHS may be humans or application processes. The User Agent (UA) is a process that makes the services of the MTS available to the user. A UA may be implemented as a computer program that provides utilities to create, send, receive and perhaps archive messages. Each UA, and thus each user, is identified by a name (each user has its own UA). โจ
-----------------------------------------------------------------
| user user Message Handling Environment|
| | | |
| ----------------------------------------------------------|
| | | | Message Handling System ||
| | ---- ---- ||
| | |UA| |UA| ||
| | ---- ---- ||
| | | | ||
| | -------------------------------------------------||
| | | | | Message Transfer System |||
| | ---- | ----- ----- |||
|user-|-|UA|--|--|MTA| |MTA| |||
| | ---- | ----- ----- |||
| | | \ / |||
| | | \ / |||
| | | \ / |||
| | | \ / |||
| | | \ / |||
| | ---- | ----- |||
|user-|-|UA|--|---------|MTA| |||
| | ---- | ----- |||
| | -------------------------------------------------||
| ----------------------------------------------------------|
-----------------------------------------------------------------
Fig. 1.1. X.400 functional model
The Message Transfer system (MTS) transfers messages from an originating UA to a recipient UA. As implied by the Figure 1.1, data sent from UA to UA may be stored temporarily in several intermediate Message Transfer Agents (MTA), i.e., a store-and- forward mechanism is being used. An MTA forwards received messages to a next MTA or to the recipient UA. so the messages kinda hop around, its giving postal ๐ฎ
X.400(84) divides layer 7 of the OSI Reference Model into 2 sublayers, the User Agent Layer (UAL) and the Message Transfer Layer (MTL) as shown in the Figure 1.2. ๐ธ
The MTL is involved in the transport of messages from UA to UA, using one or several MTAs as intermediaries. By consequence, routing issues are entirely dealt with in the MTL. The MTL in fact corresponds to the postal service that forwards letters consisting of an envelope and a content. Two protocols, P1 and P3, are used between the MTL entities (MTA Entity (MTAE), and Submission and Delivery Entity (SDE)) to reliably transport messages. The UAL embodies peer UA Entities (UAE), which interpret the content of a message and offer specific services to the application process. Depending on the application to be supported on top of the MTL, one of several end-to-end protocols (Pc) is used between UAEs. For electronic mail, X.400(84) defines the protocol P2 as part of the InterPersonal Messaging Service (IPMS). Conceivably other UAL protocols may be defined, e.g., a protocol to support the exchange of electronic business documents. ngl the MTL does the heavy lifting and the UAL is the fun, user-facing part ๐
--------------------------------------------------------------
----- -----
UA layer |UAE|<----- P2, Pc ----------->|UAE|
----- -----
--------------------------------------------------------------
------ ------ -----
MTA layer |MTAE|<-- P1 -->|MTAE|<-- P3-->|SDE|
------ ------ -----
--------------------------------------------------------------
xxxE = xxx Entity ; SDE = Submission & Delivery Entity
--------------------------------------------------------------
Fig. 1.2. X.400 Protocols
The structure of an InterPersonal Message (IPM) can be visualised as in Figure 1.3. (Note that the envelope is not a part of the IPM; it is generated by the MTL). ๐ฆ
Forwarded
Message IP-message
- ---------- --- ---------- -
| message- |envelope| / | PDI | |
| content IPM ---------- / ---------- |
| - - ---------- / ---------- |
| | | IPM- |heading | / |heading | |
| | | body ---------- / ---------- |
| | | - ----------/ ---------- |
| | | | |bodypart| |bodypart| |
| | | | ----------\ ---------- |
| | | | ---------- \ ---------- |
| | | | |bodypart| \ |bodypart| |
| | | | ---------- \ ---------- |
| | | | . \ |
| | | | . \ |
| | | | ---------- \ ---------- |
| | | | |bodypart| \ |bodypart| |
- - - - ---------- - ---------- -
(PDI = Previous Delivery Info.)
Fig. 1.3. X.400 message structure
An IPM heading contains information that is specific for an interpersonal message like 'originator', 'subject', etc. Each bodypart can contain one information type, text, voice or as a special case, a forwarded message. A forwarded message consists of the original message together with Previous Delivery Information (PDI), which is drawn from the original delivery envelope. the forwarded message is basically a message wearing its own history as an accessory ๐
Early experience with X.400(84) showed that the standard had various shortcomings. Therefore CCITT, in parallel with ISO, corrected and extended the specification during its 1984 to 1988 study period and produced a revised standard [17], which was accepted at the 1988 CCITT Plenary Meeting [10]. Amongst others, X.400(88) differs from X.400(84) in that it defines a Message Store (MS), which can be seen as a kind of database for messages. An MS enables the end-user to run a UA locally, e.g., on a PC, whilst the messages are stored in the MS, which is co-located with the MTA. The MTA can thus always deliver incoming messages to the MS instead of to the UA. The MS can even automatically file incoming messages according to certain criteria. Other enhancements in the 88 version concern security and distribution lists. the Message Store was the glow-up ๐โจ
1.2. What is an RFC ? ๐
Okay so the Internet is basically a loosely-organised international group project ๐ of autonomous, interconnected networks. Hosts talk to each other because everyone voluntarily sticks to open protocols and procedures defined by Internet Standards. There are also a bunch of isolated internets (sets of interconnected networks) that aren't connected to the Internet but still use the Internet Standards. The architecture and technical specs we have today came out of loads of research and development work over a period of two decades, done by the network R&D community, service and equipment vendors, and government agencies all around the world. Iconic teamwork ๐ซถ
In general, an Internet Standard is a specification that is stable and well-understood, is technically competent, has multiple, independent, and interoperable implementations with operational experience, enjoys significant public support, and is recognisably useful in some or all parts of the Internet. Main character energy for real ๐
The principal set of Internet Standards is commonly known as the "TCP/IP protocol suite". As the Internet evolves, new protocols and services, in particular those for Open Systems Interconnection (OSI), have been and will be deployed in traditional TCP/IP environments, leading to an Internet that supports multiple protocol suites. It's giving "everyone's invited" ๐
The following organisations are involved in setting Internet standards. โจ
Internet standardisation is an organised activity of the Internet Society (ISOC). The ISOC is a professional society that is concerned with the growth and evolution of the world-wide Internet, with the way in which the Internet is and can be used, and with the social, political, and technical issues that arise as a result. ๐ธ
The Internet Engineering Task Force (IETF) is the primary body developing new Internet Standard specifications. The IETF is composed of many Working Groups, which are organised into areas, each of which is co-ordinated by one or more Area Directors. ๐ง
The Internet Engineering Steering Group (IESG) is responsible for technical management of IETF activities and the approval of Internet standards specifications, using well-defined rules. The IESG is composed of the IETF Area Directors, some at-large members, and the chairperson of the IESG/IETF. ๐
The Internet Architecture Board (IAB) has been chartered by the Internet Society Board of Trustees to provide quality control and process appeals for the standards process, as well as external technical liaison, organizational oversight, and long-term architectural planning and research. ๐
Any individual or group (e.g., an IETF or RARE working group) can submit a document as a so-called Internet Draft. After the document is proven stable, the IESG may turn the Internet-Draft into a "Requests For Comments" (RFC). RFCs cover a wide range of topics, from early discussion of new research concepts to status memos about the Internet. All Internet Standards (STDs) are published as RFCs, but not all RFCs specify standards. Another sub-series of the RFCs are the RARE Technical Reports (RTRs). ๐
As an example, this tutorial also started out as an Internet-Draft. After almost one year of discussions and revisions it was approved by the IESG as an Informational RFC. Full glow-up arc ๐ฆโจ
Once a document is assigned an RFC number and published, that RFC is never revised or re-issued with the same number. Instead, a revision will lead to the document being re-issued with a higher number indicating that an older one is obsoleted. Numbers are forever, bestie ๐๐
1.3. What is RFC 822 ? ๐
STD 11, RFC 822 defines a standard for the format of Internet text messages. Messages consist of lines of text. No special provisions are made for encoding drawings, facsimile, speech, or structured text. No significant consideration has been given to questions of data compression or to transmission and storage efficiency, and the standard tends to be free with the number of bits consumed. For example, field names are specified as free text, rather than special terse codes. Honestly it's very generous with the bits ๐
A general "memo" framework is used. That is, a message consists of some information in a rigid format (the 'headers'), followed by the main part of the message (the 'body'), with a format that is not specified in STD 11, RFC 822. It does define the syntax of several fields of the headers section; some of these fields must be included in all messages. ๐ฌ
STD 11, RFC 822 is used in conjunction with a number of different message transfer protocol environments (822-MTSs). ๐
- SMTP Networks: On the Internet and other TCP/IP networks, STD 11, RFC 822 is used in conjunction with two other standards: STD 10, RFC 821, also known as Simple Mail Transfer Protocol (SMTP) [1], and RFCs 1034 and 1035 which specify the Domain Name System [3].
- UUCP Networks: UUCP is the UNIX to UNIX CoPy protocol, which is usually used over dialup telephone networks to provide a simple message transfer mechanism. โ๏ธ
- BITNET: Some parts of Bitnet and related networks use STD 11, RFC 822 related protocols, with EBCDIC encoding. ๐พ
- JNT Mail Networks: A number of X.25 networks, particularly those associated with the UK Academic Community, use the JNT (Joint Network Team) Mail Protocol, also known as Greybook. ๐
STD 11, RFC 822 is based on the assumption that there is an underlying service, which in RFC 1327 is called the 822-MTS service. The 822-MTS service provides three basic functions: ๐งฉ
- Identification of a list of recipients.
- Identification of an error return address.
- Transfer of an RFC 822 message.
It is possible to achieve 2) within the RFC 822 header. Some 822-MTS protocols, in particular SMTP, can provide additional functionality, but as these are neither mandatory in SMTP, nor available in other 822-MTS protocols, they are not considered here. Details of aspects specific to two 822-MTS protocols are given in Appendices B and C of RFC 1327. 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 P2 heading fields, although some are analogous to MTS Service Elements. ๐
1.4. What is RFC 1327 ? ๐ฆ
There is a large community using STD 11, RFC 822 based protocols for mail services, who will wish to communicate with users of the InterPersonal Messaging Service (IPMS) provided by X.400 systems, and the other way around. This will also be a requirement in cases where RFC 822 communities intend to make a transition to use X.400 (or the other way around, which also happens), as conversion will be needed to ensure a smooth service transition. Everyone wants to be able to text everyone ๐ฑ๐
The basic function of a mail gateway can be described as follows: receive a mail from one mail world, translate it into the formats of the other mail world and send it out again using the routing rules and protocols of that other world. ๐
Especially if a message crosses more than one gateway, it is important that all gateways have the same understanding of how things should be mapped. A simple example of what could go wrong otherwise is the following: A sends a message to B through a gateway and B's reply to A is being routed through another gateway. ๐
If the two gateways don't use the same mappings, it can be expected that the From and To addresses in the original mail and in the answer don't match, which is, to say the least, very confusing for the end-users (consider what happens if automated processes communicate via mail). More serious things can happen to addresses if a message crosses more than one gateway on its way from the originator to the recipient. As a real-life example, consider receiving a message from: ๐ณ
Mary Plork <MMP_+a_ARG_+lMary_Plork+r%MHS+d_A0CD8A2B01F54FDC-
A0CB9A2B03F53FDC%ARG_Incorporated@argmail.com>
This is not what you would call user-friendly addressing.... RFC 1327 describes a set of mappings that will enable a more transparent interworking between systems operating X.400 (both 84 and 88) and systems using RFC 822, or protocols derived from STD 11, RFC 822. Bestie, that address is a whole crime ๐
RFC 1327 describes all mappings in terms of X.400(88). It defines how these mappings should be applied to X.400(84) systems in its Appendix G. ๐
Some words about the history of RFC 1327: It started out in June 1986, when RFC 987 defined for X.400(84) what RFC 1327 defines for X.400(84 and 88). RFC 1026 specified a number of additions and corrections to RFC 987. In December 1989, RFC 1138, which had a very short lifetime, was the first one to deal with X.400(88). It was obsoleted by RFC 1148 in March 1990. Finally, in May 1992, RFC 1327 obsoleted all of its ancestors. Talk about a glow-up with a whole family tree ๐ณ๐
2. Service Elements โจ
Okay so, RFC 822 and X.400 messages are both built out of service elements (like 'originator' and 'subject') ๐. As long as a message stays inside its own world, those elements behave in a totally well-defined way ๐. The big goal for a gateway is to keep the service level as high as possible when a message crosses the border between the two mail worlds ๐ฆ.
When a user originates a message, a bunch of services are on the table ๐ . RFC 1327 spells out, for each service element, how much of it is supported for a recipient reached through a gateway. There are three levels of support:
- Supported: Some of the mappings are super straightforward, like
'822.Subject:' <-> 'IPMS.Subject'โจ. - Not supported: There can be a complete mismatch, where certain service elements only exist in one of the two worlds (e.g., interpersonal notifications) ๐.
- Partially supported: When similar service elements exist in both worlds but mean slightly different things, some tricks may be needed to provide the service over the gateway border ๐.
Apart from mapping the service elements themselves, a gateway also has to map the types and values assigned to them ๐ธ. Again, this can be very simple in some cases, e.g., 'IA5 -> ASCII'. The most complicated example is mapping address spaces ๐ญ. Address spaces aren't something static that can be defined within RFC 1327. They change continuously, and they're defined by certain addressing authorities, which aren't always parallel in the RFC 822 and X.400 worlds. A valid mapping between two addresses assumes, however, that there is 'administrative equivalence' between the two domains the addresses live in (see also [13]) ๐ง.
The following basic mappings are defined in RFC 1327. When going from RFC 822 to X.400, an RFC 822 message and its associated 822-MTS information is always mapped into an IPM (MTA, MTS, and IPMS Services) ๐ซถ. Going from X.400 to RFC 822, an RFC 822 message and its associated 822-MTS information may be derived from:
- A Report (MTA, and MTS Services)
- An InterPersonal Notification (IPN) (MTA, MTS, and IPMS services)
- An InterPersonal Message (IPM) (MTA, MTS, and IPMS services)
Probes (MTA Service) have no equivalent in STD 10, RFC 821 or STD 11, RFC 822, so the gateway handles them itself ๐. The gateway's Probe confirmation should be interpreted as if the gateway were the final MTA the Probe was sent to. Optionally, if the gateway uses RFC 821 as an 822-MTS, it may use the results of the VRFY command to test whether it would be able to deliver (or forward) mail to the mailbox under probe ๐.
MTS Messages containing Content Types other than those defined by the IPMS are not mapped by the gateway, and should be rejected at the gateway ๐ซ.
Some basic examples of mappings between service elements are listed below ๐.
Service elements:
RFC 822 X.400
------------------------------------------------
Reply-To: IPMS.Heading.reply-recipients
Subject: IPMS.Heading.subject
In-Reply-To: IPMS.Heading.replied-to-ipm
References: IPMS.Heading.related-IPMs
To: IPMS.Heading.primary-recipients
Cc: IPMS.Heading.copy-recipients
Service element types:
RFC 822 X.400
------------------------------------------------
ASCII PrintableString
Boolean Boolean
Service element values:
RFC 822 X.400
------------------------------------------------
oh_dear oh(u)dear
False 00000000
There are some mappings between service elements that are rather tricky and important enough to call out in this tutorial ๐ฅ. These are the mappings of origination-related headers and some envelope fields, and they're a bit of a rollercoaster ๐ข.
RFC 822 -> X.400:
- If
Sender:is present,Sender:is mapped toIPMS.Heading.originator, andFrom:is mapped toIPMS.Heading.authorizing-users. If not,From:is mapped toIPMS.Heading.originator.
X.400 -> RFC 822:
- If
IPMS.Heading.authorizing-usersis present,IPMS.Heading.originatoris mapped toSender:, andIPMS.Heading.authorizing-usersis mapped toFrom:. If not,IPMS.Heading.originatoris mapped toFrom:.
Envelope attributes:
- RFC 1327 doesn't define how to map the MTS.OriginatorName and the MTS.RecipientName (often called the P1.originator and P1.recipient), since that depends on which underlying 822-MTS is used ๐คทโโ๏ธ. In the very common case that RFC 821 (SMTP) is used for this purpose, the mapping normally goes like this:
MTS.Originator-name <-> MAIL FROM:
MTS.Recipient-name <-> RCPT TO:
For more details, refer to RFC 1327, chapters 2.2 and 2.3 ๐.
3. Address mapping โจ
Address mapping is often considered the most complicated part of mapping between service element values, so it gets its own chapter in this tutorial ๐ง .
Both RFC 822 and X.400 have their own specific address formats ๐
. RFC 822 addresses are text strings (e.g., "plork@tlec.nl"), whereas X.400 addresses are binary encoded sets of attributes with values ๐ซฃ. Those binary addresses can be made readable for a human user by a number of notations; for instance:
C=zz
ADMD=ade
PRMD=fhbo
O=a bank
S=plork
G=mary
The rest of this chapter digs into addressing issues and the mappings between the two address forms in more detail ๐ฆ.
3.1. X.400 addresses โจ
As already stated above, an X.400 address is modelled as a set of attributes ๐. Some of these attributes are mandatory, others are optional. Each attribute has a type and a value. For example, the Surname attribute has type IA5text, and an instance of this attribute could have the value 'Kille'. Attributes are divided into Standard Attributes (SAs) and Domain Defined Attributes (DDAs) ๐.
X.400 defines four basic forms of addresses ([17], 18.5), and the 'Mnemonic O/R Address' is the form that gets used the most ๐ฌ. It's also the only form dealt with in this tutorial. It's roughly the same address format as what was known in the 84 version as 'O/R names: form 1, variant 1' ([16] 3.3.2) ๐ฐ๏ธ.
3.1.1. Standard Attributes
Standard Attributes (SAs) are attributes that all X.400 installations are supposed to 'understand' (i.e., use for routing), for example 'country name', 'given name' or 'organizational unit' ๐บ๏ธ. The most commonly used SAs in X.400(84) are:
surName (S)
givenName (G)
initials (I*) (Zero or more)
generationQualifier (GQ)
OrganizationalUnits (OU1 OU2 OU3 OU4)
OrganizationName (O)
PrivateDomainName (PRMD)
AdministrationDomainName (ADMD)
CountryName (C)
The combination of S, G, I* and GQ is often referred to as the PersonalName (PN) ๐งโ๐คโ๐ง.
Although the standards don't define any hierarchy of addressing authorities, the following hierarchy is considered natural ๐ช:
PersonalName < OU4 < OU3 < OU2 < OU1 < O < P < A < C
In addition to the SAs listed above, X.400(88) defines some extra attributes, the most important of which is:
Common Name (CN)
CN can be used instead of, or even together with, PN โจ. The problem in X.400(84) was that PN (S G I* GQ) was well suited to represent persons, but not roles and abstract objects like distribution lists ๐ฌ. Even though postmaster is clearly a role and not someone's real surname, it was quite usual in X.400(84) to address a postmaster with S=postmaster. In X.400(88), the same postmaster would be addressed with CN=postmaster ๐
.
The attributes C and ADMD are mandatory (i.e., they must be present), and they may not be empty. At least one of the attributes PRMD, O, OU, PN and CN must be present ๐จ.
PRMD and ADMD are often felt to be routing attributes that don't really belong in addresses ๐ค. As an example of how such address attributes can be used for routing, consider two special values for ADMD:
ADMD=0;(zero) should be interpreted as 'the PRMD in this address is not connected to any ADMD'.ADMD= ;(single SPACE) should be interpreted as 'the PRMD in this address is reachable via any ADMD in this country'. It is expected that ISO will express this 'any' value by means of a missing ADMD attribute in future versions of MOTIS. This representation can uniquely identify the meaning 'any', as a missing or empty ADMD field as such is not allowed ๐.
Addresses are defined in X.400 using the Abstract Syntax Notation One (ASN.1) ๐งฉ. X.409 defines how definitions in ASN.1 should be encoded into binary format. Note that the meaning, and thus the ASN.1 encoding, of a missing attribute is not the same as that of an empty attribute. In addressing, this difference is often represented as follows ๐:
PRMD=;means that this attribute is present in the address, but its value is empty. Since this is not very useful, it's hardly ever used. The only examples the author knows of were caused by mail managers who should have had this tutorial before they started defining their addresses :-)PRMD=@;means that this attribute is not present in the address. {NB. This is only necessary if an address notation (see 3.1.3) requires that every single attribute in the hierarchy is somehow listed. Otherwise, a missing attribute can of course be represented by simply not mentioning it. This means that this syntax is mostly used in mapping rules, not by end users.}
Addresses that only contain SAs are often referred to as Standard Attribute Addresses (SAAs) ๐ซถ.
3.1.2. Domain Defined Attributes
Domain Defined Attributes (DDAs) can be used in addition to Standard Attributes ๐. An instance of a DDA consists of a type and a value. DDAs are meant to have a meaning only within a certain context (originally this was supposed to be the context of a certain management domain, hence the name DDA), such as a company context ๐ข.
As an example, a company might want to define a DDA for describing internal telephone numbers: DDA type=phone value=9571 ๐.
A bit tricky is the use of DDAs to encode service element types or values that are only available on one side of a service gateway ๐. The most important examples of such usage are defined in:
- RFC 1327 (e.g.,
DDA type=RFC-822 value=u(u)ser(a)isode.com) - RFC 1328 (e.g.,
DDA type=CommonName value=mhs-discussion-list)
Addresses that contain both SAs and DDAs are often referred to as DDA addresses ๐.
3.1.3. X.400 address notation โจ
Okay so X.400 only nails down the binary encoding of addresses ๐ It doesn't say how they should be written on paper or what they should look like on a computer screen. So there are a bunch of recommendations floating around for how to represent them ๐ฆ
- JTC proposed an annex to CCITT Rec. F.401 and ISO/IEC 10021-2, called 'Representation of O/R addresses for human usage'. According to this proposal, an X.400 address would look as follows:
G=jo; S=plork; O=a bank; OU1=owe; OU2=you; P=fhbo; A=ade; C=zz
Note that in this format, the order of O and the OUs is exactly the opposite of what you'd expect intuitively ๐ The attribute hierarchy goes left to right, except for O and the OUs, which go right to left. The reasoning is that this sequence follows the example of a postal address. This proposal has been added (as a recommendation) to the 1992 version of the standards ๐
- Following what was originally used in the DFN-EAN software, most EAN versions today use an address representation similar to the JTC proposal, with a few differences:
- natural ordering for O and OUs
- no numbering of OUs.
- allows writing ADMD and PRMD instead of A and P
The address in the example above could, in EAN, be represented as:
G=jo; S=plork; OU=you; OU=owe; O=a bank; PRMD=fhbo; ADMD=ade; C=zz
This DFN-EAN format is still often referred to as the 'readable format' ๐๐
- The RARE Working Group on Mail and Messaging, WG-MSG, has made a recommendation that is very similar to the DFN-EAN format, but with the hierarchy reversed. Further, ADMD and PRMD are used instead of A and P. This results in the address above being represented as:
C=zz; ADMD=ade; PRMD=fhbo; O=a bank; OU=owe; OU=you; S=plork; G=jo
This format is recognised by most versions of the EAN software. In the R&D community, this is one of the most popular address representations for business cards, letterheads, etc. ๐ผ It's also the format that will be used for the examples in this tutorial. (NB. The syntax used here for describing DDAs is as follows: DD.'type'='value', e.g., DD.phone=9571)
- RFC 1327 defines a slash separated address representation:
/G=jo/S=plork/OU=you/OU=owe/O=a bank/P=fhbo/A=ade/C=zz/
Not only is this format used by the PP software, it's also widespread for business cards and letterheads in the R&D community ๐
- RFC 1327 finally defines yet another format for X.400 domains (not for human users):
OU$you.OU$owe.O$a bank.P$fhbo.A$ade.C$zz
The main advantage of this format is that it is better machine-parseble than the others, which also immediately implies its main disadvantage: it is barely readable for humans ๐ Every attribute within the hierarchy should be listed, so a missing attribute must be represented by the '@' sign (e.g., $a bank.P$@.A$ade.C$zz).
- Paul-Andre Pays (INRIA) has proposed a format that combines the readability of the JTC format with the parsebility of the RFC 1327 domain format. A number of operational tools within the GO-MHS community are already based on (variants of) this proposal, but its future is still uncertain ๐ฅบ
3.2. RFC 822 addresses ๐
An RFC 822 address is an ASCII string of the following form:
localpart@domainpart
The domainpart is sub-divided into:
domainpart = sdom(n).sdom(n-1)....sdom(2).sdom(1).dom
sdom stands for "subdomain", and dom stands for "top-level-domain". ๐ธ
The localpart is normally a login name, and thus typically is a surname or an abbreviation for this. It can also designate a local distribution list ๐
The hierarchy (of addressing authorities) in an RFC 822 address looks like this:
localpart < sdom(n) < sdom(n-1) <...< dom
Some virtual real-life examples:
joemp@tlec.nl
tsjaka.kahn@walhalla.diku.dk
a13_vk@cs.rochester.edu
In the above examples, 'nl', 'dk', and 'edu' are valid, registered, top level domains. Note that some networks that have their own addressing schemes are also reachable by way of 'RFC 822-like' addressing. Consider the following addresses:
oops!user (a UUCP address)
V13ENZACC@CZKETH5A (a BITNET address)
These addresses can be expressed in RFC 822 format:
user@oops.uucp
V13ENZACC@CZKETH5A.BITNET
Note that the domains '.uucp' and '.bitnet' have no registered Internet routing. Such addresses must always be routed to a gateway (how this is done is outside the scope of this tutorial) ๐ช
As for mapping such addresses to X.400, there is no direct mapping defined between X.400 on the one hand and UUCP and BITNET on the other. So they are normally mapped to RFC 822 style first, and then to X.400 if needed โจ
3.3. RFC 1327 address mapping ๐
Despite the difference in address formats, the address spaces defined by RFC 822 and X.400 are quite similar. The most important parallels are:
- both address spaces are hierarchical
- top level domains and country codes are often the same
- localparts and surnames are often the same
This similarity can of course be exploited in address mapping algorithms. This is also done in RFC 1327 (NB only in the exception mapping algorithm. See chapter 3.3.2) ๐ง
Note that the actual mapping algorithm is much more complicated than shown below. For details, see RFC 1327, chapter 4 ๐ค
3.3.1. Default mapping ๐
The default RFC 1327 address mapping can be visualised as a function with input and output parameters:
address information of the gateway performing the mapping
|
v
+-----------------+
RFC 822 address <--->| address mapping | <---> X.400 address
+-----------------+
I.e., to map an address from X.400 to RFC 822 or vice versa, the only extra input needed is the address information of the local gateway ๐ซถ
3.3.1.1. X.400 -> RFC 822 ๐
There are two kinds of default address mapping from X.400 to RFC 822: one to map a real X.400 address to RFC 822, and another to decode an RFC 822 address that was mapped to X.400 (i.e., to reverse the default RFC 822 -> X.400 mapping).
To map a real X.400 address to RFC 822, the slash separated notation of the X.400 address (see chapter 3.1.) is mapped to 'localpart', and the local RFC 822 domain of the gateway that performs the mapping is used as the domain part. As an example, the gateway 'gw.switch.ch' would perform the following mappings:
C=zz; ADMD=ade; PRMD=fhbo; O=tlec; S=plork; ->
/C=zz/ADMD=ade/PRMD=fhbo/O=tlec/S=plork/@gw.switch.ch
C=zz; ADMD=ade; PRMD=fhbo; O=a bank; S=plork->
"/C=zz/ADMD=ade/PRMD=fhbo/O=a bank/S=plork/"@gw.switch.ch
The quotes in the second example are mandatory if the X.400 address contains spaces, otherwise the syntax rules for the RFC 822 localpart would be violated. ๐ โโ๏ธ
This default mapping algorithm is generally referred to as 'left-hand-side encoding' ๐
To reverse the default RFC 822 -> X.400 mapping (see chapter 3.3.1.2): if the X.400 address contains a DDA of the type RFC-822, the SAs can be discarded, and the value of this DDA is the desired RFC 822 address (NB. Some characters in the DDA value must be decoded first. See chapter 3.3.1.2.). For example, the gateway
DD.RFC-822=bush(a)dole.us; C=nl; ADMD=tlec; PRMD=GW
->
bush@dole.us
3.3.1.2. RFC 822 -> X.400 ๐ฆ
There are also two kinds of default address mapping from RFC 822 to X.400: one to map a real RFC 822 address to X.400, and another to decode an X.400 address that was mapped to RFC 822 (i.e., to reverse the default X.400 -> RFC 822 mapping).
To map a real RFC 822 address to X.400, the RFC 822 address is encoded in a DDA of type RFC-822, and the SAs of the local gateway performing the mapping are added to form the complete X.400 address. This mapping is generally referred to as 'DDA mapping'. As an example, the gateway 'C=nl; ADMD=tlec; PRMD=GW' would perform the following mapping:
bush@dole.us ->
DD.RFC-822=bush(a)dole.us; C=nl; ADMD=tlec; PRMD=GW
As for the encoding/decoding of RFC 822 addresses in DDAs, it is noted that RFC 822 addresses may contain characters (@ ! % etc.) that cannot directly be represented in a DDA. DDAs are of the restricted character set type 'PrintableString', which is a subset of IA5 (=ASCII). Characters not in this set need a special encoding. Some examples (For details, refer to RFC 1327, chapter 3.4.):
100%name@address -> DD.RFC-822;=100(p)name(a)address
u_ser!name@address -> DD.RFC-822;=u(u)ser(b)name(a)address
To decode an X.400 address that was mapped to RFC 822: if the RFC 822 address has a slash separated representation of a complete X.400 mnemonic O/R address in its localpart, that address is the result of the mapping. As an example, the gateway 'gw.switch.ch' would perform the following mapping:
/C=zz/ADMD=ade/PRMD=fhbo/O=tlec/S=plork/G=mary/@gw.switch.ch
->
C=zz; ADMD=ade; PRMD=fhbo; O=tlec; S=plork; G=mary
3.3.2. Exception mapping according to mapping tables โจ
okay bestie, chapter 3.3.1 showed that it's theoretically possible to use RFC 1327 with only the default mapping ๐ It's super simple and straightforward, BUT there are some really good reasons you'd want to skip it ๐
- RFC 822 users are used to writing simple addresses of the form 'localpart@domainpart' โจ They often find X.400 addresses (and the left-hand-side encoded versions too) unnecessarily long and complicated ๐ญ They'd much rather address an X.400 user as if she had a 'normal' RFC 822 address ๐ Take this mapping from chapter 3.3.1.1:
C=zz; ADMD=ade; PRMD=fhbo; O=tlec; S=plork; ->
/C=zz/ADMD=ade/PRMD=fhbo/O=tlec/S=plork/@gw.switch.ch
RFC 822 users would find it way more 'natural' if this address could be written in RFC 822 as:
plork@tlec.fhbo.ade.nl
- X.400 users are used to X.400 addresses with SAs only ๐ They often find DDA addresses complicated, especially when they have to encode the special characters @ % ! etc. by hand ๐ค They'd rather address an RFC 822 user as if he had a 'normal' X.400 address ๐ง Take this mapping from chapter 3.3.1.2:
bush@dole.us
->
DD.RFC-822=bush(a)dole.us;
C=nl; ADMD= ; PRMD=tlec; O=gateway
X.400 users would find it way more 'natural' if this address could be written in X.400 as:
C=us; ADMD=dole; S=bush
- Lots of organisations use both RFC 822 and X.400 internally, and they still want every user to have a simple, unique address in both mail worlds ๐ Here's the catch: in the default mapping, the mapped form of an address completely depends on which gateway did the mapping ๐ That also causes a more technical complication.
- The tricky 'third party problem' ๐งฉ You don't need to understand this to read the rest of the chapter, so if it looks too complicated, feel free to skip it until you're more comfy with the basics ๐
The third party problem is a routing problem caused by mapping. As an example for DDA mappings (the example holds just as well for left-hand-side encoding), consider the following situation (see Fig. 3.1.): RFC 822 user X in country A sends a message to two recipients: RFC 822 user Y, and X.400 user Z, both in country B:
From: X@A
To: Y@B ,
/C=B/.../S=Z/@GW.A
Since the gateway in country A maps all addresses in the message, Z will see both X's and Y's address as DDA-encoded RFC 822 addresses, with the SAs of the gateway in country A:
From: DD.RFC-822=X(a)A; C=A;....;O=GW
To: DD.RFC-822=Y(a)B; C=A;....;O=GW ,
C=B;...;S=Z
| ------------ ---------
| |X: RFC 822|<------->|gateway|
| ------------ ---------
| A | ^
\ | |
\---------------------------------------------
| |
/---------------------------------------------
/ | |
| B | v
| | -----------
| | |Z: X.400 |
| | -----------
| | .
| | .
| | .
| | .
| | .
| v v
| ------------ ---------
| |Y: RFC 822|<........|gateway|
| ------------ ---------
Fig. 3.1 The third party problem
Now if Z wants to 'group reply' to both X and Y, his reply to Y will be routed over the gateway in country A, even though Y is located in the same country:
From: C=B;...;S=Z
To: DD.RFC-822=Y(a)B; C=A;....;O=GW ,
DD.RFC-822=X(a)A; C=A;....;O=GW
The best way to travel for a message from Z to Y would of course have been over the gateway in country B:
From: C=B;...;S=Z
To: DD.RFC-822=Y(a)B; C=B;....;O=GW ,
DD.RFC-822=X(a)A; C=A;....;O=GW
The third party problem is caused by the fact that routing information is mapped into addresses.
Ideally, the third party problem shouldn't exist. After all, address mapping affects addresses, and an address is not a route.... The reality is different however. For instance, very few X.400 products are capable to route messages on the contents of a DDA (actually, only RFC 1327 gateways will be able to interpret this type of DDA, and who says that the reply will pass a local gateway on its route back?). Similar limitations hold for the other direction: an RFC 822 based mailer is not even allowed (see [5]) to make routing decisions of the content of a left-hand-side encoded X.400 address if the domain part is not its own. So in practice, addressing and (thus also mapping) will very well affect routing.
To make mapping between addresses more user friendly, and to avoid the problems shown above, RFC 1327 allows for overruling the default left-hand-side encoding and DDA mapping algorithms. This is done by specifying associations (mapping rules) between certain domainparts and X.400 domains. An X.400 domain (for our purposes; CCITT has a narrower definition...) consists of the domain-related SAs of a Mnemonic O/R address (i.e., all SAs except PN and CN). The idea is to use the similarities between both address spaces, and directly map similar address parts onto each other. If, for the domain in the address to be mapped, an explicit mapping rule can be found, the mapping is performed between:
localpart <-> PersonalName
domainpart <-> X.400 domain
The address information of the gateway is only used as an input parameter if no mapping rule can be found, i.e., if the address mapping must fall back to its default algorithm.
The complete mapping function can thus be visualised as follows:
address information of the gateway performing the mapping
|
v
+-----------------+
RFC 822 address <--->| address mapping | <---> X.400 address
+-----------------+
^
|
domain associations (mapping rules)
3.3.2.1. PersonalName and localpart mapping
Since the mapping between these address parts is independent of the mapping rules that are used, and because it follows a simple, two-way algorithmic approach, this subject is discussed in a separate sub-chapter first.
The X.400 PersonalName consists of givenName, initials, and surName. RFC 1327 assumes that generationQualifier is not used.
To map a localpart to an X.400 PN, the localpart is scanned for dots, which are considered delimiters between the components of PN, and also between single initials. In order not to put too much detail in this tutorial, only a few examples are shown here. For the detailed algorithm, see RFC 1327, chapter 4.2.1.
Marshall.Rose <-> G=Marshall;S=Rose
M.T.Rose <-> I=MT;S=Rose
Marshall.M.T.Rose <-> G=Marshall;I=MT;S=Rose
To map an X.400 PN to an RFC 822 localpart, take the non-empty PN attributes, put them into their hierarchical order (G I* S), and connect them with periods.
Some exceptions are caused by the fact that left-hand-side encoding can also be mixed with exception mapping. This is shown in more detail in the following sub-chapters.
3.3.2.2. X.400 domain and domainpart mapping
A mapping rule associates two domains: an X.400 domain and an RFC 822 domain. The X.400 domain is written in the RFC 1327 domain notation (See 3.1.3.), so that both domains have the same hierarchical order. The domains are written on one line, separated by a '#' sign. For instance:
arcom.ch#ADMD$arcom.C$ch#
PRMD$tlec.ADMD$ade.C$nl#tlec.nl#
A mapping rule must at least contain a top level domain and a country code. If an address must be mapped, a mapping rule with the longest domain match is sought. The associated domain in the mapping rule is used as the domain of the mapped address. The remaining domains are mapped one by one following the natural hierarchy. Concrete examples are shown in the following subchapters.
3.3.2.2.1. X.400 -> RFC 822 โจ
Okay so let's do an example ๐ Say this mapping rule is defined:
PRMD$tlec.ADMD$ade.C$nl#tlec.nl#
Then the address C=nl; ADMD=ade; PRMD=tlec; O=you; OU=owe; S=plork gets mapped like this ๐
S OU O PRMD ADMD Country
| | | | | |
plork owe you tlec ade nl
The Surname 'plork' becomes the localpart 'plork', see chapter 3.3.2.1 ๐ฆ Then the domain gets built up piece by piece:
localpart
| sdom3
| | sdom2
| | | sdom1
| | | | top-level-domain
| | | | |
plork@ tlec.nl
The leftover SAs (the O and one of the OUs) get mapped one at a time, following the natural hierarchy. O becomes sdom2 and OU becomes sdom3 ๐
localpart
| sdom3
| | sdom2
| | | sdom1
| | | | top-level-domain
| | | | |
plork@owe.you.tlec.nl
So the final mapped address is:
plork@owe.you.tlec.nl
The table with every one of these mapping rules is shared with all gateways worldwide, and it's normally called 'mapping table 1' โจ Depending on which software you're using, you might also see it under these names:
'or2rfc'
'mapping 1'
'map1'
'table 1'
'X2R'
Now, as already announced, there's an exceptional case where the localpart and PN don't map straight onto each other ๐ Sometimes the localpart is needed for something else. If the X.400 address has attributes that wouldn't allow the simple mapping:
localpart <-> PersonalName
domainpart <-> X.400 domain
(e.g., spaces are not allowed in an RFC 822 domain, GQ and CN cannot be directly mapped into localpart, DDAs of another type than RFC-822), those attributes, together with the PN, get left-hand-side encoded ๐ The domainpart still must be mapped according to the mapping rule as far as possible. This is easier to see with examples:
C=nl; ADMD=ade; PRMD=tlec; O=owe; OU=you; S=plork; GQ=jr
->
/S=plork/GQ=jr/@you.owe.tlec.nl
C=nl; ADMD=ade; PRMD=tlec; O=owe; OU=spc ctr; OU=u; S=plork
->
"/S=plork/OU=u/OU=spc ctr/"@owe.tlec.nl
Notice that in the second example, 'O=owe' still turns into a subdomain following the natural hierarchy ๐ธ The drama starts with the space in 'OU=spc ctr' ๐ญ
3.3.2.2.2. RFC 822 -> X.400 ๐ฆ
Let's flip it! Assume this mapping rule is defined:
tlec.nl#PRMD$tlec.ADMD$ade.C$nl#
Then the address 'plork@owe.you.tlec.nl' :
localpart
| sdom3
| | sdom2
| | | sdom1
| | | | top-level-domain
| | | | |
plork@owe.you.tlec.nl
would be mapped as follows ๐ง
The localpart 'plork' becomes 'S=plork', see chapter 3.3.2.1 ๐
The domain 'tlec.nl' gets mapped according to the rule:
S OU OU O PRMD ADMD Country
| | | |
plork tlec ade nl
The remaining domains (owe.you) get mapped one by one following the natural hierarchy. sdom2 becomes O, and sdom3 becomes OU:
S OU OU O PRMD ADMD Country
| | | | | |
plork | | tlec ade nl
owe you
So the mapped address, in a readable notation, is:
C=nl; ADMD=ade; PRMD=tlec; O=you; OU=owe; S=plork
Now here's a twist ๐ If there are any left-hand-side encoded SAs in the localpart that don't represent a complete mnemonic O/R address, the localpart gets mapped into those SAs. Like this:
"/S=plork/GQ=jr/OU=u/OU=spc ctr/"@owe.tlec.nl
->
C=nl; ADMD=ade; PRMD=tlec; O=owe; OU=space ctr;
OU=u; S=plork; GQ=jr
This is needed to reverse the special use of the localpart for left-hand-side encoding certain attributes. See 3.3.2.2.1 ๐ซถ
You might be wondering by now why these rules are needed at all ๐ค Why not just use map1 in the other direction? The thing is, a symmetric mapping function (a bijection) would honestly be ideal, but it's not feasible. Asymmetric mappings exist for a few reasons:
- To make sure that uucp addresses etc. get routed over local gateways.
- Preferring certain address forms, while still not forbidding others from using another form. Examples of such reasons are:
- Phasing out old address forms.
- If an RFC 822 address is mapped to
ADMD= ;it means the X.400 mail can be routed over any ADMD in that country. One single ADMD may of course send out an address containingADMD=ade; .It must also be possible to map such an address back.
So we really do need mapping rules from RFC 822 to X.400 too ๐ The table with all of these mapping rules, which is shared with all gateways worldwide, is normally referred to as 'mapping table 2'. Other commonly used filenames (depending on the software you're using) are:
'rfc2or'
'mapping 2'
'map2'
'table 2'
'R2X'
If the RFC 822 localpart and/or domainpart contain characters that wouldn't immediately fit in the value of a PN attribute (! % _), the mapping algorithm falls back to DDA mapping ๐ In that case, the SAs that get used are still determined by mapping the domainpart according to the mapping rule. In our case:
100%user@work.tlec.nl
->
DD.RFC-822=100(p)user(a)work.tlec.nl;
C=nl; ADMD=ade; PRMD=tlec; O=work
If no map2 rule can be found, a third table of rules gets scanned: the gateway table ๐ This table has the same syntax as mapping table 2, but its semantics are different. First of all, a domain that only has an entry in the gateway table is always mapped into an RFC 822 DDA. For a domain that is purely RFC 822 based, but whose mail may be relayed over an X.400 network, the gateway table links that domain to the SAs of the gateway the X.400 message should be routed to. That gateway is then responsible for gatewaying the message back into the RFC 822 world. For example, if we have this gateway table entry:
gov#PRMD$gateway.ADMD$Internet.C$us#
(and we assume that no overruling map2 rule for the top level domain 'gov' exists), this would force all gateways to perform the following mapping:
bush@dole.gov
->
DD.RFC-822=bush(a)dole.gov;
C=us; ADMD=Internet; PRMD=gateway
This is very similar to the default DDA mapping, except the SAs belong to a gateway that has declared itself responsible for a certain RFC 822 domain, not to the local gateway. And so this mechanism helps avoid the third party problem discussed in chapter 3.2.2 ๐ซฃ
The table with all of these gateway rules, which is shared with all gateways worldwide, is normally referred to as the 'gateway table'. Other commonly used filenames (also depending on which software you're using) are:
'rfc1148gate' {From the predecessor of RFC 1327, RFC 1148}
'gate table'
'GW'
Only when no rule at all (map2 or gateway rule) is defined for a domain does the algorithm fall back to the default DDA mapping described in 3.3.1.2 โจ
3.4. Table co-ordination ๐
As already stated, mapping tables only work smoothly if every gateway in the world uses the same tables ๐ฅฐ On the global level, the collection and distribution of RFC 1327 address mapping tables is co-ordinated by the MHS Co-ordination Service:
SWITCH Head Office
MHS Co-ordination Service
Limmatquai 138
CH-8001 Zurich, Europe
Tel. +41 1 268 1550
Fax. +41 1 268 1568
RFC 822: project-team@switch.ch
X.400: C=ch;ADMD=arcom;PRMD=switch;O=switch;S=project-team;
The procedures for collecting and distributing mapping rules are on the MHS Co-ordination Server, in the directory "/procedures". Appendix D explains how to access this server ๐
If you want to define mapping rules for your own local domain, you can find the right contact person in your country or network (the gateway manager) on that same server, in the directory "/mhs-services" ๐
3.5. Local additions ๐ธ
Some networks want to define rules that should only be used inside their own networks, so those rules should not be distributed worldwide ๐ Picture two networks that both want to reach the old top-level-domain 'arpa' through their local gateway. They'd both like to use a mapping 2 rule for this:
TLec in NL: arpa#PRMD$gateway.ADMD$tlec.C$nl#
SWITCH in CH: arpa#PRMD$gateway.ADMD$switch.C$ch#
(You may have noticed that they should really have defined these rules in the gateway table, but for the sake of the example, we assume they defined them in mapping table 2. This was the way things were done in the days of RFC 987, and many networks are still doing it this way these days ๐)
A mapping table can't contain two mapping rules with the same domain on the left hand side, so these 'local mappings' are not distributed globally ๐ฌ There's a RARE draft proposal [13] that defines a mechanism for allowing and automatically dealing with conflicting mapping rules, but that mechanism has not been implemented as to date. After receiving the global mapping tables from the MHS Co-ordination Service, many networks add 'local' rules to map2 and the gateway table before installing them on their gateways. Here's the thing though: the reverse mapping 2 rules for such local mappings are globally unique, so they can be distributed worldwide. This is even necessary, because addresses that were mapped with a local mapping rule may leak out to other networks (here comes the third party problem again...). Those other networks should at least be given the chance to map the addresses back ๐ฅบ So in this case, the global mapping table 1 would contain the two rules:
PRMD$gateway.ADMD$tlec.C$nl#arpa#
PRMD$gateway.ADMD$switch.C$ch#arpa#
Note that if such rules had been defined as local gateway table entries instead of map2 entries, there would have been no need to distribute the reverse mappings worldwide. The reverse mapping of a DDA encoded RFC 822 address is simply done by stripping the SAs, see 3.3.1.1. ๐
3.6. Product specific formats โจ
okay so not all software uses the RFC 1327 format of the mapping tables internally ๐ซ , which means you'll run into other flavours out there. the good news, bestie, is that almost all of these formats let you write comments on any line that starts with a # sign ๐ . here's how the three main ones look side by side ๐
# This is pure RFC 1327 format
# table 1: X.400 -> RFC 822
#
PRMD$tlec.ADMD$ade.C$nl#tlec.nl#
# etc.
# table 2: RFC 822 -> X.400
#
arcom.ch#ADMD$arcom.C$ch#
# etc.
EAN
# This is EAN format
# It uses the readable format for X.400 domains and TABs
# to make a 'readable mapping table format'.
# table 1: X.400 -> RFC 822
#
P=tlec; A=ade; C=nl; # tlec.nl
# etc.
# table 2: RFC 822 -> X.400
#
arcom.ch # A=arcom; C=ch;
# etc.
PP
# This is PP format
# table 1: X.400 -> RFC 822
#
PRMD$tlec.ADMD$ade.C$nl:tlec.nl
# etc.
# table 2: RFC 822 -> X.400
#
arcom.ch:ADMD$arcom.C$ch
# etc.
most R&D networks have tools that can automatically generate these formats from the original RFC 1327 tables ๐ ๏ธ, and some even distribute the tables inside their network in several formats at once ๐. if you need mapping tables in one specific format, reach out to your national or R&D network's gateway manager. see chapter 3.4 โจ
3.7. Guidelines for mapping rule definition
okay real talk ๐ญ defining mapping rules without knowing what you're doing can be disastrous, not just for your network but for everybody else's too ๐จ you should be rather safe if you follow at least these rules ๐ซถ
- First of all, read this tutorial ๐
- Avoid local mappings; prefer gate table entries. (See chapter 3.5) ๐
- Make sure any domain you map to can also be mapped back ๐
- Aim for symmetry ๐ฆ
- Don't define a gateway table entry if the same domain already has a map2 entry. Such a rule would be redundant ๐
- Map to
ADMD=0;if you will not be connected to any ADMD for the time being โณ - Only map to
ADMD= ;if you are indeed reachable through any ADMD in your country ๐ - Mind the difference between
PRMD=;andPRMD=@;and make sure which one you need. (Try to avoid empty or unused attributes in the O/R address hierarchy from the beginning!) ๐ง - Don't define mappings for domains over which you have no naming authority ๐ซ
- Before defining a mapping rule, make sure you have the permission from the naming authority of the domain you want to map to. Normally, this should be the same organisation as the mapping authority of the domain in the left hand side of the mapping rule. This principle is called 'administrative equivalence' ๐ค
- Avoid redundant mappings. E.g., if all domains under 'tlec.nl' are in your control, don't define:
first.tlec.nl#O$first.PRMD$tlec.ADMD$ade.C$nl#
last.tlec.nl#O$last.PRMD$tlec.ADMD$ade.C$nl#
always.tlec.nl#O$always.PRMD$tlec.ADMD$ade.C$nl#
but rather have only one mapping rule:
tlec.nl#PRMD$tlec.ADMD$ade.C$nl#
- Before introducing a new mapped version of a domain, make sure the world can route to that mapped domain ๐บ๏ธ
E.g., If you are operating a PRMD: C=zz; ADMD=ade; PRMD=ergo; and you want to define the mapping rules:
map1: PRMD$ergo.ADMD$ade.C$zz#ergo.zz#
map2: ergo.zz#PRMD$ergo.ADMD$ade.C$zz#
Make sure that ergo.zz (or at least all of its subdomains) is DNS routeable (register an MX or A record) and will be routed to a gateway that agreed to route the messages from the Internet to you over X.400 ๐ฌ
In the other direction, if you are operating the Internet domain cs.woodstock.edu, and you want to define a mapping for that domain:
map2: cs.woodstock.edu#O$cs.PRMD$woodstock.ADMD$ .C$us#
map1: O$cs.PRMD$woodstock.ADMD$ .C$us#cs.woodstock.edu#
Make sure that C=us; ADMD= ; PRMD=woodstock; O=cs; (or at least all of its subdomains) is routeable in the X.400 world, and will be routed to a gateway that agreed to route the messages from X.400 to your RFC 822 domain over SMTP. Within the GO-MHS community, this would be done by registering a line in a so-called domain document, which will state to which mail relay this domain should be routed ๐
Co-ordinate any such actions with your national or MHS' gateway manager. See chapter 3.4 ๐ซถ
4. Conclusion โจ
mail gatewaying remains a complicated subject ๐ซ but if you finish this tutorial and feel like you get the basics, go try solving some real-life problems. this is indeed a very rewarding area to work in: even after working with it for many years, you can make amazing discoveries every other week........ ๐๐
Appendix A. References
[1] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821, USC/Information Sciences Institute, August 1982.
[2] Crocker, D., "Standard for the Format of ARPA Internet Text Messages", STD 11, RFC 822, University of Delaware, August 1982.
[3] Mockapetris, P., "Domain Names - Concepts and Facilities", and "Domain Names - Implementation and Specification", STD 13, RFCs 1034 and 1035, USC/Information Sciences Institute, November 1987.
[4] Kille, S., "Mapping Between X.400 and RFC 822", RFC 987, UK Academic Community Report (MG.19), UCL, June 1986.
[5] Braden, R., Editor, "Requirements for Internet Hosts -- Application and Support", STD 3, RFC 1123, USC/Information Sciences Institute, October 1989.
[6] Postel, J., Editor, "Internet Official Protocol Standards", STD 1, RFC 1500, USC/Information Sciences Institute, August 1993.
[7] Chapin, L., Chair, "The Internet Standards Process", RFC 1310, Internet Activities Board, March 1992.
[8] Kille, S., "Mapping between X.400(1988) / ISO 10021 and RFC 822", RFC 1327 / RARE RTR 2, University College London, May 1992.
[9] Kille, S., "X.400 1988 to 1984 downgrading", RFC 1328 / RARE RTR 3, University College London, May 1992.
[10] Plattner, B., and H. Lubich, "Electronic Mail Systems and Protocols Overview and Case Study", Proceedings of the IFIP WG 6.5 International working conference on message handling systems and distributed applications; Costa Mesa 1988; North-Holland, 1989.
[11] Houttuin, J., "@route:100%name@address, a practical guide to MHS configuration", Top-Level EC, 1993, (not yet published).
[12] Alvestrand, H., "Frequently asked questions on X.400", regularly posted on USEnet in newsgroup comp.protocols.iso.x400.
[13] Houttuin, J., Hansen, K., and S. Aumont, "RFC 1327 Address Mapping Authorities", RARE WG-MSG Working Draft, Work in Progress, May 1993.
[14] "COSINE MHS Pocket User Guide", COSINE MHS Project Team 1992. Also available in several languages from the MHS Co-ordination Server:/user-guides. See Appendix D.
[15] Grimm, R., and S. Haug, "A Minimum Profile for RFC 987", GMD, November 1987; RARE MHS Project Team; July 1990. Also available from the MHS Co-ordination Server:/procedures/min-rfc987-profile. See Appendix D.
[16] CCITT Recommendations X.400 - X.430. Data Communication Networks: Message Handling Systems. CCITT Red Book, Vol. VIII - Fasc. VIII.7, Malaga-Torremolinos 1984.
[17] CCITT Recommendations X.400 - X.420. Data Communication Networks: Message Handling Systems. CCITT Blue Book, Vol. VIII - Fasc. VIII.7, Melbourne 1988.
Appendix B. Index
<<Only available in the Postscript version>> ๐
Appendix C. Abbreviations ๐ค
ADMD Administration Management Domain
ARPA Advanced Research Projects Agency
ASCII American Standard Code for Information Exchange
ASN.1 Abstract Syntax Notation One
BCD Binary-Coded Decimal
BITNET Because It's Time NETwork
CCITT Comite Consultatif International de Telegraphique et
Telephonique
COSINE Co-operation for OSI networking in Europe
DFN Deutsches Forschungsnetz
DL Distribution List
DNS Domain Name System
DoD Department of Defense
EBCDIC Extended BCD Interchange Code
IAB Internet Architecture Board
IEC International Electrotechnical Commission
IESG Internet Engineering Steering Group
IETF Internet Engineering Task Force
IP Internet Protocol
IPM Inter-Personal Message
IPMS Inter-Personal Messaging Service
IPN Inter-Personal Notification
ISO International Organisation for Standardisation
ISOC Internet Society
ISODE ISO Development Environment
JNT Joint Network Team (UK)
JTC Joint Technical Committee (ISO/IEC)
MHS Message Handling System
MOTIS Message-Oriented Text Interchange Systems
MTA Message Transfer Agent
MTL Message Transfer Layer
MTS Message Transfer System
MX Mail eXchanger
OSI Open Systems Interconnection
OU(s) Organizational Unit(s)
PP Mail gatewaying software (not an abbreviation)
PRMD Private Management Domain
RARE Reseaux Associes pour la Recherche Europeenne
RFC Request for comments
RTC RARE Technical Committee
RTR RARE Technical Report
SMTP simple mail transfer protocol
STD Internet Standard
TCP Transmission Control Protocol
UUCP Unix to Unix CoPy
Appendix D. How to access the MHS Co-ordination Server ๐ง
here's an at-a-glance sheet on all the ways you can get into the MHS Co-ordination server ๐
E-mail
address:
RFC822: mhs-server@nic.switch.ch
X.400: S=mhs-server; OU1=nic; O=switch; P=switch; A=arcom;
C=CH
body
help # you receive this document
index ['directory'] # you receive a directory listing
send 'directory''filename' # you receive the specified file
FTP
address: Internet: nic.switch.ch
account: cosine
password: 'your email address'
Interactive
address: Internet: nic.switch.ch
address: PSPDN: +22847971014540
address: EMPB/IXI: 20432840100540
account: info
directory: e-mail/COSINE-MHS/
FTAM
address: Internet: nic.switch.ch
address: PSPDN : +22847971014540
address: EMPB/IXI: 20432840100540
address: ISO CLNS: NSAP=39756f11112222223333aa0004000ae100,
TSEL=0103Hex
account: ANON
gopher
address: Internet: nic.switch.ch
Security Considerations ๐
Security issues are not discussed in this memo. ๐ฌ plot twist, there's no security chapter here at all, so keep your guard up ๐ก๏ธ
Author's Address ๐
Jeroen Houttuin
RARE Secretariat
Singel 466-468
NL-1017 AW Amsterdam
Europe
Tel. +31 20 6391131
Fax. +31 20 6393289
RFC 822: houttuin@rare.nl
X.400: C=nl;ADMD=400net;PRMD=surf;O=rare;S=houttuin
๐ฆ where this page comes from
- ietf: rfc1506 1993-08
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms