5. 详细映射
本章给出第 1 章和第 2 章中概述的函数的详细映射. 它大量使用了第 3 章和第 4 章中定义的记法和映射.
5.1. RFC 822 -> X.400
5.1.1. 基本方法
生成单个 IP Message. RFC 822 报头用于生成 IPMS.Heading. IP Message 将包含一个 IA5 IPMS.BodyPart, 其中包含 RFC 822 消息正文.
某些 RFC 822 字段无法映射到标准 IPM Heading 字段上, 因此第 5.1.2 节中定义了一个扩展字段. 该字段随后用于无法映射到现有服务上的字段.
消息被提交给 MTS, 所需的服务可以通过指定 MTS.MessageSubmissionEnvelope 来定义. MTA 抽象服务的一些参数也被指定, 这些参数原则上对 MTS User 不可用. 使用这些服务使得 RFC 822 MTA 层参数可以承载在类似的 X.400 服务元素中. 这种映射的优点远远超过了分层违规.
5.1.2. X.400 扩展字段
定义了一个 IPMS Extension:
rfc-822-field HEADING-EXTENSION
VALUE RFC822Field
::= id-rfc-822-field
RFC822Field ::= IA5String
对象标识符 id-rfc-822-field 在附录 D 中定义.
要使用此扩展对任何 RFC 822 Header 进行编码, RFC822Field 应当设置为省略末尾 CRLF 的 822.field (例如, "Fruit-Of-The-Day: Kiwi Fruit"). 结构化字段应当被展开. 在 ":" 之前不应当有空格. 反向映射以直接的方式构建 RFC 822 字段.
5.1.3. 生成 IPM
IPM (IPMS Service Request) 根据本节的规则生成. IPMS.IPM.body 通常由一个类型为 IPMS.IA5TextbodyPart 的 IPMS.BodyPart 组成, 其 IPMS.IA5TextBodyPart.parameters.repertoire 设置为默认值 (ia5), 其中包含 RFC 822 消息的正文. 例外情况是 RFC 822 报头中存在 "Comments:" 字段.
如果没有使用特定的 1988 特性, 则生成的 IPM 应当编码为内容类型 2. 否则, 应当编码为内容类型 22. 后者在生成扩展报头字段时总是如此.
生成 IPM 时, 必须考虑上界的问题. 在 MTS 和 MTA 层, 本规范严格强制执行上界. 在 IPM 层有三种选项可用. 使用其中任何选项都符合本标准.
-
忽略上界, 以自然方式生成消息. 这假定如果进行了任何截断, 都将在接收方 UA 处发生. 这将最大化信息传输, 但可能破坏某些接收方 UA.
-
拒绝任何可能导致生成违反约束的消息的入站消息. 这将是健壮的, 但可能阻止有用的通信.
-
将字段截断到 X.400 中指定的上界. 这将防止强制实施上界的 UA 出现问题, 但有时会丢弃有用信息.
这些选择具有不同的优点和缺点, 选择将取决于网关的具体应用.
本节其余部分涉及 IPMS.IPM.heading (IPMS.Heading). IPMS.Heading 唯一必需的组成部分是 IPMS.Heading.this-IPM (IPMS.IPMIdentifier). 应当由网关生成一个默认值. 除 "Received:" 之外, 多个字段的值应当合并 (例如, 如果有两个 "To:" 字段, 则应当使用两者的邮箱). 信息应当根据标准 RFC 822 Headers 生成如下:
-
Date: 忽略 (在 MTS 层处理)
-
Received: 忽略 (在 MTA 层处理)
-
Message-Id: 映射到 IPMS.Heading.this-IPM. 对于此字段以及所有其他包含 822.msg-id 的字段, 对每个 822.msg-id 使用第 4 章的映射.
-
From: 如果存在 Sender:, 则将其映射到 IPMS.Heading.authorizing-users. 如果不存在, 则映射到 IPMS.Heading.originator. 对于此字段以及其他包含地址的组成部分, 对每个地址使用第 4 章的映射.
-
Sender: 映射到 IPMS.Heading.originator.
-
Reply-To: 映射到 IPMS.Heading.reply-recipients.
-
To: 映射到 IPMS.Heading.primary-recipients
-
Cc: 映射到 IPMS.Heading.copy-recipients.
-
Bcc: 映射到 IPMS.Heading.blind-copy-recipients.
-
In-Reply-To: 如果有一个值, 则将其映射到 IPMS.Heading.replied-to-IPM, 视情况使用 822.phrase 或 822.msg-id 映射. 如果有多个值, 则将它们以及来自 "References:" 字段的任何值一起映射到 IPMS.Heading.related-IPMs.
-
References: 映射到 IPMS.Heading.related-IPMs.
-
Keywords: 映射到报头扩展.
-
Subject: 映射到 IPMS.Heading.subject. field-body 使用第 3 章中引用的从 ASCII 到 T.61 的面向人的映射.
-
Comments: 生成一个类型为 IPMS.IA5TextbodyPart 的 IPMS.BodyPart, 其 IPMS.IA5TextBodyPart.parameters.repertoire 设置为默认值 (ia5), 其中包含这些字段的值, 前面加上字符串 "Comments: ". 此正文部分应当位于另一个正文部分之前.
-
Encrypted: 映射到报头扩展.
-
Resent-*: 映射到报头扩展.
注意, 可以为这些字段使用 ForwardedIPMessage, 但其语义 (可以说) 略有不同, 而且可能不值得付出这样的努力.
- Other Fields: 特别是 X-* 字段, 以及常见使用中的 "非法" 字段 (例如, "Fruit-of-the-day:"), 除非被本规范的其他节或附录涵盖, 否则映射到报头扩展. 对内容不符合 RFC 822 的 RFC 822 字段 (例如, 具有无法解析语法的 Date: 字段) 也应当应用相同的处理.
5.1.4. 到 MTS 抽象服务的映射
MTS.MessageSubmissionEnvelope 包含 MTS.PerMessageSubmissionFields, 以及 MTS.PerRecipientMessageSubmissionFields. 必需参数应当默认设置如下.
-
MTS.PerMessageSubmissionFields.originator-name: 此参数总是从 822-MTS 生成, 如第 4 章所定义.
-
MTS.PerMessageSubmissionFields.content-type: 设置为由 IPM 的编码 (2 或 22) 所隐含的值.
-
MTS.PerRecipientMessageSubmissionFields.recipient-name: 这些将总是从 822-MTS 提供, 如第 4 章所定义.
可选组成部分应当省略, 默认组成部分应当默认设置, 但有两个例外. 对于 MTS.PerMessageSubmissionFields.per-message-indicators, 应当进行以下设置:
-
应当允许 Alternate recipient, 因为最大化 (可靠) 投递的机会似乎是可取的.
-
Content return request 应当根据第 5.2 节中讨论的问题进行设置.
MTS.PerMessageSubmissionFields.original-encoded-information-types 应当设置为包含一个元素 BuiltInEncodedInformationTypes.ia5-text 的集合.
MTS.PerMessageSubmissionFields.content-correlator 应当编码为 IA5String, 并包含 Subject:, Message-ID:, Date: 和 To: 字段 (如果存在). 这应当包含字符串 "Subject:", "Date:", "To:", "Message-ID:" 以及适当的折叠. 这应当截断为 MTS.ub-content-correlator-length (512) 个字符. 此外, 如果存在 "Subject:" 字段, 则 MTS.PerMessageSubmissionFields.content-identifier 应当设置为其内容的一种可打印字符串表示, 截断为 MTS.ub-content-id-length (16). 两者都被使用, 因为 content correlator 的上界要大得多, 而且 content id 在 X.400(1984) 中可用.
5.1.5. 到 MTA 抽象服务的映射
需要直接映射到 MTA 抽象服务的某些方面, 原因如下:
-
以便 MTS Message Identifier 可以从 RFC 822 Message-ID: 生成.
-
以便提交日期可以从 822.Date 生成.
-
防止跟踪信息丢失.
-
防止由分发列表或重定向引起的 RFC 822/X.400 循环.
定义了以下映射.
-
Message-Id: 如果存在, 则应当使用第 4 章中描述的映射从中生成 MTA.PerMessageTransferFields.message-identifier.
-
Date: 用于设置 MTA.PerMessageTransferFields.trace-information (MTA.TraceInformationElement) 的第一个组成部分. 822-MTS 发起者应当映射为 MTS.ORAddress, 并用于导出 MTA.TraceInformationElement.global-domain-identifier. 省略 MTA.TraceInformationElement.domain-supplied-information 的可选组成部分, 必需组成部分设置如下:
-
MTA.DomainSuppliedInformation.arrival-time: 设置为从 Date: 导出的日期
-
MTA.DomainSuppliedInformation.routing-action: 设置为 relayed.
MTA.PerMessageTransferFields.internal-trace-information 的第一个元素应当以类似方式生成, 尽管之后可能会被丢弃 (参见 "Received:" 的规程).
- Received: 所有 RFC 822 跟踪信息用于导出 MTA.PerMessageTransferFields.trace-information 和 MTA.PerMessageTransferFields.internal-trace-information. Received: 行的处理应当遵循 Date: 的处理, 并应当从 RFC 822 报头的底部到顶部 (即按时间顺序) 进行. 如果处理其他跟踪元素 (Via:, X400-Received:), 则应当注意保持正确的相对顺序. MTA.PerMessageTransferFields.trace-information 的初始元素将已经生成 (来自 Date:).
考虑所讨论的 Received: 字段. 如果 received 的 "by" 部分存在, 则使用它导出 MTS.GlobalDomainIdentifier. 如果这与 MTA.PerMessageTransferFields.trace-information 的最后一个元素中的那个 (MTA.TraceInformationElement.global-domain-identifier) 不同, 则创建一个新的 MTA.TraceInformationElement, 并可选地删除 MTA.PerMessageTransferFields.internal-trace-information. 在消息被传输到另一个 MD 且该 MD 没有保留超出本地 MD 的内部跟踪的双边协议的情况下, 应当进行此删除. 跟踪的创建与下面描述的内部跟踪相同, 只是不需要 MTA 字段.
然后向 MTA.PerMessageTransferFields.internal-trace-information 添加一个新元素 (MTA.InternalTraceInformationElement), 如果需要则创建它. 即使创建了 MD 间跟踪, 也应当进行此操作. MTA.InternalTraceInformationElement.global-domain-identifier 应当设置为所导出的值. MTA.InternalTraceInformationElement.mta-supplied-information (MTA.MTASuppliedInformation) 应当设置如下:
-
MTA.MTASuppliedInformation.arrival-time: 从 Received: 行的日期导出
-
MTA.MTASuppliedInformation.routing-action: 设置为 relayed
MTA.InternalTraceInformationElement.mta-name 应当取自 "Received:" 字段的 "by" 组成部分, 截断为 MTS.ub-mta-name-length (32). 例如:
Received: from computer-science.nottingham.ac.uk by
vs6.Cs.Ucl.AC.UK via Janet with NIFTP id aa03794;
28 Mar 89 16:38 GMT
生成字符串:
vs6.Cs.Ucl.AC.UK
注意, 在将消息传输到某些 ADMD 之前, 可能需要额外的跟踪剥离, 因为通过多个 MD 的隐含路径将违反 ADMD 策略.
必须映射两个扩展字段, 以防止循环. "DL-Expansion-History:" 映射到 MTA.PerMessageTransferFields.extensions.dl-expansion-history. "Redirection-History:" 映射到 MTA.PerRecipientMessageTransferFields.extensions.redirection-history.
5.1.6. 映射新字段
本规范在第 5.3 节中为 Reports, Notifications 和 IP Messages 定义了许多新字段. 由于本规范仅旨在保留现有服务, 符合本规范的网关不需要将这些字段映射到 X.400, 但上一节中描述的 "DL-Expansion-History" 和 "Redirection-History" 除外. 然而, 这样做通常是可取且有益的, 特别是为了促进对遍历多个网关的消息的支持. 这些映射可以是到 MTA, MTS 或 IPMS 服务的.
5.2. 内容返回
目前尚不清楚 X.400 内容返回服务会被多广泛地支持. X.400(1984) 的经验表明, 对该服务的支持可能并非普遍的. 由于在 RFC 822 世界中预期会有此服务, 因此指定了两种方法. 选择将取决于由网关提供服务的 X.400 社区内 X.400 内容返回的使用情况.
在内容返回被广泛支持的环境中, 内容返回可以作为一项服务来请求. 然后内容返回服务可以以直接的方式传递回最终 (RFC 822) 用户.
在内容返回不被广泛支持的环境中, 网关必须做出特殊安排来处理内容返回. 对于每一条从 RFC 822 -> X.400 传递的消息, 将不请求内容返回, 而总是请求报告. 当投递报告返回时, 网关可以注意到消息已投递给相关收件人. 如果收到未投递报告, 则可以向 822-MTS 发起者发送有意义的报告 (包含原始消息的部分或全部). 如果没有为某个收件人收到报告, 则应当向 822-MTS 发起者发送 (超时) 失败通知. 网关可以根据需要重传 X.400 消息. 采用此方法时, 必须设置路由, 使错误报告通过同一 MTA 返回. 此方法在与某些路由策略结合使用时可能难以使用.
5.3. X.400 -> RFC 822
5.3.1. 基本方法
从传入的 IP Message, Report 或 IP Notification 生成单个 RFC 822 消息. 所有 IPMS.BodyParts 都映射到单个 RFC 822 正文上. 其他服务映射到 RFC 822 报头字段上. 在没有合适的现有字段的情况下, 为 IPMS, MTS 和 MTA 服务定义新字段.
网关机制将对应于 MTS Delivery. 与提交一样, 也存在使用 MTA (传输) 服务的方面. 特别是, 有一项优化允许有多个 822-MTS 收件人.
5.3.2. RFC 822 设置
RFC 822 服务要求 RFC 822 Header 中有多个必需字段. 某些 822-MTS 服务强制要求指定 822-MTS Originator. 即使在这是可选的情况下, 通常也希望指定一个值. 定义了以下默认值, 如果指定的映射未导出值, 则应当使用这些默认值:
-
822-MTS Originator: 如果这不是由映射生成的 (例如, 对于 Delivery Report), 则应当分配一个指向网关管理员的值.
-
Date: 总是会生成一个值
-
From: 如果这不是由映射生成的, 则应当将其分配为等于 822-MTS Originator. 如果这是由网关生成的, 则应当添加一个适当的 822.phrase.
-
At least one recipient field: 如果没有生成收件人字段, 则应当添加一个字段 "To: list:;".
这将确保最低限度的 RFC 822 合规性. 生成 RFC 822 报头时, 应当以适当的方式使用折叠.
5.3.3. 基本映射
5.3.3.1. 已编码信息类型
此从 MTS.EncodedInformationTypes 的映射在多个不相关的地方需要. EBNF 定义如下:
encoded-info = 1#encoded-type
encoded-type = built-in-eit / object-identifier
built-in-eit = "Undefined" ; undefined (0)
/ "Telex" ; tLX (1)
/ "IA5-Text" ; iA5Text (2)
/ "G3-Fax" ; g3Fax (3)
/ "TIF0" ; tIF0 (4)
/ "Teletex" ; tTX (5)
/ "Videotex" ; videotex (6)
/ "Voice" ; voice (7)
/ "SFD" ; sFD (8)
/ "TIF1" ; tIF1 (9)
MTS.EncodedInformationTypes 映射到 EBNF.encoded-info. MTS.EncodedInformationTypes.non-basic-parameters 被忽略. 内置类型映射到固定字符串 (与 X.400(1984) 和 RFC 987 兼容), 其他类型映射到 EBNF.object-identifier.
5.3.3.2. 全局域标识符
以下简单 EBNF 用于表示 MTS.GlobalDomainIdentifier:
global-id = std-or-address
这使用 std-or-address 语法对 Global Domain Identifier 内的属性进行编码.
5.3.4. 从 IP Message 的映射
考虑必须将一个 IPM 映射到 RFC 822. IPMS.IPM 包含一个 IPMS.IPM.heading 和 IPMS.IPM.body. 首先考虑 heading. 定义了一些用于新字段的 EBNF:
ipms-field = "Obsoletes" ":" 1#msg-id
/ "Expiry-Date" ":" date-time
/ "Reply-By" ":" date-time
/ "Importance" ":" importance
/ "Sensitivity" ":" sensitivity
/ "Autoforwarded" ":" boolean
/ "Incomplete-Copy" ":"
/ "Language" ":" language
/ "Message-Type" ":" message-type
/ "Discarded-X400-IPMS-Extensions" ":" 1#oid
importance = "low" / "normal" / "high"
sensitivity = "Personal" / "Private" /
"Company-Confidential"
language = 2*ALPHA [ language-description ]
language-description = printable-string
message-type = "Delivery Report"
/ "InterPersonal Notification"
/ "Multiple Part"
现在为 IPMS.Heading 的每个元素指定映射和操作. 地址和 Message Identifiers 根据第 4 章映射. 其他映射予以解释, 或者是直接的 (算法性的).
-
IPMS.Heading.this-IPM: 映射到 "Message-ID:".
-
IPMS.Heading.originator: 如果存在 IPMS.Heading.authorizing-users, 则将其映射到 Sender:, 否则映射到 "From:".
-
IPMS.Heading.authorizing-users: 映射到 "From:".
-
IPMS.Heading.primary-recipients: 映射到 "To:".
-
IPMS.Heading.copy-recipients: 映射到 "Cc:".
-
IPMS.Heading.blind-copy-recipients: 映射到 "Bcc:".
-
IPMS.Heading.replied-to-ipm: 映射到 "In-Reply-To:".
-
IPMS.Heading.obsoleted-IPMs: 映射到扩展 RFC 822 字段 "Obsoletes:"
-
IPMS.Heading.related-IPMs: 映射到 "References:".
-
IPMS.Heading.subject: 映射到 "Subject:". 内容转换为 ASCII (如第 3 章所定义). 任何 CRLF 都不被映射, 而是用作 subject 字段必须折叠的位置.
-
IPMS.Heading.expiry-time: 映射到扩展 RFC 822 字段 "Expiry-Date:".
-
IPMS.Heading.reply-time: 映射到扩展 RFC 822 字段 "Reply-By:".
-
IPMS.Heading.reply-recipients: 映射到 "Reply-To:".
-
IPMS.Heading.importance: 映射到扩展 RFC 822 字段 "Importance:".
-
IPMS.Heading.sensitivity: 映射到扩展 RFC 822 字段 "Sensitivity:".
-
IPMS.Heading.autoforwarded: 映射到扩展 RFC 822 字段 "Autoforwarded:".
标准扩展 (X.420 / ISO 10021-7 的附件 H) 映射如下:
-
incomplete-copy: 映射到扩展 RFC 822 字段 "Incomplete-Copy:".
-
language: 映射到扩展 RFC 822 字段 "Language:", 填入两字母代码. 如果可能, language-description 应当用该语言的人类可读描述填入.
如果发现 RFC 822 扩展报头, 则应当将其映射到 RFC 822 报头, 如第 5.1.2 节所述.
如果发现非标准扩展, 则应当将其丢弃, 除非网关理解该扩展并且可以执行到 RFC 822 报头字段的适当映射. 如果扩展被丢弃, 则应当在扩展 RFC 822 字段 "Discarded-X400-IPMS-Extensions:" 中指示该列表.
IPMS.Body 被映射到 RFC 822 消息正文中. 每个 IPMS.BodyPart 转换为 ASCII 如下:
-
IPMS.IA5Text: 映射是直接的 (参见第 3 章).
-
IPMS.MessageBodyPart: 应当递归地应用 X.400 -> RFC 822 映射, 以生成 RFC 822 Message. 如果存在, IPMS.MessageBodyPart.parameters.delivery-envelope 应当用于 MTS Abstract Service Mappings. 如果存在, IPMS.MessageBodyPart.parameters.delivery-time 应当映射到扩展 RFC 822 字段 "Delivery-Date:".
-
Other: 如果其他正文部分可以通过使用 X.408 [CCITT88a] 中定义的映射, 或通过其他合理的映射, 映射到 IA5, 则应当这样做, 除非内容转换被禁止.
如果部分或全部正文部分无法转换, 则有三种选项. 所有这些都符合本标准. 对于没有任何正文部分可以转换的情况, 可以做出不同的选择:
-
第一个选项是拒绝该消息, 并发送未投递通知. 如果转换被禁止, 则必须始终这样做.
-
第二个选项是将缺失的正文部分映射为大致如下形式的内容:
*********************************
There was a foobar here
The widget gateway ate it
*********************************
这将允许传递一些有用信息. 由于收件人是人 (IPMS), 则应当有可用的适当操作.
- 最后, 两者都可以做. 在这种情况下, (肯定) Delivery Report 中的补充信息应当明确说明某个东西被发送给了收件人, 但伴随大量信息丢失.
在存在多个 IPMS.BodyPart 的情况下, 应当使用 Rose 和 Stefferud 在 [Rose85a] 中定义的映射, 将各个分离的 IPMS.BodyParts 映射到单个 RFC 822 消息正文中. 如果这样做, 则应当添加一个值为 "Multiple part" 的 "Message-Type:" 字段, 这将向接收网关指示该消息可以按照 RFC 934 展开.
为了与 RFC 987 向后兼容, 还应当遵循以下规程. 如果存在两个 IA5 正文部分, 并且第一个正文部分的第一行以字符串 "RFC-822-Headers:" 开头, 则应当将此正文部分的其余部分追加到 RFC 822 报头中.
5.3.5. 从 IP Notification 的映射
生成一条消息, 具有以下字段:
-
From: 设置为 MTS.MessageDeliveryEnvelope.other-fields.originator-name.
-
To: 设置为 IPMS.IPN.ipm-originator.
-
Subject: 设置为形如 "X.400 Inter-Personal Receipt Notification" 的内容.
-
Message-Type: 设置为 "InterPersonal Notification"
-
References: 设置为 IPMS.IPN.subject-ipm
为消息正文定义了以下 EBNF. 定义此格式是为了确保来自人际通知的所有信息都以统一的方式提供给最终用户.
ipn-body-format = ipn-description <CRLF>
[ ipn-extra-information <CRLF> ]
ipn-content-return
ipn-description = ipn-receipt / ipn-non-receipt
ipn-receipt = "Your message to:" preferred-recipient <CRLF>
"was received at" receipt-time <CRLF> <CRLF>
"This notification was generated"
acknowledgement-mode <CRLF>
"The following extra information was given:" <CRLF>
ipn-suppl <CRLF>
ipn-non-receipt "Your message to:"
preferred-recipient <CRLF>
ipn-reason
ipn-reason = ipn-discarded / ipn-auto-forwarded
ipn-discarded = "was discarded for the following reason:"
discard-reason <CRLF>
ipn-auto-forwarded = "was automatically forwarded." <CRLF>
[ "The following comment was made:"
auto-comment ]
ipn-extra-information =
"The following information types were converted:"
encoded-info
ipn-content-return = "The Original Message is not available"
/ "The Original Message follows:"
<CRLF> <CRLF> message
preferred-recipient = mailbox
receipt-time = date-time
auto-comment = printablestring
ipn-suppl = printablestring
non-receipt-reason = "Discarded" / "Auto-Forwarded"
discard-reason = "Expired" / "Obsoleted" /
"User Subscription Terminated"
acknowledgement-mode = "Manually" / "Automatically"
IPMS.IPN 的公共字段 (IPMS.CommonFields) 的元素到此结构以及消息报头的映射为:
-
subject-ipm: 映射到 "References:"
-
ipm-originator: 映射到 "To:".
-
ipm-preferred-recipient: 映射到 EBNF.preferred-recipient
-
conversion-eits: 映射到 EBNF.ipn-extra-information 中的 EBNF.encoded-info
IPMS.IPN.non-receipt-fields (IPMS.NonReceiptFields) 的元素的映射为:
-
non-receipt-reason: 用于在 EBNF.ipn-discarded 和 EBNF.ipn-auto-forwarded 之间进行选择
-
discard-reason: 映射到 EBNF.discard-reason
-
auto-forward-comment: 映射到 EBNF.auto-comment
-
returned-ipm: 如果存在, 则应当选择 EBNF.ipn-content-return 的第二个选项, 并包含该消息的 RFC 822 映射. 否则应当选择第一个选项.
IPMS.IPN.receipt-fields (IPMS.ReceiptFields) 的元素的映射为:
-
receipt-time: 映射到 EBNF.receipt-time
-
acknowledgement-mode: 映射到 EBNF.acknowledgement-mode
-
suppl-receipt-info: 映射到 EBNF.ipn-suppl
一个示例通知为:
From: Steve Kille <[email protected]>
To: Julian Onions <[email protected]>
Subject: X400 Inter-personal Receipt Notification
Message-Type: InterPersonal Notification
References: <[email protected]>
Date: Wed, 21 Jun 89 08:45:25 +0100
Your message to: Steve Kille <[email protected]>
was automatically forwarded.
The following comment was made:
Sent on to a random destination
The following information types were converted: g3fax
The Original Message is not available
5.3.6. 从 MTS 抽象服务的映射
本节描述 User Messages (IPM 和 IPN) 的 MTS 映射. 此映射通过指定 MTS.MessageDeliveryEnvelope 的映射来定义. 为支持此映射, 定义了以下对 RFC 822 的扩展:
mts-field = "X400-MTS-Identifier" ":" mts-msg-id
/ "X400-Originator" ":" mailbox
/ "X400-Recipients" ":" 1#mailbox
/ "Original-Encoded-Information-Types" ":"
encoded-info
/ "X400-Content-Type" ":" mts-content-type
/ "Content-Identifier" ":" printablestring
/ "Priority" ":" priority
/ "Originator-Return-Address" ":" 1#mailbox
/ "DL-Expansion-History" ":" mailbox ";" date-time ";"
/ "Redirection-History" ":" redirection
/ "Conversion" ":" prohibition
/ "Conversion-With-Loss" ":" prohibition
/ "Requested-Delivery-Method" ":"
1*( labelled-integer )
/ "Delivery-Date" ":" date-time
/ "Discarded-X400-MTS-Extensions" ":"
1#( oid / labelled-integer )
prohibition = "Prohibited" / "Allowed"
mts-msg-id = "[" global-id ";" *text "]"
mts-content-type = "P2" / labelled-integer
/ object-identifer
priority = "normal" / "non-urgent" / "urgent"
redirection = mailbox ";" "reason" "="
redirection-reason
";" date-time
redirection-reason =
"Recipient Assigned Alternate Recipient"
/ "Originator Requested Alternate Recipient"
/ "Recipient MD Assigned Alternate Recipient"
现在可以考虑 MTS.MessageDeliveryEnvelope 每个元素的映射.
-
MTS.MessageDeliveryEnvelope.message-delivery-identifier: 映射到扩展 RFC 822 字段 "X400-MTS-Identifier:".
-
MTS.MessageDeliveryEnvelope.message-delivery-time: 丢弃, 因为该时间将表示在适当的跟踪元素中.
MTS.MessageDeliveryEnvelope.other-fields (MTS.OtherMessageDeliveryFields) 各元素的映射如下:
-
content-type: 映射到扩展 RFC 822 字段 "X400-Content-Type:". 字符串 "P2" 是为了与 RFC 987 向后兼容. 如果内容类型为 22, 则应当使用 labelled-integer 编码.
-
originator-name: 映射到 822-MTS 发起方, 并映射到扩展 RFC 822 字段 "X400-Originator:". 这在第 4.6.2 节中描述.
-
original-encoded-information-types: 映射到扩展 RFC 822 字段 "Original-Encoded-Information-Types:".
-
priority: 映射到扩展 RFC 822 字段 "Priority:".
-
delivery-flags: 如果设置了 conversion-prohibited 位, 则添加扩展 RFC 822 字段 "Conversion:".
-
this-recipient-name and other-recipient-names: 这两个字段一起使用, 以生成扩展 RFC 822 字段 "X400-Recipients:". 注意, 只有在允许披露收件人时, 后者才会出现.
-
originally-intended-recipient-name: 映射到与相关收件人关联的注释, 如第 4.6.2.2 节所述.
-
converted-encoded-information-types: 丢弃, 因为它始终仅为 IA5.
-
message-submission-time: 映射到 Date:.
-
content-identifier: 映射到扩展 RFC 822 字段 "Content-Identifier:".
如果存在任何扩展 (MTS.MessageDeliveryEnvelope.other-fields.extensions), 并且它们被标记为对传输或投递至关重要, 则应当拒绝该消息. 这些扩展 (MTS.MessageDeliveryEnvelope.other-fields.extensions) 的映射如下.
-
conversion-with-loss-prohibited: 如果设置为 MTS.ConversionWithLossProhibited.conversion-with-loss-prohibited, 则添加扩展 RFC 822 字段 "Conversion-With-Loss:".
-
requested-delivery-method: 映射到扩展 RFC 822 字段 "Requested-Delivery-Method:".
-
originator-return-address: 映射到扩展 RFC 822 字段 "Originator-Return-Address:".
physical-forwarding-address-request
physical-delivery-modes
registered-mail-type
recipient-number-for-advice
physical-rendition-attributes
physical-delivery-report-request
physical-forwarding-prohibited
这些元素仅适用于物理投递. 它们表示为 "X400-Recipients:" 字段中的注释, 如第 4.6.2.2 节所述.
originator-certificate
message-token
content-confidentiality-algorithm-identifier
content-integrity-check
message-origin-authentication-check
message-security-label
proof-of-delivery-request
这些元素意味着使用 RFC 822 环境中不可用的安全服务. 如果它们被标记为对传输或投递至关重要, 则应当拒绝该消息. 否则应当丢弃它们.
-
redirection-history: 每个元素映射到一个扩展 RFC 822 字段 "Redirection-History:". 它们应当在消息报头中排序, 使最近的重定向排在最前面 (与跟踪相同的顺序).
-
dl-expansion-history: 每个元素映射到一个扩展 RFC 822 字段 "DL-Expansion-History:". 它们应当在消息报头中排序, 使最近的扩展排在最前面 (与跟踪相同的顺序).
如果存在任何 X.400 中未指定的 MTS (或 MTA) Extensions, 并且它们被标记为对传输或投递至关重要, 则应当拒绝该消息. 如果它们未被如此标记, 则可以安全地丢弃它们. 被丢弃字段的列表应当在扩展报头 "Discarded-X400-MTS-Extensions:" 中指示.
5.3.7. 从 MTA 抽象服务的映射
在 MTA 抽象服务层有一些为 IPM 和 IPN 所做的映射. 这些可以从 MTA.MessageTransferEnvelope 导出. 在此层进行映射以及违反分层的原因有:
-
允许多个收件人共享单个 RFC 822 消息.
-
使 X.400 跟踪信息在 RFC 822 侧可用.
-
使有关延迟投递的任何信息可用.
822-MTS 收件人应当根据 X.400 收件人的完整列表计算. 这就是通过网关传递的 MTA.MessageTransferEnvelope.per-recipient-fields 中设置了 responsibility 位的所有成员. 在某些情况下, 会为每个收件人计算出不同的 RFC 822 消息. 如果这是由于每个收件人具有不同的服务请求, 则应当生成不同的消息. 如果仅仅是由于请求不披露收件人, 则应当省略 "X400-Recipients:" 字段, 并且只发送一条消息.
为扩展 RFC 822 报头定义了以下 EBNF:
mta-field = "X400-Received" ":" x400-trace
/ "Deferred-Delivery" ":" date-time
/ "Latest-Delivery-Time" ":" date-time
x400-trace = "by" md-and-mta ";"
[ "deferred until" date-time ";" ]
[ "converted" "(" encoded-info ")" ";" ]
[ "attempted" md-and-mta ";" ]
action-list
";" arrival-time
md-and-mta = [ "mta" mta "in" ] global-id
mta = word
arrival-time = date-time
action-list = 1#action
action = "Redirected"
/ "Expanded"
/ "Relayed"
/ "Rerouted"
如果存在 MTA.PerMessageTransferFields.deferred-delivery-time, 则使用它生成 Deferred-Delivery: 字段. 由于某种原因, X.400 在投递时不在 MTS 层提供此信息. X.400 规范, 特别是 X.400(1984) 的 CEN/CENELEC 规范 [Systems85a], 规定此元素必须在第一个 MTA 处受到支持. 如果未被支持, 该功能可以可选地由网关实现: 也就是说, 网关应当将消息保持到协议元素中指定的时间. 因此, 预期此元素的值往往会是在过去的时间. 出于这个原因, 扩展 RFC 822 字段主要用于提供信息.
合并 MTA.PerMessageTransferFields.trace-information 和 MTA.PerMessageTransferFields.internal-trace-information, 以生成单个有序的跟踪列表. 如果来自其他管理域的 Internal trace 尚未被剥离, 则这可能需要复杂的交错. 使用它生成一系列 "X400-Received:" 字段. 外部跟踪和内部跟踪之间的唯一区别将是内部跟踪元素中的额外 MTA 信息.
生成 RFC 822 消息时, 所有跟踪字段 (X400-Received 和 Received) 都应当位于报头的开头, 在任何其他字段之前. 跟踪应当按时间顺序, 最近的元素位于消息的前部. 一个简单的示例跟踪 (外部) 为:
X400-Received: by /PRMD=UK.AC/ADMD=Gold 400/C=GB/ ; Relayed ;
Tue, 20 Jun 89 19:25:11 +0100
一个更复杂的示例 (内部):
X400-Received: by mta UK.AC.UCL.CS in
/PRMD=UK.AC/ADMD=Gold 400/C=GB/ ;
deferred until Tue, 20 Jun 89 14:24:22 +0100 ;
converted (undefined, g3fax) ";" attempted /ADMD=Foo/C=GB/ ;
Relayed, Expanded, Redirected ; Tue, 20 Jun 89 19:25:11 +0100
5.3.8. 从 Report Delivery 的映射
投递报告在 MTS 服务层映射. 这意味着只有目的地为 MTS 用户的报告才会被映射. 一些附加服务也取自 MTA 服务.
5.3.8.1. MTS 映射
Delivery Report 服务将表示为 MTS.ReportDeliveryEnvelope, 它包含 per-report-fields (MTS.PerReportDeliveryFields) 和 per-recipient-fields.
应当生成具有以下字段的消息:
-
From: 网关系统上的管理员. 这也是 822-MTS 发起者.
-
To: MTA.ReportTransferEnvelope.report-destination-name 的映射. 这也是 822-MTS 收件人.
-
Message-Type: 设置为 "Delivery Report".
-
Subject: 形如 "X.400 Delivery Report" 的内容.
定义消息正文的格式是为了确保所有信息都以一致的方式传达给 RFC 822 用户. 这给出了关键信息的摘要, 然后是对所有参数的完整列表:
dr-body-format = dr-summary <CRLF>
dr-recipients <CRLF>
dr-extra-information <CRLF>
dr-content-return
dr-content-return = "The Original Message is not available"
/ "The Original Message follows:"
<CRLF> <CRLF> message
dr-summary = "This report relates to your message:" <CRLF>
content-correlator <CRLF> <CRLF>
"of" date-time <CRLF> <CRLF>
"It was generated by:" report-point <CRLF>
"at" date-time <CRLF> <CRLF>
"It was later converted to RFC 822 by:" mailbox <CRLF>
"at" date-time <CRLF> <CRLF>
dr-recipients = *(dr-recipient <CRLF> <CRLF>)
dr-recipient = dr-recip-success / dr-recip-failure
dr-recip-success =
"Your message was successfully delivered to:"
mailbox "at" date-time
dr-recip-failure = "Your message was not delivered to:"
mailbox <CRLF>
"for the following reason:" *word
dr-extra-information =
"-----------------------------------------------" <CRLF> <CRLF>
"The following information is derived from the Report" <CRLF>
"It may be useful for problem diagnosis:" <CRLF> <CRLF>
drc-field-list
drc-field-list = *(drc-field <CRLF>)
drc-field = "Subject-Submission-Identifier" ":"
mts-msg-id
/ "Content-Identifier" ":" printablestring
/ "Content-Type" ":" mts-content-type
/ "Original-Encoded-Information-Types" ":"
encoded-info
/ "Originator-and-DL-Expansion-History" ":"
dl-history
/ "Reporting-DL-Name" ":" mailbox
/ "Content-Correlator" ":" content-correlator
/ "Recipient-Info" ":" recipient-info
/ "Subject-Intermediate-Trace-Information" ":"
x400-trace
recipient-info = mailbox "," std-or ";"
report-type
[ "converted eits" encoded-info ";" ]
[ "originally intended recipient"
mailbox "," std-or ";" ]
[ "last trace" [ encoded-info ] date-time ";" ]
[ "supplementary info" <"> printablestring <"> ";" ]
[ "redirection history" 1#redirection ";"
[ "physical forwarding address"
printablestring ";" ]
report-type = "SUCCESS" drc-success
/ "FAILURE" drc-failure
drc-success = "delivered at" date-time ";"
[ "type of MTS user" labelled-integer ";" ]
drc-failure = "reason" labelled-integer ";"
[ "diagnostic" labelled-integer ";" ]
report-point = [ "mta" word "in" ] global-id
content-correlator = *word
dl-history = 1#( mailbox "(" date-time ")")
该格式被定义为固定定义. 唯一的例外是 EBNF.drc-fields 应当遵循 RFC 822 折叠规则.
MTS.ReportDeliveryEnvelope.per-report-fields 的元素映射到扩展 RFC 822 字段如下:
-
subject-submission-identifier: 映射到 EBNF.drc-field (Subject-Submission-Identifier)
-
content-identifier: 映射到 EBNF.drc-field (Content-Identifier)
-
content-type: 映射到 EBNF.drc-field (Content-Type)
-
original-encoded-information-types: 映射到 EBNF.drc-field (Encoded-Info)
来自 MTS.ReportDeliveryEnvelope.per-report-fields.extensions 的扩展映射如下:
-
originator-and-DL-expansion-history: 映射到 EBNF.drc-field (Originator-and-DL-Expansion-History)
-
reporting-DL-name: 映射到 EBNF.drc-field (Reporting-DL-Name)
-
content-correlator: 映射到 EBNF.content-correlator, 前提是编码为 IA5String (这应当总是如此). 这用于 EBNF.dr-summary 和 EBNF.drc-field-list. 在前者中, 可以添加 LWSP, 以改善消息的布局.
message-security-label
reporting-MTA-certificate
report-origin-authentication-check
这些安全参数不应当存在. 如果存在, 则应当丢弃它们, 而不是丢弃整个报告.
对于 MTS.ReportDeliveryEnvelope.per-recipient-fields 的每个元素, 应当生成一个 EBNF.dr-recipient 的值, 以及一个 EBNF.drc-field (Recipient-Info). 各组成部分映射如下.
-
actual-recipient-name: 用于生成 EBNF.recipient-info 中的第一个 EBNF.mailbox 和 EBNF.std-or. 同时给出 RFC 822 和 X.400 形式, 因为映射表可能存在问题. 它还生成 EBNF.dr-recip-success 或 EBNF.dr-recip-failure 中的 EBNF.mailbox.
-
report: 如果它是 MTS.Report.delivery, 则将 EBNF.dr-recipient 设置为 EBNF.dr-recip-success, 并类似地设置 EBNF.report-type, 填入 EBNF.drc-success. 如果它是失败, 则将 EBNF.dr-recipient 设置为 EBNF.dr-recip-failure, 对原因和诊断代码做出人类解释, 并包含任何补充信息. EBNF.drc-failure 应当被系统地填入.
-
converted-encoded-information-types: 设置 EBNF.drc-field ("converted eits")
-
originally-intended-recipient: 设置 EBNF.drc-field 中的第二个 ("originally intended recipient") mailbox 和 std-or.
-
supplementary-info: 设置 EBNF.drc-field ("supplementary info"), 并将此信息包含在 EBNF.dr-recip-failure 中.
-
redirection-history: 设置 EBNF.drc-field ("redirection history")
-
physical-forwarding-address: 设置 ENBF.drc-field ("physical forwarding address")
-
recipient-certificate: 丢弃
-
proof-of-delivery: 丢弃
任何未知扩展都应当被丢弃, 无论其关键性如何.
原始消息应当包含在投递端口 (delivery port) 中. 如第 5.2 节所讨论, 原始消息通常在网关处可用.
5.3.8.2. MTA 映射
单个 822-MTS 收件人由 MTA.ReportTransferEnvelope.report-destination-name 使用第 4 章的映射构建. 与用户消息不同, 此信息在 MTS 层不可用.
应当进行以下附加映射:
-
MTA.ReportTransferEnvelope.report-destination-name: 应当用于生成 To: 字段.
-
MTA.ReportTransferEnvelope.identifier: 映射到扩展 RFC 822 字段 "X400-MTS-Identifier:". 它也可以用于导出 "Message-Id:" 字段.
-
MTA.ReportTransferEnvelope.trace-information: 以及
-
MTA.ReportTransferEnvelope.internal-trace-information: 映射到扩展 RFC 822 字段 "X400-Received:", 如第 5.3.7 节所述. 第一个元素还应当用于生成 "Date:" 字段和 EBNF.failure-point.
-
MTA.PerRecipientReportTransferFields.last-trace-information: 映射到 EBNF.recipient-info (last trace)
-
MTA.PerReportTransferFields.subject-intermediate-trace-information: 映射到 EBNF.drc-field (subject-Intermediate-Trace-Information). 这些字段应当排序, 使最近的跟踪元素排在最前面.
5.3.8.3. 示例投递报告
这是一个中等复杂报告的示例.
From: The Postmaster <[email protected]>
To: [email protected]
Subject: X.400 Delivery Report
Message-Type: Delivery Report
Date: Wed, 21 Jun 89 08:45:25 +0100
X400-MTS-Identifier: /PRMD=UK.AC/ADMD=Gold 400/C=GB/;13412345235
This report relates to your message:
Date: Wed, 21 Jun 89 06:15:43 +0000
Message-ID: <[email protected]>
Subject: Now it's the fine tuning .... !
To: Piete Brooks (Postmaster) <[email protected]>
of Wed, 21 Jun 89 06:15:43 +0000
It was generated by mta PK in /PRMD=UK/ADMD=DBP/C=DE/
at Wed, 21 Jun 89 08:45:25 +0100
It was later converted to RFC 822 by: [email protected]
at Wed, 21 Jun 89 08:45:26 +0100
Your message was not delivered to: bad-user@nowhere
for the following reason: Rendition problem with punctuation
(Umlaut failure)
-----------------------------------------------
The following information is derived from the Report
It may be useful for problem diagnosis:
Subject-Submission-Identifier:
[/PRMD=UK.AC/ADMD=Gold 400/C=GB/;148996]
Content-Identifier: X.400 Delivery Report
Content-Type: P2-1988 (22)
Original-Encoded-Information-Types: ia5
Content-Correlator: Date: Wed, 21 Jun 89 06:15:43 +0000
Message-ID: <[email protected]>
Subject: Now it's the fine tuning .... !
To: Piete Brooks (Postmaster) <[email protected]>
Recipient-Info:
bad-user@nowhere, /S=bad-user/PRMD=nowhere/ADMD=DBP/C=DE/ ;
FAILURE reason Physical-Rendition-Not-Performed (3) ;
diagnostic Punctuation-Symbol-Loss (23) ;
supplementary info Umlaut failure
The Original Message follows:
Subject: Now it's the fine tuning .... !
Date: Wed, 21 Jun 89 06:15:43 +0000
From: Julian Onions <[email protected]>
To: Piete Brooks (Postmaster) <[email protected]>
Cc: bad-user@nowhere
Message-ID: <[email protected]>
A short test
5.3.9. 探测
这是 MTS 内部问题. 任何探测都应当由网关处理, 因为没有等效的 RFC 822 功能. 回复的值取决于网关能否使用探测中指定的值来处理 MTS Message. 回复应当利用 MTS.SupplementaryInformation 来指示探测是由网关处理的.