3. アドレス写像
アドレス写像は, サービス要素の値間の写像において最も複雑な部分と考えられることが多いため, 本チュートリアルではこの話題を独立した章として扱う.
RFC 822 と X.400 はそれぞれ固有のアドレス形式を持つ. RFC 822 アドレスはテキスト文字列 (たとえば "[email protected]") であるのに対し, X.400 アドレスは値を持つ属性のバイナリ符号化された集合である. そのようなバイナリアドレスは, いくつかの表記法によって利用者が読める形にすることができる. たとえば:
C=zz
ADMD=ade
PRMD=fhbo
O=a bank
S=plork
G=mary
本章の残りの部分では, アドレス指定の諸問題と 2 つのアドレス形式間の写像について, より詳しく扱う.
3.1. X.400 アドレス
前述のように, X.400 アドレスは属性の集合としてモデル化される. これらの属性には必須のものと任意のものがある. 各属性は型と値を持つ. たとえば Surname 属性は IA5text 型であり, この属性のインスタンスの値は 'Kille' などでありうる. 属性は Standard Attributes (SA) と Domain Defined Attributes (DDA) に分けられる.
X.400 は 4 種類の基本的なアドレス形式を定義しており ([17], 18.5), そのうち 'Mnemonic O/R Address' が最も広く使われている形式であり, 本チュートリアルで扱う唯一の形式でもある. これは 84 版で 'O/R
3.1.1. 標準属性
Standard Attributes (SA) は, すべての X.400 実装が「理解する」 (すなわちルーティングに使用する) ものとされる属性である. 例としては 'country name', 'given name', 'organizational unit' などが挙げられる. X.400(84) で最も一般的に使用される SA は次のとおりである:
surName (S)
givenName (G)
initials (I*) (Zero or more)
generationQualifier (GQ)
OrganizationalUnits (OU1 OU2 OU3 OU4)
OrganizationName (O)
PrivateDomainName (PRMD)
AdministrationDomainName (ADMD)
CountryName (C)
S, G, I*, および GQ の組み合わせは, しばしば PersonalName (PN) と呼ばれる.
標準によって (アドレス指定機関の) 階層は定義されていないが, 次の階層が自然であると考えられている:
PersonalName < OU4 < OU3 < OU2 < OU1 < O < P < A < C
上記の SA に加えて, X.400(88) はいくつかの追加属性を定義しており, そのうち最も重要なものは
Common Name (CN)
CN は PN の代わりに, あるいは PN と一緒に使用できる. X.400(84) における問題は, PN (S G I* GQ) が人を表すのには適していたが, 役割や配布リストのような抽象的な対象を表すのには適していなかったことである.
postmaster は明らかに人名ではなく役割であるが, X.400(84) では S=postmaster として postmaster に宛てるのが一般的である. X.400(88) では, 同じ postmaster は CN=postmaster として宛てられる.
属性 C と ADMD は必須 (すなわち存在しなければならず) であり, 空にすることはできない. PRMD, O, OU, PN, CN のうち少なくとも 1 つは存在しなければならない.
PRMD と ADMD は, アドレスに本来属すべきではないルーティング属性であると感じられることが多い. そのようなアドレス属性をルーティング目的で使用する方法の例として, ADMD の 2 つの特殊な値を考えてみよう:
- 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.
X.400 ではアドレスは Abstract Syntax Notation One (ASN.1) を用いて定義される. X.409 は ASN.1 の定義をバイナリ形式に符号化する方法を定義している. 欠落している属性の意味, したがってその ASN.1 符号化は, 空の属性の意味とは同じではないことに注意されたい. アドレス指定においては, この違いはしばしば次のように表される:
- 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.}
SA のみを含むアドレスは, しばしば Standard Attribute Address (SAA) と呼ばれる.
3.1.2. ドメイン定義属性
Domain Defined Attributes (DDA) は, Standard Attributes に加えて使用できる. DDA のインスタンスは型と値から成る. DDA は特定の文脈 (元々はある管理ドメインの文脈, すなわち DDA という名称の由来) 内でのみ意味を持つことを意図している. 企業内の文脈などがこれにあたる.
例として, ある企業が社内電話番号を記述するための DDA を定義したいとする: DDA type=phone value=9571.
やや厄介なのは, サービスゲートウェイの片側でしか利用できないサービス要素の型や値を符号化するために DDA を使用することである. このような使用法の最も重要な例は次に定義されている:
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)
SA と DDA の両方を含むアドレスは, しばしば DDA アドレスと呼ばれる.
3.1.3. X.400 アドレス表記
X.400 はアドレスのバイナリ符号化のみを規定しており, そのようなアドレスを紙面にどう記述すべきかや, コンピュータ画面のユーザーインターフェースでどのように見えるべきかは標準化していない.
ただし, X.400 アドレスの表現についての推奨事項がいくつか存在する.
- JTC は CCITT 勧告 F.401 および ISO/IEC 10021-2 に対する付属書 'Representation of O/R addresses for human usage' を提案した. この提案によれば, X.400 アドレスは次のようになる:
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 one would expect intuitively (the attribute
hierarchy is increasing from left to right, except for the O and
OUs, where it's right to left. The reasoning behind this is that
this sequence is following the example of a postal address). This
proposal has been added (as a recommendation) to the 1992 version
of the standards.
- DFN-EAN ソフトウェアで元々使用されていたものに従い, 現在のほとんどの EAN バージョンは JTC 提案と似たアドレス表現を使用しているが, いくつかの点で異なる:
- natural ordering for O and OUs
- no numbering of OUs.
- allows writing ADMD and PRMD instead of A and P
上記の例のアドレスは, EAN では次のように表せる:
G=jo; S=plork; OU=you; OU=owe; O=a bank; PRMD=fhbo; ADMD=ade; C=zz
この DFN-EAN 形式は, 今でもしばしば the 'readable format' と呼ばれる.
- RARE のメール・メッセージング作業部会 WG-MSG は, DFN-EAN 形式ときわめて似た推奨事項を作成したが, 階層は逆転している. さらに A と P の代わりに ADMD と PRMD が使用される. その結果, 上記のアドレスは次のように表される:
C=zz; ADMD=ade; PRMD=fhbo; O=a bank; OU=owe; OU=you; S=plork; G=jo
この形式は EAN ソフトウェアのほとんどのバージョンで認識される. 研究開発コミュニティでは, 名刺やレターヘッドなどに用いられる最も一般的なアドレス表現の 1 つである. また, 本チュートリアルの例でもこの形式を使用する.
(なお, ここで DDA を記述するために使用している構文は次のとおりである:
DD.'type'='value', 例: DD.phone=9571)
- RFC 1327 はスラッシュ区切りのアドレス表現を定義している:
/G=jo/S=plork/OU=you/OU=owe/O=a bank/P=fhbo/A=ade/C=zz/
この形式は PP ソフトウェアで使用されるだけでなく, 研究開発コミュニティでは名刺やレターヘッドにも広く用いられている.
- 最後に, RFC 1327 は X.400 の ドメイン に対して別の形式を定義している (人間の利用者向けではない):
OU$you.OU$owe.O$a bank.P$fhbo.A$ade.C$zz
この形式の主な利点は, 他の形式よりも機械による構文解析に適していることであるが, これは同時に主な欠点も意味する. つまり人間にはほとんど読むことができない. 階層内のすべての属性を列挙する必要があるため, 欠落している属性は '@' 記号で表さなければならない (例: $a [email protected]$ade.C$zz).
- Paul-Andre Pays (INRIA) は, JTC 形式の可読性と RFC 1327 ドメイン形式の構文解析性を組み合わせた形式を提案した. GO-
MHS コミュニティ内のいくつかの運用ツールはすでにこの提案 (またはその変種) に基づいているが, その将来はまだ不確実である.
3.2. RFC 822 アドレス
RFC 822 アドレスは次の形式の ASCII 文字列である:
localpart@domainpart
"domainpart" は次のように細分される
domainpart = sdom(n).sdom(n-1)....sdom(2).sdom(1).dom
"sdom" は "subdomain" (サブドメイン), "dom" は "top-level-domain" (最上位ドメイン) を表す.
"localpart" は通常ログイン名であり, したがって典型的には姓またはその略である. ローカルな配布リストを指すこともある.
RFC 822 アドレスにおける (アドレス指定機関の) 階層は次のとおりである:
localpart < sdom(n) < sdom(n-1) <...< dom
現実的な仮の例をいくつか示す:
上記の例では, 'nl', 'dk', 'edu' は有効に登録された最上位ドメインである. 独自のアドレス指定方式を持つネットワークでさえ, 「RFC 822 風」のアドレス指定によって到達可能なものがあることに注意されたい. 次のアドレスを考えてみよう:
oops!user (a UUCP address)
V13ENZACC@CZKETH5A (a BITNET address)
これらのアドレスは RFC 822 形式で表せる:
ドメイン '.uucp' と '.bitnet' には登録済みのインターネットルーティングがないことに注意されたい. そのようなアドレスは常にゲートウェイへルーティングされなければならない (その方法は本チュートリアルの範囲外である).
そのようなアドレスを X.400 へ写像することについては, X.400 と UUCP および BITNET の間には直接の写像が
定義されていないため, 通常はまず RFC 822 形式へ写像し, 必要であればその後で X.400 へ写像される.
3.3. RFC 1327 アドレス写像
アドレス形式の違いにもかかわらず, RFC 822 と X.400 が定義するアドレス空間はきわめて似ている. 最も重要な類似点は次のとおりである:
- both address spaces are hierarchical
- top level domains and country codes are often the same
- localparts and surnames are often the same
この類似性はもちろんアドレス写像アルゴリズムにおいて活用できる. RFC 1327 でもそうされている (なお, 例外写像アルゴリズムのみである. 第 3.3.2 章を参照).
実際の写像アルゴリズムは, 以下に示すものよりはるかに複雑であることに注意されたい. 詳細は RFC 1327 の第 4 章を参照されたい.
3.3.1. デフォルト写像
RFC 1327 のデフォルトのアドレス写像は, 入力パラメータと出力パラメータを持つ関数として視覚化できる:
address information of the gateway performing the mapping
|
v
+-----------------+
RFC 822 address <--->| address mapping | <---> X.400 address
+-----------------+
すなわち, アドレスを X.400 から RFC 822 へ, あるいはその逆へ写像するために必要な追加入力は, ローカルゲートウェイのアドレス情報だけである.
3.3.1.1. X.400 -> RFC 822
X.400 から RFC 822 へのデフォルトのアドレス写像には 2 種類ある. 1 つは実際の X.400 アドレスを RFC 822 へ写像するものであり, もう 1 つは X.400 へ写像された RFC 822 アドレスを復号する (すなわち, デフォルトの RFC 822 -> X.400 写像を元に戻す) ものである.
実際の X.400 アドレスを RFC 822 へ写像するには, X.400 アドレスのスラッシュ区切り表記 (第 3.1 章を参照) が 'localpart' へ写像され, 写像を行うゲートウェイのローカルな RFC 822 ドメインがドメイン部として使用される. 例として, ゲートウェイ 'gw.switch.ch' は次の写像を行う:
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
X.400 アドレスに空白が含まれる場合, 2 番目の例の引用符は必須である. そうでなければ RFC 822 の localpart の構文規則に違反することになる.
このデフォルトの写像アルゴリズムは一般に 'left-hand-side encoding' と呼ばれる.
デフォルトの RFC 822 -> X.400 写像を元に戻すには (第 3.3.1.2 章を参照): X.400 アドレスが RFC-822 型の DDA を含む場合, SA は破棄してよく, その DDA の値が目的の RFC 822 アドレスとなる (なお, DDA 値内の一部の文字はまず復号しなければならない. 第 3.3.1.2 章を参照). 例として, ゲートウェイ
DD.RFC-822=bush(a)dole.us; C=nl; ADMD=tlec; PRMD=GW
->
[email protected]
3.3.1.2. RFC 822 -> X.400
RFC 822 から X.400 へのデフォルトのアドレス写像にも 2 種類ある. 1 つは実際の RFC 822 アドレスを X.400 へ写像するものであり, もう 1 つは RFC 822 へ写像された X.400 アドレスを復号する (すなわち, デフォルトの X.400 -> RFC 822 写像を元に戻す) ものである.
実際の RFC 822 アドレスを X.400 へ写像するには, RFC 822 アドレスが RFC-822 型の DDA に符号化され, 写像を行うローカルゲートウェイの SA が追加されて完全な X.400 アドレスが形成される.
この写像は一般に 'DDA 写像' と呼ばれる. 例として, ゲートウェイ 'C=nl; ADMD=tlec; PRMD=GW' は次の写像を行う:
[email protected] ->
DD.RFC-822=bush(a)dole.us; C=nl; ADMD=tlec; PRMD=GW
DDA における RFC 822 アドレスの符号化・復号に関して, RFC 822 アドレスには DDA で直接表現できない文字 (@ ! % など) が含まれうることに注意したい. DDA は制限された文字セット型 'PrintableString' であり, これは IA5 (=ASCII) の部分集合である. この集合に含まれない文字には特別な符号化が必要である. いくつかの例を挙げる (詳細は RFC 1327 の第 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
RFC 822 へ写像された X.400 アドレスを復号するには: RFC 822 アドレスの localpart に完全な X.400 の mnemonic O/R アドレスのスラッシュ区切り表現が含まれていれば, そのアドレスが写像の結果である. 例として, ゲートウェイ 'gw.switch.ch' は次の写像を行う:
/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. 写像テーブルによる例外写像
第 3.3.1 章では, 理論上は RFC 1327 をデフォルト写像のみで使用できることが示された. これはアドレスを写像するきわめて単純で分かりやすい方法であるが, RFC 1327 をこのように使用しない強い理由がいくつかある:
- RFC 822 users are used to writing simple addresses of the
form 'localpart@domainpart'. They often consider X.400
addresses, and thus also the left-hand-side encoded
equivalents, as unnecessarily long and complicated. They
would rather be able to address an X.400 user as if she had a
'normal' RFC 822 address. For example, take the mapping
C=zz; ADMD=ade; PRMD=fhbo; O=tlec; S=plork; ->
/C=zz/ADMD=ade/PRMD=fhbo/O=tlec/S=plork/@gw.switch.ch
from chapter 3.3.1.1. RFC 822 users would find it much more
'natural' if this address could be expressed in RFC 822 as:
- X.400 users are used to using X.400 addresses with SAs only.
They often consider DDA addresses as complicated, especially
if they have to encode the special characters, @ % ! etc,
manually. They would rather be able to address an RFC 822
user as if he had a 'normal' X.400 address. For example, take
the mapping
[email protected]
->
DD.RFC-822=bush(a)dole.us;
C=nl; ADMD= ; PRMD=tlec; O=gateway
from chapter 3.3.1.2. X.400 users would find it much more
'natural' if this address could be expressed in X.400 as:
C=us; ADMD=dole; S=bush
- Many organisations are using both RFC 822 and X.400
internally, and still want all their users to have a simple,
unique address in both mail worlds. Note that in the default
mapping, the mapped form of an address completely depends on
which gateway performed the mapping. This also results in a
complication of a more technical nature:
- The tricky 'third party problem'. This problem need not
necessarily be understood to read the rest of this chapter.
If it looks too complicated, please feel free to skip it
until you are more familiar 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.
アドレス間の写像をより使いやすくし, 上記の問題を回避するために, RFC 1327 ではデフォルトの left-hand-side 符号化および DDA 写像アルゴリズムを上書きすることが認められている. これは, 特定の domainpart と X.400 ドメインとの間の関連付け (写像規則) を指定することによって行われる. X.400 ドメイン (ここでの目的のため. CCITT はより狭い定義を持つ...) は, Mnemonic O/R アドレスのドメイン関連 SA (すなわち PN と CN を除くすべての SA) から成る. 考え方は, 2 つのアドレス空間の類似性を利用し, 類似したアドレス部分どうしを直接写像することである. 写像対象のアドレスのドメインに対して明示的な写像規則が見つかった場合, 写像は次の間で行われる:
localpart <-> PersonalName
domainpart <-> X.400 domain
ゲートウェイのアドレス情報は, 写像規則が見つからない場合, すなわちアドレス写像がデフォルトアルゴリズムに戻らなければならない場合にのみ入力パラメータとして使用される.
したがって, 完全な写像関数は次のように視覚化できる:
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 と localpart の写像
これらのアドレス部分間の写像は使用される写像規則に依存せず, 単純な双方向のアルゴリズムに従うため, この話題をまず独立した小節で扱う.
X.400 の PersonalName は givenName, initials, surName から成る. RFC 1327 は generationQualifier が使用されないものと仮定している.
localpart を X.400 の PN へ写像するには, localpart をドットを区切りとして走査する. ドットは PN の構成要素間, および各イニシャルの間の区切りとみなされる. 本チュートリアルに詳細を盛り込みすぎないため, ここではいくつかの例のみを示す. 詳細なアルゴリズムは RFC 1327 の第 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
X.400 の PN を RFC 822 の localpart へ写像するには, 空でない PN 属性を取り出し, それらを階層順 (G I* S) に並べ, ピリオドで連結する.
例外の一部は, left-hand-side 符号化を例外写像と混在させることができるという事実に起因する. これについては以降の小節でより詳しく示す.
3.3.2.2. X.400 ドメインと domainpart の写像
写像規則は 2 つのドメイン, すなわち X.400 ドメインと RFC 822 ドメインを関連付ける. X.400 ドメインは RFC 1327 のドメイン表記で記述される (3.1.3 を参照) ため, 両方のドメインは同じ階層順を持つ.
ドメインは 1 行に記述され, '#' 記号で区切られる. 例:
arcom.ch#ADMD$arcom.C$ch#
PRMD$tlec.ADMD$ade.C$nl#tlec.nl#
写像規則には少なくとも最上位ドメインと国コードが含まれていなければならない. アドレスを写像する際には, 最も長く一致するドメインを持つ写像規則が探索される. 写像規則内の関連付けられたドメインが, 写像後のアドレスのドメインとして使用される. 残りのドメインは自然な階層に従って 1 つずつ写像される. 具体的な例は以降の小節で示す.
3.3.2.2.1. X.400 -> RFC 822
例として, 次の写像規則が定義されているとする:
PRMD$tlec.ADMD$ade.C$nl#tlec.nl#
すると, アドレス C=nl; ADMD=ade; PRMD=tlec; O=you; OU=owe; S=plork
S OU O PRMD ADMD Country
| | | | | |
plork owe you tlec ade nl
は次のように写像される. Surname 'plork' は localpart 'plork' へ写像される (第 3.3.2.1 章を参照). ドメイン
localpart
| sdom3
| | sdom2
| | | sdom1
| | | | top-level-domain
| | | | |
plork@ tlec.nl
残りの SA (O と 1 つの OU) は自然な階層に従って 1 つずつ写像される. O は sdom2 へ, OU は sdom3 へ写像される:
localpart
| sdom3
| | sdom2
| | | sdom1
| | | | top-level-domain
| | | | |
[email protected]
したがって, 写像後のアドレスは次のとおりである:
このような写像規則の一覧を含むテーブルは, 世界中のすべてのゲートウェイに配布され, 通常 'mapping table 1' と呼ばれる. 他の一般的なファイル名 (使用するソフトウェアにもよる) は次のとおりである:
'or2rfc'
'mapping 1'
'map1'
'table 1'
'X2R'
前述したように, localpart と PN が直接互いに写像されない例外の場合がある. それは localpart を他の目的に使う必要がある場合である. X.400 アドレスが単純な写像を許さない属性を含む場合:
localpart <-> PersonalName
domainpart <-> X.400 domain
(たとえば, RFC 822 ドメインには空白が使用できない, GQ と CN は localpart へ直接写像できない, RFC-822 以外の型の DDA がある), そのような属性は PN とともに left-hand-side 符号化される. domainpart は可能な限り写像規則に従って写像されなければならない. 例が必要だろう:
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
2 番目の例では, 'O=owe' が依然として自然な階層に従ってサブドメインへ写像されていることに注意されたい. 問題は 'OU=spc ctr' の空白から始まっている.
3.3.2.2.2. RFC 822 -> X.400
例として, 次の写像規則が定義されているとする:
tlec.nl#PRMD$tlec.ADMD$ade.C$nl#
すると, アドレス '[email protected]' は
localpart
| sdom3
| | sdom2
| | | sdom1
| | | | top-level-domain
| | | | |
[email protected]
次のように写像される.
localpart 'plork' は 'S=plork' へ写像される (第 3.3.2.1 章を参照).
ドメイン 'tlec.nl' は写像規則に従って写像される:
S OU OU O PRMD ADMD Country
| | | |
plork tlec ade nl
残りのドメイン (owe.you) は自然な
階層に従って 1 つずつ写像される. sdom2 は O へ, sdom3 は OU へ写像される:
S OU OU O PRMD ADMD Country
| | | | | |
plork | | tlec ade nl
owe you
したがって, 写像後のアドレスは (可読な表記では) 次のとおりである:
C=nl; ADMD=ade; PRMD=tlec; O=you; OU=owe; S=plork
localpart に完全な mnemonic O/R アドレスを表さない left-hand-side 符号化された SA が含まれていた場合, localpart はそれらの SA へ写像される. 例:
"/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
これは, 特定の属性を left-hand-side 符号化するという localpart の特殊な使用法を元に戻すために必要である. 3.3.2.2.1 を参照.
ここまで読んで, なぜそのような規則が必要なのか疑問に思うかもしれない. なぜ逆方向に map1 をそのまま使わないのか? 問題は, 対称的な写像関数 (全単射) が理想的ではあるが実現可能ではないことにある. 非対称な写像が存在する理由はいくつかある:
- To make sure that uucp addresses etc. get routed over local
gateways.
- Preferring certain address forms, while still not forbidding
others to use another form. Examples of such reasons are:
- Phasing out old address forms.
- If an RFC 822 address is mapped to ADMD= ; it means that
the X.400 mail can be routed over any ADMD in that
country. One single ADMD may of course send out an
address containing: ADMD=ade; . It must also be possible
to map such an address back.
したがって, RFC 822 から X.400 への写像規則もやはり必要である. このような写像規則の一覧を含むテーブルは, 世界中のすべてのゲートウェイに配布され, 通常は (使用するソフトウェアにもよるが) 次のように呼ばれる:
'rfc2or'
'mapping 2'
'map2'
'table 2'
'R2X'
RFC 822 の localpart や domainpart に PN 属性の値にそのまま収まらない文字 (! % _) が含まれる場合, 写像アルゴリズムは DDA 写像に戻る. この場合でも使用される SA は domainpart を写像規則に従って写像することによって決定される. ここでの例は次のとおりである:
100%[email protected]
->
DD.RFC-822=100(p)user(a)work.tlec.nl;
C=nl; ADMD=ade; PRMD=tlec; O=work
map2 規則が見つからない場合, 3 番目のルールテーブル, すなわちゲートウェイテーブルが走査される. このテーブルは写像テーブル 2 と同じ構文を持つが, 意味は異なる. まず, ゲートウェイテーブルにのみエントリを持つドメインは常に RFC 822 の DDA へ写像される. 純粋に RFC 822 に基づくがメールが X.400 ネットワークを経由して中継されうるドメインに対しては, ゲートウェイテーブルはそのドメインに, X.400 メッセージをルーティングすべきゲートウェイの SA を関連付ける. そのゲートウェイは, メッセージを RFC 822 の世界へ戻すゲートウェイ化を担う. 例として, ゲートウェイテーブルのエントリが次のようであったとする:
gov#PRMD$gateway.ADMD$Internet.C$us#
(そして最上位ドメイン 'gov' に対する優先される map2 規則は存在しないと仮定する), これはすべてのゲートウェイに次の写像を強制する:
[email protected]
->
DD.RFC-822=bush(a)dole.gov;
C=us; ADMD=Internet; PRMD=gateway
これはデフォルトの DDA 写像ときわめて似ているが, 使用される SA がローカルゲートウェイのものではなく, ある RFC 822 ドメインに対して責任を持つと宣言したゲートウェイのものである点が異なる. したがって, この機構は第 3.2.2 章で論じた第三者問題の回避に役立つ.
このようなゲートウェイ規則の一覧を含むテーブルは, 世界中のすべてのゲートウェイに配布され, 通常 'gateway table' と呼ばれる. 他の一般的なファイル名 (使用する
ソフトウェアにもよる) は次のとおりである:
'rfc1148gate' {From the predecessor of RFC 1327, RFC 1148}
'gate table'
'GW'
あるドメインに対してまったく規則 (map2 またはゲートウェイ規則) が定義されていない場合にのみ, アルゴリズムは 3.3.1.2 で述べたデフォルトの DDA 写像に戻る.
3.4. テーブルの調整
既に述べたように, 写像テーブルの使用は, 世界中のすべてのゲートウェイが同じテーブルを使用する場合にのみ円滑に機能する. 全球的なレベルでは, RFC 1327 アドレス写像テーブルの収集と配布は MHS 調整サービスによって調整されている:
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: [email protected]
X.400: C=ch;ADMD=arcom;PRMD=switch;O=switch;S=project-team;
写像規則の収集と配布の手順は, MHS 調整サーバの "/procedures" ディレクトリ内にある. 付録 D にこのサーバへのアクセス方法が記述されている.
自身のローカルドメインに対して写像規則を定義したい場合, 同じサーバの "/mhs-services" ディレクトリから, 自国または自ネットワークの適切な連絡先 (ゲートウェイ管理者) を見つけることができる.
3.5. ローカルな追加
ネットワーク内でのみ使用されるべき規則を定義したいネットワークもあるため, そのような規則は世界的には配布されない. 古い最上位ドメイン 'arpa' にローカルゲートウェイ経由で到達したい 2 つのネットワークを考えてみよう. 両者はこの目的のために mapping 2 規則を使用したいであろう:
TLec in NL: arpa#PRMD$gateway.ADMD$tlec.C$nl#
SWITCH in CH: arpa#PRMD$gateway.ADMD$switch.C$ch#
(本来はゲートウェイテーブルにこのような規則を定義すべきだったと気づいたかもしれないが, 例のために写像テーブル 2 に定義したと仮定する. これは RFC 987 の時代のやり方であり, 多くのネットワークでは現在もこの方法がとられている.)
写像テーブルには左側に同じドメインを持つ 2 つの写像規則を含めることができないため, このような「ローカル写像」は全球的には配布されない. 競合する写像規則を許可し自動的に扱うための仕組みを定義した RARE のドラフト提案 [13] が存在するが, この仕組みは現時点では実装されていない. MHS 調整サービスから全球的な写像テーブルを受け取った後, 多くのネットワークはそれらをゲートウェイにインストールする前に map2 とゲートウェイテーブルに「ローカル」規則を追加する. このようなローカル写像に対する逆方向の mapping 2 規則は 世界的に一意 であり, したがって世界的に配布できることに注意されたい. これは必要でもある. というのは, ローカルな写像規則で写像されたアドレスが他のネットワークへ漏れ出す可能性があるからである (ここでまた第三者問題が現れる...). そのような他ネットワークには, 少なくともアドレスを元に戻す手段が与えられるべきである. したがってこの場合, 全球的な写像テーブル 1 は次の 2 つの規則を含むことになる:
PRMD$gateway.ADMD$tlec.C$nl#arpa#
PRMD$gateway.ADMD$switch.C$ch#arpa#
なお, もしこれらの規則が map2 エントリではなくローカルなゲートテーブルエントリとして定義されていたなら, 逆方向の写像を世界的に配布する必要はなかったであろう (DDA 符号化された RFC 822 アドレスの逆写像は, SA を取り除くだけで行える. 3.3.1.1 を参照).
3.6. 製品固有の形式
すべてのソフトウェアが写像テーブルの RFC 1327 形式を内部的に使用しているわけではない. ほぼすべての形式で, '#' 記号で始まる行にコメントを記述できる. 異なる形式の例をいくつか示す:
RFC 1327
# 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.
大半の研究開発ネットワークには, 元の RFC 1327 テーブルからこれらの形式を自動生成するツールがある. なかにはネットワーク内で複数の形式のテーブルを配布しているところもある. 特定の形式の写像テーブルが必要な場合は, 自国または研究開発ネットワークのゲートウェイ管理者に連絡されたい. 第 3.4 章を参照.
3.7. 写像規則定義のガイドライン
自分が何をしているのかを理解せずに写像規則を定義することは, 自ネットワークだけでなく他にも深刻な被害をもたらしうることに注意されたい. 少なくとも次の規則に従えば, まず安全であろう:
- 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=;" and "PRMD=@;" 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.