第1頁
------------------------------ ----------------------------------------------------------------------------
1. INTRODUCTION
1.1. SCOPE
This standard specifies a syntax for text messages that are
sent among computer users, within the framework of "electronic
mail". The standard supersedes the one specified in ARPANET
Request for Comments #733, "Standard for the Format of ARPA Net-
work Text Messages".
In this context, messages are viewed as having an envelope
and contents. The envelope contains whatever information is
needed to accomplish transmission and delivery. The contents
compose the object to be delivered to the recipient. This stan-
dard applies only to the format and some of the semantics of mes-
sage contents. It contains no specification of the information
in the envelope.
However, some message systems may use information from the
contents to create the envelope. It is intended that this stan-
dard facilitate the acquisition of such information by programs.
Some message systems may store messages in formats that
differ from the one specified in this standard. This specifica-
tion is intended strictly as a definition of what message content
format is to be passed BETWEEN hosts.
Note: This standard is NOT intended to dictate the internal for-
mats used by sites, the specific message system features
that they are expected to support, or any of the charac-
teristics of user interface programs that create or read
messages.
A distinction should be made between what the specification
REQUIRES and what it ALLOWS. Messages can be made complex and
rich with formally-structured components of information or can be
kept small and simple, with a minimum of such information. Also,
the standard simplifies the interpretation of differing visual
formats in messages; only the visual aspect of a message is
affected and not the interpretation of information within it.
Implementors may choose to retain such visual distinctions.
The formal definition is divided into four levels. The bot-
tom level describes the meta-notation used in this document. The
second level describes basic lexical analyzers that feed tokens
to higher-level parsers. Next is an overall specification for
messages; it permits distinguishing individual fields. Finally,
there is definition of the contents of several structured fields.
-----------------------------------------------------------------------------------------------------------
1. 介紹
1.1. 範圍
這個標準定義了一種在"電子郵件"框架下,讓計算機用戶之間交互的文
本消息的語法。本標準取代了由於ARPA網絡需求而產生的標準RFC733.
整體來看, 消息內容包含信封和信件體. 信封包含的信息用來完成傳
送和投遞. 信件體是由需要投遞給收件人的信息元素組成. 本標準只涉及信
件體,沒有定義信封相關的信息(注:熟悉SMTP協議的就清楚,協議上的
MAIL FROM:, RCPT TO:就是信封, 而DATA後的MIME是信件體, 本協議只是定
義信件體)
但是, 有些郵件系統可能會使用信件內容來創建信封(注:如exchange)。
實行本標準可以使程序更容易的通過信件體內容來獲得信封需要的信息。
一些郵件系統可能不使用標準定義的格式來儲存郵件。本標準主要規
範郵件服務器之間進行交互時的消息格式。
注意:本標準不試圖約束站點的內部消息格式,不明確指定郵件服務
器應該支持的特性,也未定義程序應該如何創建或顯示郵件內容
我們需要弄清楚什麼是"需要的",什麼是"允許的"。消息可能很複雜
,包含大量的格式定義元素(注:如word生成的文檔),也可能小而簡單,只
有消息所允許的最小集合。另外,標準簡化了幾種不同的消息顯示格式,
這些定義隻影響消息的顯示效果,不影響消息內容。實現者可以選擇
保留這些可視化特性.
正式的定義分爲四層。最底層描述了文檔中使用的元符號定義。第二
層定義了基本的詞法分析器,把詞分解出來傳遞給更上一層處理。下一層是
消息的全面定義,它允許定義不同的域。最後一層,定義了幾種由帶有一定
結構的多個域組成的內容。
------------------------------------- ----------------------------------------------------------------------------
第2頁
------------------------------------------------------------------------------------------------------------------
1.2. COMMUNICATION FRAMEWORK
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 con-
sumed. For example, field names are specified as free text,
rather than special terse codes.
A general "memo" framework is used. That is, a message con-
sists of some information in a rigid format, followed by the main
part of the message, with a format that is not specified in this
document. The syntax of several fields of the rigidly-formated
("headers") section is defined in this specification; some of
these fields must be included in all messages.
The syntax that distinguishes between header fields is
specified separately from the internal syntax for particular
fields. This separation is intended to allow simple parsers to
operate on the general structure of messages, without concern for
the detailed structure of individual header fields. Appendix B
is provided to facilitate construction of these parsers.
In addition to the fields specified in this document, it is
expected that other fields will gain common use. As necessary,
the specifications for these "extension-fields" will be published
through the same mechanism used to publish this document. Users
may also wish to extend the set of fields that they use
privately. Such "user-defined fields" are permitted.
The framework severely constrains document tone and appear-
ance and is primarily useful for most intra-organization communi-
cations and well-structured inter-organization communication.
It also can be used for some types of inter-process communica-
tion, such as simple file transfer and remote job entry. A more
robust framework might allow for multi-font, multi-color, multi-
dimension encoding of information. A less robust one, as is
present in most single-machine message systems, would more
severely constrain the ability to add fields and the decision to
include specific fields. In contrast with paper-based communica-
tion, it is interesting to note that the RECEIVER of a message
can exercise an extraordinary amount of control over the
message's appearance. The amount of actual control available to
message receivers is contingent upon the capabilities of their
individual message systems.
--------------------------------------------------------------------------------------------------------------
1.2. 通訊框架
消息由多行文本組成。對圖片、傳真、語音或者結構化文本的編碼沒有
特別限制。對數據壓縮,使傳輸和儲存更有效,也基本不用考慮,本標準更
趨向放開對字節數字的限制。例如,域名定義是使用任意的文本,而不是使用
特殊的編碼。
消息使用常規的"memo"框架。這個框架規定,消息包含一些已經定義的域,
另外還可以包含一些本標準裏沒有定義的域。有一些域的語法定義在本文檔裏
能找到,而這些定義的域中有的必須在所有的消息裏都存在。
這種語法區分郵件頭不同域的語法,有別於定義內部語法和特殊域。它
能讓簡單的解析器處理郵件的主要部分,而不是關注於特殊域的結構細節。
附錄B提供了完整的語法定義,可供解析器使用。
除了本文檔特殊定義的域以外,其他的域也可以一樣使用。如果必要,
可以另外定義擴展域的規範,它們將使用和本文檔中定義的域一樣的結構。
用戶也可能希望擴展一套它們自己的域,自己使用。用戶自定義的域也是
允許的。
框架嚴格的約束了文檔的顏色和外觀,本標準主要用於機構內部通訊,
也可以在多個組織良好的機構之間通訊(注:現在已經是在整個互聯網上通訊)。
本標準也適用於一些進程間通訊。一個複雜的框架可能允許多種字體,多種
顏色,多種編碼。一個簡單的框架,例如在大多數的獨立機器上的郵件系統,
可能會更加嚴格的限制需要添加的域,或者定義另外一些特殊的域。電子郵件
和紙郵件相反,我們很驚奇地發現,郵件的接收者可能看到很多不同的郵件
外觀,收件人看到的郵件的樣子,和具體的郵件系統有關。
------------------------------------------------------------------------------------------------------------------------