Network Working Group J. Klensin, Editor Request for Comments: 2821 AT&T Laboratories Obsoletes: 821, 974 April 2001 Updates: 1123 Category: Standards Track Simple Mail Transfer Protocol Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. この文書はインターネット共同体に対し、インターネット標準化過程のプロト コルを規定し、発展のための議論と提言を求めている。このプロトコルの標準 化過程の現状については、"Internet OfficialProtocol Standards" (STD 1) の現在の版を参照してほしい。この文書の配布に制限はない。 Copyright Notice Copyright (C) The Internet Society (2001). All Rights Reserved. Abstract This document is a self-contained specification of the basic protocol for the Internet electronic mail transport. It consolidates, updates and clarifies, but doesn't add new or change existing functionality of the following: 要約 この文書では、インターネットでの電子メールの配送のための、基本となるプ ロトコルの詳細を内包している。それは強化し、アップデートし、また明らか にしているが、以下に存在する機能に新しく追加したり、変更したりはしてい ない。 - the original SMTP (Simple Mail Transfer Protocol) specification of RFC 821 [30], RFC 821によるオリジナルのSMTPの詳細 - domain name system requirements and implications for mail transport from RFC 1035 [22] and RFC 974 [RFC974], RFC1035とRFC 974における、メール配送のための、ドメインネームシステムに 対する要求とかかわりあい - the clarifications and applicability statements in RFC 1123 [2], and RFC 1123の明確化と応用に関する記述 - material drawn from the SMTP Extension mechanisms [19]. SMTPの拡張機能からの具体的記述 It obsoletes RFC 821, RFC 974, and updates RFC 1123 (replaces the mail transport materials of RFC 1123). However, RFC 821 specifies some features that were not in significant use in the Internet by the mid-1990s and (in appendices) some additional transport models. Those sections are omitted here in the interest of clarity and brevity; readers needing them should refer to RFC 821. RFC 821と RFC 974 を無効にし、RFC 1123をアップデートする(RFC 1123の 「メールトランスポートマテリアル」を置きかえる)。にもかかわらず、 RFC 821では、1990年代中盤までになると、インターネットでは重要な用途が なくなり、また、(付録に)いくつかの追加の配送モデルのいくつかについて規 定されている。以下のセクションでは明確さと短かさへの関心から割愛する; それらが必要な読者は、RFC 821を参照すべし。 Klensin Standards Track [Page 1] RFC 2821 Simple Mail Transfer Protocol April 2001 It also includes some additional material from RFC 1123 that required amplification. This material has been identified in multiple ways, mostly by tracking flaming on various lists and newsgroups and problems of unusual readings or interpretations that have turned up as the SMTP extensions have been deployed. Where this specification moves beyond consolidation and actually differs from earlier documents, it supersedes them technically as well as textually. また、拡大を要求するRFC 1123からのいくつかの追加のものが含まれる。 このものは、複数の方法で識別されており、ほとんどはたくさんのリストや ニューズグループ、SMTPの拡張が展開されたために曲げられた、普通でない読 み方や解釈の問題でのフレームを追跡することによる。この規定は、整理統合 を経ており、実は以前の文書と異なるので、テキストと同じく、技術的にもそ れらにとってかわる。 Although SMTP was designed as a mail transport and delivery protocol, this specification also contains information that is important to its use as a 'mail submission' protocol, as recommended for POP [3, 26] and IMAP [6]. Additional submission issues are discussed in RFC 2476 [15]. SMTPはメールの転送と配送のプロトコルとしてデザインされたにもかかわらず、 この規定はPOPやIMAPで推奨された、「メールサブミッション」プロトコルと して使われる重要な情報をも含む。追加のサブミッションに関する問題は、 RFC2476で議論されている。 Section 2.3 provides definitions of terms specific to this document. Except when the historical terminology is necessary for clarity, this document uses the current 'client' and 'server' terminology to identify the sending and receiving SMTP processes, respectively. セクション2.3では、この文書で規定される言葉の定義を提供する。明確化の ために歴史的な単語が必要なとき以外は、この文書では現在の「クライアント」 と「サーバ」という言葉を使い、それぞれSMTPプロセスを送る側、受け入れる 側を示す。 A companion document [32] discusses message headers, message bodies and formats and structures for them, and their relationship. もう一方の文書では、メッセージヘッダ、メッセージボディ、メッセージの フォーマット、構造、それらの関係を議論する。 Table of Contents 1. Introduction .................................................. 4 2. The SMTP Model ................................................ 5 2.1 Basic Structure .............................................. 5 2.2 The Extension Model .......................................... 7 2.2.1 Background ................................................. 7 2.2.2 Definition and Registration of Extensions .................. 8 2.3 Terminology .................................................. 9 2.3.1 Mail Objects ............................................... 10 2.3.2 Senders and Receivers ...................................... 10 2.3.3 Mail Agents and Message Stores ............................. 10 2.3.4 Host ....................................................... 11 2.3.5 Domain ..................................................... 11 2.3.6 Buffer and State Table ..................................... 11 2.3.7 Lines ...................................................... 12 2.3.8 Originator, Delivery, Relay, and Gateway Systems ........... 12 2.3.9 Message Content and Mail Data .............................. 13 2.3.10 Mailbox and Address ....................................... 13 2.3.11 Reply ..................................................... 13 2.4 General Syntax Principles and Transaction Model .............. 13 3. The SMTP Procedures: An Overview .............................. 15 3.1 Session Initiation ........................................... 15 3.2 Client Initiation ............................................ 16 3.3 Mail Transactions ............................................ 16 3.4 Forwarding for Address Correction or Updating ................ 19 Klensin Standards Track [Page 2] RFC 2821 Simple Mail Transfer Protocol April 2001 3.5 Commands for Debugging Addresses ............................. 20 3.5.1 Overview ................................................... 20 3.5.2 VRFY Normal Response ....................................... 22 3.5.3 Meaning of VRFY or EXPN Success Response ................... 22 3.5.4 Semantics and Applications of EXPN ......................... 23 3.6 Domains ...................................................... 23 3.7 Relaying ..................................................... 23 3.8 Mail Gatewaying .............................................. 25 3.8.1 Header Fields in Gatewaying ................................ 25 3.8.2 Received Lines in Gatewaying ............................... 26 3.8.3 Addresses in Gatewaying .................................... 26 3.8.4 Other Header Fields in Gatewaying .......................... 26 3.8.5 Envelopes in Gatewaying .................................... 27 3.9 Terminating Sessions and Connections ......................... 27 3.10 Mailing Lists and Aliases ................................... 28 3.10.1 Alias ..................................................... 28 3.10.2 List ...................................................... 28 4. The SMTP Specifications ....................................... 29 4.1 SMTP Commands ................................................ 29 4.1.1 Command Semantics and Syntax ............................... 29 4.1.1.1 Extended HELLO (EHLO) or HELLO (HELO) ................... 29 4.1.1.2 MAIL (MAIL) .............................................. 31 4.1.1.3 RECIPIENT (RCPT) ......................................... 31 4.1.1.4 DATA (DATA) .............................................. 32 4.1.1.5 RESET (RSET) ............................................. 34 4.1.1.6 VERIFY (VRFY) ............................................ 34 4.1.1.7 EXPAND (EXPN) ............................................ 35 4.1.1.8 HELP (HELP) .............................................. 35 4.1.1.9 NOOP (NOOP) .............................................. 35 4.1.1.10 QUIT (QUIT) ............................................. 36 4.1.2 Command Argument Syntax .................................... 36 4.1.3 Address Literals ........................................... 38 4.1.4 Order of Commands .......................................... 39 4.1.5 Private-use Commands ....................................... 40 4.2 SMTP Replies ................................................ 40 4.2.1 Reply Code Severities and Theory ........................... 42 4.2.2 Reply Codes by Function Groups ............................. 44 4.2.3 Reply Codes in Numeric Order .............................. 45 4.2.4 Reply Code 502 ............................................. 46 4.2.5 Reply Codes After DATA and the Subsequent . .... 46 4.3 Sequencing of Commands and Replies ........................... 47 4.3.1 Sequencing Overview ........................................ 47 4.3.2 Command-Reply Sequences .................................... 48 4.4 Trace Information ............................................ 49 4.5 Additional Implementation Issues ............................. 53 4.5.1 Minimum Implementation ..................................... 53 4.5.2 Transparency ............................................... 53 4.5.3 Sizes and Timeouts ......................................... 54 Klensin Standards Track [Page 3] RFC 2821 Simple Mail Transfer Protocol April 2001 4.5.3.1 Size limits and minimums ................................. 54 4.5.3.2 Timeouts ................................................. 56 4.5.4 Retry Strategies ........................................... 57 4.5.4.1 Sending Strategy ......................................... 58 4.5.4.2 Receiving Strategy ....................................... 59 4.5.5 Messages with a null reverse-path .......................... 59 5. Address Resolution and Mail Handling .......................... 60 6. Problem Detection and Handling ................................ 62 6.1 Reliable Delivery and Replies by Email ....................... 62 6.2 Loop Detection ............................................... 63 6.3 Compensating for Irregularities .............................. 63 7. Security Considerations ....................................... 64 7.1 Mail Security and Spoofing ................................... 64 7.2 "Blind" Copies ............................................... 65 7.3 VRFY, EXPN, and Security ..................................... 65 7.4 Information Disclosure in Announcements ...................... 66 7.5 Information Disclosure in Trace Fields ....................... 66 7.6 Information Disclosure in Message Forwarding ................. 67 7.7 Scope of Operation of SMTP Servers ........................... 67 8. IANA Considerations ........................................... 67 9. References .................................................... 68 10. Editor's Address ............................................. 70 11. Acknowledgments .............................................. 70 Appendices ....................................................... 71 A. TCP Transport Service ......................................... 71 B. Generating SMTP Commands from RFC 822 Headers ................. 71 C. Source Routes ................................................. 72 D. Scenarios ..................................................... 73 E. Other Gateway Issues .......................................... 76 F. Deprecated Features of RFC 821 ................................ 76 Full Copyright Statement ......................................... 79 1. Introduction 1. 導入 The objective of the Simple Mail Transfer Protocol (SMTP) is to transfer mail reliably and efficiently. SMTPの目的は信頼でき、能率よくメールを配送することである。 SMTP is independent of the particular transmission subsystem and requires only a reliable ordered data stream channel. While this document specifically discusses transport over TCP, other transports are possible. Appendices to RFC 821 describe some of them. SMTPは特定の配送サブシステムから独立しており、信頼性のある、順序立った データストームチャネルだけを要求する。この文書では、特にTCPを介しての 配送を議論しているが、他の配送系も可能である。そのいくつかはRFC 821の 付録に示してある。 An important feature of SMTP is its capability to transport mail across networks, usually referred to as "SMTP mail relaying" (see section 3.8). A network consists of the mutually-TCP-accessible hosts on the public Internet, the mutually-TCP-accessible hosts on a firewall-isolated TCP/IP Intranet, or hosts in some other LAN or WAN environment utilizing a non-TCP transport-level protocol. Using Klensin Standards Track [Page 4] RFC 2821 Simple Mail Transfer Protocol April 2001 SMTP, a process can transfer mail to another process on the same network or to some other network via a relay or gateway process accessible to both networks. SMTPの重要な特徴は、ネットワークの反対側までメールを送る能力であり、そ れは通常、「SMTPメールリレー」(セクション3.8を見よ)と呼ばれる。ネット ワークは公共のインターネット上で相互にTCPでアクセス可能なホスト、相互 にTCPでアクセス可能なファイアウォールで切り離されたTCP/IPのイントラネッ ト、TCP以外の配送レベルのプロトコルを用いた別のLANやWAN環境にあるホス トで成り立つ。SMTPを用いることで、1つのプロセスは同じネットワーク、あ るいはリレーやゲートウェイプロセスで相互にアクセス可能な別のネットワー ク上の別のプロセスへメールを配送できる。 In this way, a mail message may pass through a number of intermediate relay or gateway hosts on its path from sender to ultimate recipient. The Mail eXchanger mechanisms of the domain name system [22, 27] (and section 5 of this document) are used to identify the appropriate next-hop destination for a message being transported. この方法で、送り手から最後の受け手への通り道にあるたくさんの途中のリレー やゲートウェイホストを介して、メールメッセージが通過するかもしれない。 ドメインネームシステム(この文書のセクション5)のメールエクスチェンジャ 機構は、配送されるメッセージにとって、適切な次のホップとなる行き先を特 定するのに使われる。 2. The SMTP Model 2. SMTPモデル 2.1 Basic Structure 2.1 基本的な構造 The SMTP design can be pictured as: SMTPデザインを以下のように描くことができる +----------+ +----------+ +------+ | | | | | User |<-->| | SMTP | | +------+ | Client- |Commands/Replies| Server- | +------+ | SMTP |<-------------->| SMTP | +------+ | File |<-->| | and Mail | |<-->| File | |System| | | | | |System| +------+ +----------+ +----------+ +------+ SMTP client SMTP server When an SMTP client has a message to transmit, it establishes a two- way transmission channel to an SMTP server. The responsibility of an SMTP client is to transfer mail messages to one or more SMTP servers, or report its failure to do so. SMTPクライアントが送るためのメッセージを持ったとき、SMTPサーバに対して 双方向通信のチャネルを確立する。SMTPクライアントの責任は、1つないしよ り多くのSMTPサーバに対してメッセージを送ること、またはそうしたときの失 敗を報告することである。 The means by which a mail message is presented to an SMTP client, and how that client determines the domain name(s) to which mail messages are to be transferred is a local matter, and is not addressed by this document. In some cases, the domain name(s) transferred to, or determined by, an SMTP client will identify the final destination(s) of the mail message. In other cases, common with SMTP clients associated with implementations of the POP [3, 26] or IMAP [6] protocols, or when the SMTP client is inside an isolated transport service environment, the domain name determined will identify an intermediate destination through which all mail messages are to be relayed. SMTP clients that transfer all traffic, regardless of the target domain names associated with the individual messages, or that do not maintain queues for retrying message transmissions that initially cannot be completed, may otherwise conform to this specification but are not considered fully-capable. Fully-capable SMTP implementations, including the relays used by these less capable Klensin Standards Track [Page 5] RFC 2821 Simple Mail Transfer Protocol April 2001 ones, and their destinations, are expected to support all of the queuing, retrying, and alternate address functions discussed in this specification. メールメッセージがSMTPクライアントにどのように渡されるか、また、クライ アントがどのようにしてメールメッセージが送られるべきドメイン名を決定す るのかといった方法についてはローカルの問題であり、この文書には記されて いない。いくつかの場合には、SMTPクライアントによって配送されたり、決定 されたりするドメイン名がメールメッセージの最終的な配送先を識別するだろ う。別の場合には、POPやIMAPプロトコルの実装に関連したSMTPクライアント と共通な、SMTPクライアントが内側にあるときの独立した配送プロトコルでは、 決定されたドメイン名は、全てのメールメッセージがリレーされて通るべき途 中の行き先を特定するだろう。それぞれのメッセージに関連した宛て先ドメイ ン名にかかわらず、すべてのトラフィックを転送する、または最初にうまくい かなかったメッセージ配送をリトライするためのキューが維持されていない SMTPクライアントは、完全に有能(fully-capable)とは考えられないが、この 記述に従わないかもしれない。完全に有能なSMTPの実装は、あまり有能でない ものやその宛て先からリレーするのに使われる場合も含めて、キューし、リト ライし、この詳述で議論される代理のアドレス機能をすべてサポートすること が期待されている。 The means by which an SMTP client, once it has determined a target domain name, determines the identity of an SMTP server to which a copy of a message is to be transferred, and then performs that transfer, is covered by this document. To effect a mail transfer to an SMTP server, an SMTP client establishes a two-way transmission channel to that SMTP server. An SMTP client determines the address of an appropriate host running an SMTP server by resolving a destination domain name to either an intermediate Mail eXchanger host or a final target host. 一度宛て先のドメイン名を決定したSMTPクライアントが、メッセージのコピー を転送したSMTPサーバの同一性を決定してからその転送を行うという方法は、 この文書でカバーされている。SMTPサーバへメールを転送した影響として、 SMTPクライアントはSMTPサーバに双方向通信チャネルを確立する。 SMTPクライアントは、途中のメールエクスチェンジャホストか最終的な目的ホ ストの宛て先のドメイン名を解決することで、SMTPサーバが動いている適切な ホストのアドレスを決定する。 An SMTP server may be either the ultimate destination or an intermediate "relay" (that is, it may assume the role of an SMTP client after receiving the message) or "gateway" (that is, it may transport the message further using some protocol other than SMTP). SMTP commands are generated by the SMTP client and sent to the SMTP server. SMTP replies are sent from the SMTP server to the SMTP client in response to the commands. SMTPサーバは、最終的な宛て先か、途中のリレー(つまり、メッセージを受信 したあと、SMTPクライアントの役割が仮定されているかもしれない)か、ゲー トウェイ(つまり、SMTP以外の何らかのプロトコルを用いて、さらにメッセー ジを転送するかもしれない)のいずれかかもしれない。SMTPコマンドはSMTPク ライアントによって生成され、SMTPサーバに送られる。SMTP返答は、コマンド へのレスポンスとしてSMTPサーバからSMTPクライアントへと送られる。 In other words, message transfer can occur in a single connection between the original SMTP-sender and the final SMTP-recipient, or can occur in a series of hops through intermediary systems. In either case, a formal handoff of responsibility for the message occurs: the protocol requires that a server accept responsibility for either delivering a message or properly reporting the failure to do so. 言いかえれば、メッセージ転送は、オリジナルのSMTP送信者と最終的なSMTP受 信者との間の単一のコネクションによって起きえるし、途中のシステムを経由 して一連のホップでも起きえる。いずれの場合にしても、そのメッセージに対 して責任ある正式な受け渡しが起きる:このプロトコルは、サーバがメッセー ジを配送するか、またはそれによる失敗を確実に報告するかのいずれかについ て責任を持つことを要求している。 Once the transmission channel is established and initial handshaking completed, the SMTP client normally initiates a mail transaction. Such a transaction consists of a series of commands to specify the originator and destination of the mail and transmission of the message content (including any headers or other structure) itself. When the same message is sent to multiple recipients, this protocol encourages the transmission of only one copy of the data for all recipients at the same destination (or intermediate relay) host. 一旦通信チャネルが確立して最初のハンドシェイクが完了したら、SMTPクライ アントは普通、メールトランザクションを初める。そのようなトランザクショ ンは、メールの最初の送信者の明記、メールの宛て先、転送されるメッセージ の内容そのもの、という一連のコマンドで成り立つ。同じメッセージが複数の 受け取り人に向けて送られたとき、このプロトコルは、同じ宛て先ホスト(あ るいは途中のリレー)への全ての受け取り人へのデータをたった1つのコピーで 伝送することを助ける。 The server responds to each command with a reply; replies may indicate that the command was accepted, that additional commands are expected, or that a temporary or permanent error condition exists. Commands specifying the sender or recipients may include server- permitted SMTP service extension requests as discussed in section 2.2. The dialog is purposely lock-step, one-at-a-time, although this can be modified by mutually-agreed extension requests such as command pipelining [13]. サーバはそれぞれのコマンドに返答を返す;返答はコマンドが受けいれられた こと、追加のコマンドが期待されていること、一時的ないし恒久的エラーの状 況が存在することを示すかもしれない。送り手や受け取り人を示すコマンドで は、サーバによって許される、セクション2.2で議論されるSMTPサービスの拡 張リクエストを含むかもしれない。 コマンドをパイプラインするような、相互に同意した拡張リクエストで修飾す ることができるにもかかわらず、そのダイアログは、わざわざロックのステッ プや、1つを一度に行うことになる。 Klensin Standards Track [Page 6] RFC 2821 Simple Mail Transfer Protocol April 2001 Once a given mail message has been transmitted, the client may either request that the connection be shut down or may initiate other mail transactions. In addition, an SMTP client may use a connection to an SMTP server for ancillary services such as verification of email addresses or retrieval of mailing list subscriber addresses. 一旦与えられたメールメッセージが転送されたら、クライアントはコネクショ ンをシャットダウンするか、別のメールトランザクションを初めるかを要求し てもよい。加えて、SMTPクライアントはSMTPサーバへのコネクションを、 emailアドレスの照合やメーリングリスト講読者アドレスの検索といった補助 的なサービスのために利用してもよい。 As suggested above, this protocol provides mechanisms for the transmission of mail. This transmission normally occurs directly from the sending user's host to the receiving user's host when the two hosts are connected to the same transport service. When they are not connected to the same transport service, transmission occurs via one or more relay SMTP servers. An intermediate host that acts as either an SMTP relay or as a gateway into some other transmission environment is usually selected through the use of the domain name service (DNS) Mail eXchanger mechanism. 上で示唆したように、このプロトコルはメールの転送のためのメカニズムを提 供する。この伝送は、2つのホストが同じ配送サービスに接続しているときに は、普通、送信するユーザのホストから受信するユーザのホストヘ直接的に起 こる。それらが同じ伝送サービスに接続していない場合、1つないしそれ以上 のリレーSMTPサーバを介して転送が起こる。SMTPリレーやいくつかの別の配送 環境へのゲートウェイとして働く途中のホストは普通、ドメインネームサービ ス(DNS)のメールエクスチェンジャメカニズムを用いて選ばれる。 Usually, intermediate hosts are determined via the DNS MX record, not by explicit "source" routing (see section 5 and appendices C and F.2). たいてい、途中のホストはDNSのMXレコードを通じて決定され、明示的なソー スルーティングにはよらない(セクション5と付録C, F.2を見よ)。 2.2 The Extension Model 2.2 拡張されたモデル 2.2.1 Background 2.2.1 背景 In an effort that started in 1990, approximately a decade after RFC 821 was completed, the protocol was modified with a "service extensions" model that permits the client and server to agree to utilize shared functionality beyond the original SMTP requirements. The SMTP extension mechanism defines a means whereby an extended SMTP client and server may recognize each other, and the server can inform the client as to the service extensions that it supports. 1990年に始まったRFC 821が完成した後の約10年間の努力により、オリジナル のSMTPにおける要求を超えてクライアントとサーバで共有された機能を利用す ることを許すような、"サービスエクステンション"モデルによって、このプロ トコルは修正された。SMTPエクステンションメカニズムは、拡張されたSMTPク ライアントとサーバが相互に認証し、サーバが拡張サービスをサポートするクラ イアントに情報を提供できるための手段を定義する。 Contemporary SMTP implementations MUST support the basic extension mechanisms. For instance, servers MUST support the EHLO command even if they do not implement any specific extensions and clients SHOULD preferentially utilize EHLO rather than HELO. (However, for compatibility with older conforming implementations, SMTP clients and servers MUST support the original HELO mechanisms as a fallback.) Unless the different characteristics of HELO must be identified for interoperability purposes, this document discusses only EHLO. 現在のSMTPの実装では、基本的な拡張メカニズムをサポートしていなければな らない(MUST)。例えば、サーバは、もし特段の拡張を実装していないとしても EHLOコマンドをサポートしなければならず(MUST)、クライアントはHELOよりも EHLOを優先的に利用すべきである(SHOULD)。(しかしながら、古い実装に従う ものとの互換性のため、SMTPクライアントとサーバはオリジナルのHELOメカニ ズムを、万一に備えてサポートしなければならない(MUST))。HELOの異なった 特徴が相互運用の目的で特定されなければならない場合を除き、この文書では EHLOについてだけ議論する。 SMTP is widely deployed and high-quality implementations have proven to be very robust. However, the Internet community now considers some services to be important that were not anticipated when the protocol was first designed. If support for those services is to be added, it must be done in a way that permits older implementations to continue working acceptably. The extension framework consists of: SMTPは広く使われ、良質な実装が確固として存在している。しかしながら、イ ンターネット共同体では現在、このプロトコルが最初にデザインされたときに 予想されなかったいくつかのサービスを重要と考えられている。これらのサー ビスのサポートが追加されるならば、古い実装が満足に働き続けられる方法が 必要である。その拡張のフレームワークは以下で成り立つ: Klensin Standards Track [Page 7] RFC 2821 Simple Mail Transfer Protocol April 2001 - The SMTP command EHLO, superseding the earlier HELO, 以前のHELOにとってかわるSMTPコマンドのEHLO - a registry of SMTP service extensions, SMTPサービスの拡張に関する記載 - additional parameters to the SMTP MAIL and RCPT commands, and SMTPコマンドのSMTPとRCPTの追加パラメータ、 - optional replacements for commands defined in this protocol, such as for DATA in non-ASCII transmissions [33]. オプションで、DATAにおけるASCII以外の転送のような、このプロトコルで定 義されるコマンドの置き替え SMTP's strength comes primarily from its simplicity. Experience with many protocols has shown that protocols with few options tend towards ubiquity, whereas protocols with many options tend towards obscurity. SMTPの強さは、第一にその簡素にある。わずかなオプションしかないプロトコ ルはあちこちに存在し、多くのオプションがあるプロトコルはめったに見かけ ないということが、多くのプロトコルでの経験で示されている。 Each and every extension, regardless of its benefits, must be carefully scrutinized with respect to its implementation, deployment, and interoperability costs. In many cases, the cost of extending the SMTP service will likely outweigh the benefit. それぞれの拡張は、その恩恵にかかわらず、その実装、開発、相互運用性のコ ストについて注意深く吟味されなければならない。多くの場合、SMTPサービス の拡張にかかるコストは、その恩恵よりも重いものになりそうだ。 2.2.2 Definition and Registration of Extensions 2.2.2 拡張の定義と記述 The IANA maintains a registry of SMTP service extensions. A corresponding EHLO keyword value is associated with each extension. Each service extension registered with the IANA must be defined in a formal standards-track or IESG-approved experimental protocol document. The definition must include: IANAがSMTPサービスの拡張についての記述を管理する。キーワードEHLOの値に 対応するものが、それぞれの拡張に結びつけられる。IANAによって記述された それぞれのサービスの拡張は、正式なstandards-trackか、IESG-approved実験 プロトコルの文書に定義されなければならない。この定義は以下を含む必要が ある: - the textual name of the SMTP service extension; SMTPサービス拡張の逐語的な名前 - the EHLO keyword value associated with the extension; その拡張に関連するキーワードEHLOの値 - the syntax and possible values of parameters associated with the EHLO keyword value; キーワードEHLOの値に関連づけられた、構文とパラメータの可能な値 - any additional SMTP verbs associated with the extension (additional verbs will usually be, but are not required to be, the same as the EHLO keyword value); その拡張に関連した追加のSMTPの動詞 (たいてい追加の動詞が存在するが、EHLOキーワードの値と同様、必要ではない) - any new parameters the extension associates with the MAIL or RCPT verbs; MAILやRCPT動詞と関連する新しいパラメータの拡張 - a description of how support for the extension affects the behavior of a server and client SMTP; and, 拡張のサポートがSMTPサーバとクライアントの振る舞いに与える影響の詳述 - the increment by which the extension is increasing the maximum length of the commands MAIL and/or RCPT, over that specified in this standard. この拡張が、この標準で規定されたのを超えるMAILやRCPTコマンドの最大長を 与えることによる、その増加 Klensin Standards Track [Page 8] RFC 2821 Simple Mail Transfer Protocol April 2001 In addition, any EHLO keyword value starting with an upper or lower case "X" refers to a local SMTP service extension used exclusively through bilateral agreement. Keywords beginning with "X" MUST NOT be used in a registered service extension. Conversely, keyword values presented in the EHLO response that do not begin with "X" MUST correspond to a standard, standards-track, or IESG-approved experimental SMTP service extension registered with IANA. A conforming server MUST NOT offer non-"X"-prefixed keyword values that are not described in a registered extension. 加えて、大文字、小文字の「X」で始まるEHLOキーワードの値は何であれ、特 に双方の合意事項として使われるローカルなSMTPサービスの拡張として使われ る。「X」で始まるキーワードは、登録されたサービスの拡張で利用してはな らない(MUST NOT)。逆に、キーワードの値で「X」で始まらないEHLOに対する応答 は、標準か、standards-trackか、IANAに登録されたIESG-approvedの実験SMTP サービスの拡張のいずれかでなければならない(MUST)。適合したサーバは、登 録された拡張に記述されていない、「X」ではじまらないキーワード値を提供 してはならない(MUST NOT)。 Additional verbs and parameter names are bound by the same rules as EHLO keywords; specifically, verbs beginning with "X" are local extensions that may not be registered or standardized. Conversely, verbs not beginning with "X" must always be registered. 追加の動詞とパラメータ名は、EHLOキーワードと同じルールで決められる;特 に、「X」で始まる動詞は、登録されたり標準化されたりしないローカルな拡 張である。逆に、「X」で始まらない動詞は、常に登録されなければならない。 2.3 Terminology The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described below. 2.3 用語 本文書中、"MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", "OPTIONAL"というキーワー ドは、以下のように解釈されるべきである。 1. MUST This word, or the terms "REQUIRED" or "SHALL", mean that the definition is an absolute requirement of the specification. 1. MUST この単語、あるいは用語 "REQUIRED" や "SHALL" は、この定義が本仕 様の絶対的な要求であることを意味する。 2. MUST NOT This phrase, or the phrase "SHALL NOT", mean that the definition is an absolute prohibition of the specification. 2. MUST NOT このフレーズ、あるいはフレーズ "SHALL NOT" は、この定義が 本仕様で絶対に禁止されることを意味している。 3. SHOULD This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course. 3. SHOULD この単語、また副詞 "RECOMMENDEDは、特殊な環境で有効な理由が 存在するならば、特定のアイテムを無視してもよいが、完全な実装につい て理解し、別の方法を選ぶ前に注意深く考察するべきことを意味する。 4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that there may exist valid reasons in particular circumstances when the particular behavior is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behavior described with this label. 4. SHOULD NOT このフレーズ、またフレーズ "NOT RECOMMENDED" は、特殊な ふるまいが許容であったり、また有益でさえあったりする時、特定の環境 で有効な理由が存在するかもしれないが、完全な実装について理解し、こ のラベルで記述されたふるまいを実装する前に注意深く考察すべきことを 意味する。 5. MAY This word, or the adjective "OPTIONAL", mean that an item is truly optional. One vendor may choose to include the item because a particular marketplace requires it or because the vendor feels that it enhances the product while another vendor may omit the same item. An implementation which does not include a particular option MUST be prepared to interoperate with another implementation which does include the option, though perhaps with reduced functionality. In the same vein an implementation which Klensin Standards Track [Page 9] RFC 2821 Simple Mail Transfer Protocol April 2001 does include a particular option MUST be prepared to interoperate with another implementation which does not include the option (except, of course, for the feature the option provides.) 5. MAY この単語、また副詞 "OPTIONAL"は、それがまったくオプションである ことを示す。あるベンダーは、特定の市場でそれが要求されている、別の ベンダーがその項目を省略したので、それが製品価値を増すと考える等の 理由で、それを含むことを選ぶかもしれない。あるオプションを含まない 実装は、おそらく機能が少ないにしても、そのオプションを含む実装と相 互運用する準備をしておかなければならない(MUST)。同じ文脈で、あるオ プションを含む実装は、そのオプションを含まない別の実装と相互運用で きる準備をしなければならない(MUST) (もちろん、そのオプションが提供 する特徴を除いて)。 2.3.1 Mail Objects 2.3.1 メールの実体 SMTP transports a mail object. A mail object contains an envelope and content. SMTPはメールの実体を転送する。メールの実体は、エンベロープとコンテント を含む。 The SMTP envelope is sent as a series of SMTP protocol units (described in section 3). It consists of an originator address (to which error reports should be directed); one or more recipient addresses; and optional protocol extension material. Historically, variations on the recipient address specification command (RCPT TO) could be used to specify alternate delivery modes, such as immediate display; those variations have now been deprecated (see appendix F, section F.6). SMTPエンベロープは、一連のSMTPプロトコルの単位として送られる(セクショ ン3に詳細がある)。送り主の(エラーレポートが振り向けられるべき)アドレス; 1つないしそれ以上の受け取りアドレス;オプションでプロトコルを拡張する もの、から成り立つ。歴史的に、受け取り手のアドレスを列挙するコマンド (RCPT TO)の変化は、即時表示といった代理の配送モードを明記するのに利用 され得る;その変化について、現在はすべきでない(appendix Fのセクション F.6を見よ)。 The SMTP content is sent in the SMTP DATA protocol unit and has two parts: the headers and the body. If the content conforms to other contemporary standards, the headers form a collection of field/value pairs structured as in the message format specification [32]; the body, if structured, is defined according to MIME [12]. The content is textual in nature, expressed using the US-ASCII repertoire [1]. Although SMTP extensions (such as "8BITMIME" [20]) may relax this restriction for the content body, the content headers are always encoded using the US-ASCII repertoire. A MIME extension [23] defines an algorithm for representing header values outside the US-ASCII repertoire, while still encoding them using the US-ASCII repertoire. SMTPコンテントはSMTP DATAプロトコルユニットで送られ、2つの部分を持つ: ヘッダとボディである。もしコンテントが現代の別の標準に従うならば、フィー ルド/値の集まりからなるヘッダは、メッセージフォーマットの規定で構造化 される;ボディは、もし構造化されているなら、MIMEに従って定義される。 コンテントがもとからテキストなら、US-ASCIIを用いて表現される。 SMTPの拡張("8BITMIME"のような)はコンテントボディの制限を緩和するかもし れないが、コンテントヘッダは常にUS-ASCIIセットを用いてエンコードされる。 MIME拡張ではUS-ASCIIコード以外のヘッダ値を表現するためのアルゴリズムを 定義しており、それによりUS-ASCIIコードを用いてエンコードされる。 2.3.2 Senders and Receivers 2.3.2 送り手と受け手 In RFC 821, the two hosts participating in an SMTP transaction were described as the "SMTP-sender" and "SMTP-receiver". This document has been changed to reflect current industry terminology and hence refers to them as the "SMTP client" (or sometimes just "the client") and "SMTP server" (or just "the server"), respectively. Since a given host may act both as server and client in a relay situation, "receiver" and "sender" terminology is still used where needed for clarity. RFC 821では、SMTPトランザクションに参加する2つのホストは"SMTP-sender" と"SMTP-receiver"として表現されていた。この文書では、現在の産業用語を 反映させるために変更し、それらをそれぞれ"SMTPクライアント"(あるいは、 時として単に "クライアント")、"SMTPサーバ"(あるいは単に"サーバ")と呼ぶ ことにする。リレーでは、与えられたホストがサーバとクライアント双方とし てふるまうかもしれないので、"受け手"と"送り手"という用語は、明確に表す 必要があるときにはなお使われる。 2.3.3 Mail Agents and Message Stores 2.3.3 メールエージェントとメッセージを貯蔵するところ Additional mail system terminology became common after RFC 821 was published and, where convenient, is used in this specification. In particular, SMTP servers and clients provide a mail transport service and therefore act as "Mail Transfer Agents" (MTAs). "Mail User Agents" (MUAs or UAs) are normally thought of as the sources and Klensin Standards Track [Page 10] RFC 2821 Simple Mail Transfer Protocol April 2001 targets of mail. At the source, an MUA might collect mail to be transmitted from a user and hand it off to an MTA; the final ("delivery") MTA would be thought of as handing the mail off to an MUA (or at least transferring responsibility to it, e.g., by depositing the message in a "message store"). However, while these terms are used with at least the appearance of great precision in other environments, the implied boundaries between MUAs and MTAs often do not accurately match common, and conforming, practices with Internet mail. Hence, the reader should be cautious about inferring the strong relationships and responsibilities that might be implied if these terms were used elsewhere. RFC 821が発行された後に追加された一般的に使われるメールシステム用語は、 便利なときにはこの仕様書で使われる。特に、SMTPサーバとクライアントがメー ル転送サービスを提供するゆえ、"メール転送エージェント"(MTA)としてふる まう。"メールユーザエージェント"(MUAまたはUA)は普通、メールの源と目的 地であると考えられる。源では、MUAはユーザから転送されるべきメールを集 め、MTAへと渡す;最終(配送)MTAはMUA(あるいは、少なくとも転送の責任、例 えば「メッセージ貯蔵庫」にそのメッセージを投げ込む)にメールを渡すと考 えられる。にもかかわらず、これらの用語は少なくとも別の状況で大変精密な 見かけで使われるが、MUAとMTAの実装上の境界は、一般に、インターネットメー ルの実際では、正確には一致しない。それゆえ読者は、別のところでこれらの 用語が使われているなら、強いつながりや実装された信頼性を推論しつつ注意 すべきである。 2.3.4 Host 2.3.4 ホスト For the purposes of this specification, a host is a computer system attached to the Internet (or, in some cases, to a private TCP/IP network) and supporting the SMTP protocol. Hosts are known by names (see "domain"); identifying them by numerical address is discouraged. この仕様書の目的からして、ホストはインターネットにつながったコンピュー タシステムであり(あるいは、いくつかの場合にはプライベートなTCP/IPネッ トワークである)、SMTPプロトコルをサポートする。ホストは名前によって区 別される(ドメインを見よ);番号のアドレスでそれらを識別することは認めな い。 2.3.5 Domain 2.3.5 ドメイン A domain (or domain name) consists of one or more dot-separated components. These components ("labels" in DNS terminology [22]) are restricted for SMTP purposes to consist of a sequence of letters, digits, and hyphens drawn from the ASCII character set [1]. Domain names are used as names of hosts and of other entities in the domain name hierarchy. For example, a domain may refer to an alias (label of a CNAME RR) or the label of Mail eXchanger records to be used to deliver mail instead of representing a host name. See [22] and section 5 of this specification. ドメイン(あるいはドメイン名)は、1つないしそれ以上のドットで分けられた 要素から成る。これらの要素(DNSでの用語ではラベル)は、SMTPの目的のため にASCII文字セットから選ばれた文字、数字、ハイフンの並びから成るように 制限される。ドメイン名はホストの名前や、ドメイン名ヒエラルキーの他の実 体として使われる。例えば、ドメインは別名を示すかもしれない(CNAME RRの ラベル)し、ホスト名を表現するかわりにメールを配送するのに使われるメー ルエクスチェンジャレコードのラベルを示すかもしれない。[22]とこの仕様書 のセクション5を見よ。 The domain name, as described in this document and in [22], is the entire, fully-qualified name (often referred to as an "FQDN"). A domain name that is not in FQDN form is no more than a local alias. Local aliases MUST NOT appear in any SMTP transaction. 本文書と[22]に記述されたドメイン名は、絶対な、完全修飾された名前である (しばしばFQDNと表現される)。FQDNフォームでないドメイン名はローカルな別 名以上のものではない。ローカルな別名はSMTPトランザクションに現れてはな らない(MUST NOT)。 2.3.6 Buffer and State Table 2.3.6 バッファと状態テーブル SMTP sessions are stateful, with both parties carefully maintaining a common view of the current state. In this document we model this state by a virtual "buffer" and a "state table" on the server which may be used by the client to, for example, "clear the buffer" or "reset the state table," causing the information in the buffer to be discarded and the state to be returned to some previous state. SMTPセッションは、双方が注意深く現在の状態に関する一般的な視点を維持す るステートフルである。この文書で、例えば、「バッファをクリアせよ」「ス テートテーブルをリセットせよ」という形でクライアントに利用され、それに よってバッファの情報を捨てたり、状態を前の状態に戻すようなサーバ上のバー チャルな「バッファ」と「ステートテーブル」によって、我々は状態を設計す る。 Klensin Standards Track [Page 11] RFC 2821 Simple Mail Transfer Protocol April 2001 2.3.7 Lines 2.3.7 行 SMTP commands and, unless altered by a service extension, message data, are transmitted in "lines". Lines consist of zero or more data characters terminated by the sequence ASCII character "CR" (hex value 0D) followed immediately by ASCII character "LF" (hex value 0A). This termination sequence is denoted as in this document. Conforming implementations MUST NOT recognize or generate any other character or character sequence as a line terminator. Limits MAY be imposed on line lengths by servers (see section 4.5.3). SMTPコマンドと、サービス拡張によって変更されない限りメッセージデータは、 「行」で転送される。行は0ないしより多くのデータ文字で構成され、ASCII文 字の"CR"(16進でOD)、すぐに続いてASCII文字の"LF"(16進で0A)の連続で終わ る。この終了の連続は、本文書中で表す。 実装を従わせるには、別のいかなる文字や文字の連続を行のターミネータとし て解釈したり、生成したりしてはならない(MUST NOT)。行の長さがサーバの都 合で制限されても良い(MAY)。 In addition, the appearance of "bare" "CR" or "LF" characters in text (i.e., either without the other) has a long history of causing problems in mail implementations and applications that use the mail system as a tool. SMTP client implementations MUST NOT transmit these characters except when they are intended as line terminators and then MUST, as indicated above, transmit them only as a sequence. 加えて、テキスト中、「裸」の"CR"や"LF"文字があらわれること(他のものが ないにしても)は、メールの実装やツールとしてメールシステムを利用するア プリケーションに対して、長い間問題を引きおこしてきた。 SMTPクライアントの実装は、それらが一連のとしてのみ送信され、上に 示した行のターミネータとしての意図を持っている場合以外、これらの文字を 送信してはならない(MUST NOT)。 2.3.8 Originator, Delivery, Relay, and Gateway Systems 2.3.8 始めの差出人、配送、リレー、ゲートウェイシステム This specification makes a distinction among four types of SMTP systems, based on the role those systems play in transmitting electronic mail. An "originating" system (sometimes called an SMTP originator) introduces mail into the Internet or, more generally, into a transport service environment. A "delivery" SMTP system is one that receives mail from a transport service environment and passes it to a mail user agent or deposits it in a message store which a mail user agent is expected to subsequently access. A "relay" SMTP system (usually referred to just as a "relay") receives mail from an SMTP client and transmits it, without modification to the message data other than adding trace information, to another SMTP server for further relaying or for delivery. この仕様書では、各システムが電子メールを転送するときの役割により、4種 類のSMTPシステムを区別する。「始めの差出人」(originator)システム(SMTP オリジネータと呼ばれることもある)は、メールをインターネット、もっと一 般的に言えば配送サービス環境に放り込む。「配達」(delivery)SMTPシステム は、配送サービス環境からメールを受けとり、それをメールユーザエージェン ト(MUA)に渡したり、後でMUAがアクセスすると思われるメッセージストアに放 りこんだりする。「リレー」(relay)SMTPシステム(たいてい単に「リレー」と 呼ばれる)はSMTPクライアントからメールを受けとり、経路情報を加える以外 にメッセージデータを変更することなしに、さらなるリレーや配達のための別 のSMTPサーバへとそれを転送する。 A "gateway" SMTP system (usually referred to just as a "gateway") receives mail from a client system in one transport environment and transmits it to a server system in another transport environment. Differences in protocols or message semantics between the transport environments on either side of a gateway may require that the gateway system perform transformations to the message that are not permitted to SMTP relay systems. For the purposes of this specification, firewalls that rewrite addresses should be considered as gateways, even if SMTP is used on both sides of them (see [11]). 「ゲートウェイ」(gateway)SMTPシステム(たいてい、単に「ゲートウェイ」と 呼ばれる)は、ある配送環境にあるクライアントシステムからメールを受けと り、別の配送環境にあるサーバシステムへとそれを転送する。ゲートウェイの どちらか側における、配送環境間のプロトコルやメッセージの意味上の違いに より、ゲートウェイシステムは、SMTPリレーシステムで許されないメッセージ の変更を行う必要があるかもしれない。この仕様の目的から、両側でSMTPが使 われているにもかかわらず、アドレスを書きかえるようなファイアウォールは ゲートウェイであると考えられるべきである([11]を見よ)。 Klensin Standards Track [Page 12] RFC 2821 Simple Mail Transfer Protocol April 2001 2.3.9 Message Content and Mail Data 2.3.9 メッセージ内容とメールのデータ The terms "message content" and "mail data" are used interchangeably in this document to describe the material transmitted after the DATA command is accepted and before the end of data indication is transmitted. Message content includes message headers and the possibly-structured message body. The MIME specification [12] provides the standard mechanisms for structured message bodies. 「メッセージ内容」(message content)と「メールデータ」(mail data)は、本 文書においてはDATAコマンドが受理された後、データの終りが送信される前に 送信されるものを示すために使われ、交換可能である。メッセージ内容はメッ セージヘッダと構造化されたメッセージボディを含む。MIMEの仕様[12]は、メッ セージボディの構造化についての標準的なメカニズムを提供する。 2.3.10 Mailbox and Address 2.3.10 メールボックスとアドレス As used in this specification, an "address" is a character string that identifies a user to whom mail will be sent or a location into which mail will be deposited. The term "mailbox" refers to that depository. The two terms are typically used interchangeably unless the distinction between the location in which mail is placed (the mailbox) and a reference to it (the address) is important. An address normally consists of user and domain specifications. The standard mailbox naming convention is defined to be "local- part@domain": contemporary usage permits a much broader set of applications than simple "user names". Consequently, and due to a long history of problems when intermediate hosts have attempted to optimize transport by modifying them, the local-part MUST be interpreted and assigned semantics only by the host specified in the domain part of the address. この仕様で使われた場合、「アドレス」(address)は、メールが送られるユーザ、 あるいはメールが投函される場所を識別するための文字列である。「メールボッ クス」(mailbox)はその投函場所を示す。この2つの用語は、メールが置かれる 場所(メールボックス)か指示する先(アドレス)かの違いが重要な場合を除き、 一般に交換可能で用いられる。アドレスは普通、ユーザとドメインの詳述で成 り立つ。慣例により名付けられた標準的なメールボックスは、 "localpart@domain"と定義される:現在の用法では、単なる"ユーザ名"よりも はるかに広い応用範囲を与えている。続いて、途中のホストがそれを修正する ことで転送を最適化しようとしたときの、長い歴史ある問題のために、ローカル パートはアドレスのドメイン部で明記されたホストによってのみ意味を解釈され、 また割りあてられなければならない(MUST)。 2.3.11 Reply 2.3.11 応答 An SMTP reply is an acknowledgment (positive or negative) sent from receiver to sender via the transmission channel in response to a command. The general form of a reply is a numeric completion code (indicating failure or success) usually followed by a text string. The codes are for use by programs and the text is usually intended for human users. Recent work [34] has specified further structuring of the reply strings, including the use of supplemental and more specific completion codes. SMTP応答は、コマンドへの応答が伝送チャネルを経由して受け手から送り手へ と送られる(ポジティブかネガティブの)受け取り通知である。応答の一般的な 形式は(失敗ないし成功を表す)数字で完結するコードと、たいていそれに続き テキストの文字列である。コードはプログラムによって使われるためであり、 テキストは普通人間のユーザのためのつもりである。最近の仕事[34]では、応 答の文字列に関して、補足の利用法とより特定された完全なコードを含むさら なる構造を規定している。 2.4 General Syntax Principles and Transaction Model 2.4 一般的な構文の方針とトランザクションモデル SMTP commands and replies have a rigid syntax. All commands begin with a command verb. All Replies begin with a three digit numeric code. In some commands and replies, arguments MUST follow the verb or reply code. Some commands do not accept arguments (after the verb), and some reply codes are followed, sometimes optionally, by free form text. In both cases, where text appears, it is separated from the verb or reply code by a space character. Complete definitions of commands and replies appear in section 4. SMTPコマンドとその応答は、厳密な構文を持っている。全てのコマンドは、コ マンド動詞で始まる。すべての応答は3桁の数字のコードで始まる。いくつか のコマンドと応答では、引数が動詞か応答コードに続かなければならない (MUST)。いくつかのコマンドでは(動詞の後に)引数をとらず、いくつかの応答 では、時にオプションだが、フリーフォームのテキストが続く。どちらの場合 でも、テキストがあらわれるところでは、動詞ないし応答コードからスペース により分離される。コマンドと応答の完全な定義はセクション4にある。 Klensin Standards Track [Page 13] RFC 2821 Simple Mail Transfer Protocol April 2001 Verbs and argument values (e.g., "TO:" or "to:" in the RCPT command and extension name keywords) are not case sensitive, with the sole exception in this specification of a mailbox local-part (SMTP Extensions may explicitly specify case-sensitive elements). That is, a command verb, an argument value other than a mailbox local-part, and free form text MAY be encoded in upper case, lower case, or any mixture of upper and lower case with no impact on its meaning. This is NOT true of a mailbox local-part. The local-part of a mailbox MUST BE treated as case sensitive. Therefore, SMTP implementations MUST take care to preserve the case of mailbox local-parts. Mailbox domains are not case sensitive. In particular, for some hosts the user "smith" is different from the user "Smith". However, exploiting the case sensitivity of mailbox local-parts impedes interoperability and is discouraged. 動詞と引数の値(例えばRCPTコマンドでの"TO:"ないし"to:"や拡張された名前 のキーワード)は、メールボックスのローカルパートの仕様を除き、大文字小 文字を気にしない(SMTPの拡張では、特に大文字小文字を気にする要素であっ てもよいとされている)。つまり、コマンド動詞、メールボックスのローカル パート以外の引数の値、フリーフォームのテキストは、何ら意味上の変化を持 つことなく大文字、小文字およびそれらの混合でエンコードしてよい(MAY)。 これは、メールボックスのローカルパートについては真実ではない。メールボッ クスのローカルパートは、大文字小文字を気にするものとして扱わねばならな い(MUST)。すなわち、SMTPの実装では、メールボックスのローカルパートの大 文字小文字の区別は保存されるように気にしなければならない(MUST)。メール ボックスのドメインは大文字小文字を気にしない。特に、いくつかのホストで は"smith"というユーザは、"Smith"というユーザト異なる。にもかかわらず、 メールボックスのローカルパートで大文字小文字の区別を活かすことは相互運 用性を妨げ、思いとどまる。 A few SMTP servers, in violation of this specification (and RFC 821) require that command verbs be encoded by clients in upper case. Implementations MAY wish to employ this encoding to accommodate those servers. いくつかのSMTPサーバは、クライアントによるコマンド動詞は大文字でエンコー ドされねばならないという、この仕様(とRFC 821)に違反した要求をする。 実装では、これらのサーバに適応するエンコードを採用することを望んでもよ い(MAY)。 The argument field consists of a variable length character string ending with the end of the line, i.e., with the character sequence . The receiver will take no action until this sequence is received. 引数フィールドは、行の終り、つまり文字の連続で終わる可変長の文字 列から成る。受信者は、この連続を受けとるまで何もしないだろう。 The syntax for each command is shown with the discussion of that command. Common elements and parameters are shown in section 4.1.2. それぞれのコマンドの構文をそのコマンドに関する議論と共に表す。共通の要 素とパラメータについては、セクション 4.1.2に示す。 Commands and replies are composed of characters from the ASCII character set [1]. When the transport service provides an 8-bit byte (octet) transmission channel, each 7-bit character is transmitted right justified in an octet with the high order bit cleared to zero. More specifically, the unextended SMTP service provides seven bit transport only. An originating SMTP client which has not successfully negotiated an appropriate extension with a particular server MUST NOT transmit messages with information in the high-order bit of octets. If such messages are transmitted in violation of this rule, receiving SMTP servers MAY clear the high-order bit or reject the message as invalid. In general, a relay SMTP SHOULD assume that the message content it has received is valid and, assuming that the envelope permits doing so, relay it without inspecting that content. Of course, if the content is mislabeled and the data path cannot accept the actual content, this may result in ultimate delivery of a severely garbled message to the recipient. Delivery SMTP systems MAY reject ("bounce") such messages rather than deliver them. No sending SMTP system is permitted to send envelope commands in any character Klensin Standards Track [Page 14] RFC 2821 Simple Mail Transfer Protocol April 2001 set other than US-ASCII; receiving systems SHOULD reject such commands, normally using "500 syntax error - invalid character" replies. コマンドと応答は、ASCII文字セット[1]の文字で出来ている。8bitバイト(オ クテット)の転送チャネルが転送サービスによって提供されているときには、 それぞれの7bit文字は、上位のビットを0にクリアしたオクテットにして転送 する。より特殊には、拡張されていないSMTPサービスでは7ビットの転送しか 提供されていない。特定のサーバで、適切な拡張についての取り決めが成功し ていない場合、最初のSMTPクライアントは、オクテットの上位ビットに情報を 含むような転送メッセージを送出してはならない(MUST NOT)。もし、このルー ルに反してそのようなメッセージが送出されたならば、受けとったSMTPサーバ は上位ビットをクリアしてもよいし、不正なメッセージとして拒否してもよい (MAY)。一般に、リレーするSMTPは、その受けとったメッセージ内容が有効で あり、エンベロープにそれを許可するように書かれており、内容を検査するこ となるリレーするべきである(SHOULD)。もちろん、内容がラベルされておらず、 データパスが実際の内容から許容できず、これが最終的には、受け手に対し、 深刻にねじ曲げられたメッセージを配送する結果になるかもしれない。配送の SMTPシステムは、配送するよりむしろそのようなメッセージを拒否(はねる: bounce)しても良い(MAY)。どのSMTPシステムも、US-ASCII以外の文字セットを エンベロープコマンドで送出することを許されていない;受けとったシステム はそのようなコマンドを拒否すべき(SHOULD)であり、普通 "500 syntax error - invalid character" の応答を用いる。 Eight-bit message content transmission MAY be requested of the server by a client using extended SMTP facilities, notably the "8BITMIME" extension [20]. 8BITMIME SHOULD be supported by SMTP servers. However, it MUST not be construed as authorization to transmit unrestricted eight bit material. 8BITMIME MUST NOT be requested by senders for material with the high bit on that is not in MIME format with an appropriate content-transfer encoding; servers MAY reject such messages. 8bitメッセージ内容の転送は、特筆すべき"8ビットMIME"拡張による拡張SMTP の機能を用い、クライアントがサーバに要求してもよい(MAY)。8ビットMIMEは SMTPサーバにサポートされるべきである(SHOULD)。しかしながら、そのことを 無制限な8ビットのものを転送することが公認されたと解釈してはならない (MUST NOT)。内容を転送するためのエンコードを適切にしたMIMEフォーマット ではない、上位ビットがあるデータを送り手は8ビットMIMEとして要求しては ならない;サーバはそのようなメッセージを拒否してよい(MAY)。 The metalinguistic notation used in this document corresponds to the "Augmented BNF" used in other Internet mail system documents. The reader who is not familiar with that syntax should consult the ABNF specification [8]. Metalanguage terms used in running text are surrounded by pointed brackets (e.g., ) for clarity. 本文書中、メタ言語による表記法は別のインターネットメールシステムに関す る文書中で使われる "Augmented BNF"に対応して使われる。その構文に慣れて いない読者はABNFの仕様[8]を見るべきである。続くテキストで使われるメタ 言語の用語は、明確にするためにとがったブラケット(例えば)で囲まれ ている。 3. The SMTP Procedures: An Overview 3. SMTPの手続き:俯瞰 This section contains descriptions of the procedures used in SMTP: session initiation, the mail transaction, forwarding mail, verifying mailbox names and expanding mailing lists, and the opening and closing exchanges. Comments on relaying, a note on mail domains, and a discussion of changing roles are included at the end of this section. Several complete scenarios are presented in appendix D. このセクションには、SMTPで使われる手続きの記述が含まれる:セッションの 初期化、メールトランザクション、メールの送出、メールボックス名の確認、 メーリングリストへの展開、交換のオープンとクローズ。リレーについてのコ メント、メールドメインについてのメモ、役割り変更に関する議論は本セクショ ンの最後に含まれている。いくつかの完全なシナリオはappendix Dにある。 3.1 Session Initiation 3.1 セッションの初期化 An SMTP session is initiated when a client opens a connection to a server and the server responds with an opening message. クライアントがサーバにコネクションを開き、サーバがオープニングメッセー ジで応答したとき、SMTPセッションは初期化される。 SMTP server implementations MAY include identification of their software and version information in the connection greeting reply after the 220 code, a practice that permits more efficient isolation and repair of any problems. Implementations MAY make provision for SMTP servers to disable the software and version announcement where it causes security concerns. While some systems also identify their contact point for mail problems, this is not a substitute for maintaining the required "postmaster" address (see section 4.5.1). SMTPサーバの実装で、220コードにつづくコネクションへの挨拶応答に、より 有効な分離と問題解決の実行のためにそのソフトウェア識別子とバージョン情 報を含んでもよい(MAY)。実装上、SMTPサーバに、セキュリティ上の観点から ソフトウェアとバージョンのアナウンスをできなくする機能を供給してもよい (MAY)。いくつかのシステムではまた、メールに関する問題の連絡先を識別す るが、これは要求された"postmaster"アドレスを管理することの置きかえとは ならない(セクション4.5.1を見よ)。 The SMTP protocol allows a server to formally reject a transaction while still allowing the initial connection as follows: a 554 response MAY be given in the initial connection opening message instead of the 220. A server taking this approach MUST still wait for the client to send a QUIT (see section 4.1.1.10) before closing the connection and SHOULD respond to any intervening commands with Klensin Standards Track [Page 15] RFC 2821 Simple Mail Transfer Protocol April 2001 "503 bad sequence of commands". Since an attempt to make an SMTP connection to such a system is probably in error, a server returning a 554 response on connection opening SHOULD provide enough information in the reply text to facilitate debugging of the sending system. SMTPプロトコルでは、まだ初期の接続が以下のように許可されている間に、サー バが正式にトランザクションを拒否することができる:最初の接続のオープニ ングメッセージで、220の代わりに、554の応答を与える。このアプローチを取 るサーバは、コネクションを閉じる前にクライアントがQUIT(セクション 4.1.1.10を見よ)を送ってくるまで待たなければならず(MUST)、その間に来る すべてのコマンドに"503 bad sequence of commands"を返すべきである。その ようなシステムにSMTPコネクションをはろうと試みるのはおそらくエラーであ るから、コネクション開始時に554の応答を返すサーバは、送ったシステムの デバッグに役立つテキスト応答で十分な情報を提供すべきである(SHOULD)。 3.2 Client Initiation 3.2 クライアントの初期化 Once the server has sent the welcoming message and the client has received it, the client normally sends the EHLO command to the server, indicating the client's identity. In addition to opening the session, use of EHLO indicates that the client is able to process service extensions and requests that the server provide a list of the extensions it supports. Older SMTP systems which are unable to support service extensions and contemporary clients which do not require service extensions in the mail session being initiated, MAY use HELO instead of EHLO. Servers MUST NOT return the extended EHLO-style response to a HELO command. For a particular connection attempt, if the server returns a "command not recognized" response to EHLO, the client SHOULD be able to fall back and send HELO. 一旦サーバが歓迎メッセージを送りクライアントがそれを受けとったならば、 クライアントは普通、クライアントの識別子を示したEHLOコマンドをサーバに 送る。EHLOが利用されると、セッションのオープンに加え、クライアントが拡 張サービスの方法が可能であり、サーバがサポートする拡張リストを提供する ような要求を示す。拡張サービスが利用できない古いSMTPシステムや、メール セッションの初期化段階で拡張サービスを要求しないそのころのクライアント では、EHLOの代わりにHELOを使ってもよい(MAY)。サーバは、HELOコマンドに 対しては拡張されたEHLOスタイルの応答を返してはならない(MUST NOT)。特別 な接続の試みとして、サーバがEHLOに対して"command not recognized" 応答 を返した場合には、クライアントは古い版の動作をし、HELOを送出できるべき である(SHOULD)。 In the EHLO command the host sending the command identifies itself; the command may be interpreted as saying "Hello, I am " (and, in the case of EHLO, "and I support service extension requests"). EHLOコマンドでは、ホストは自身を識別するコマンドを送る;コマンドは次の ように解釈されるかもしれない 「こんにちは、私は です」(そして EHLOの場合には「私は拡張サービスリクエストをサポートしています」) 3.3 Mail Transactions 3.3 メールトランザクション There are three steps to SMTP mail transactions. The transaction starts with a MAIL command which gives the sender identification. (In general, the MAIL command may be sent only when no mail transaction is in progress; see section 4.1.4.) A series of one or more RCPT commands follows giving the receiver information. Then a DATA command initiates transfer of the mail data and is terminated by the "end of mail" data indicator, which also confirms the transaction. SMTPメールトランザクションには3つのステップがある。トランザクションは、 送り手の識別を与えるMAILコマンドで始まる。(一般に、メールトランザクショ ンが進行中でない場合だけ、MAILコマンドは送られるだろう;セクション 4.1.4を見よ)。受け手の情報を与える一連の1つないしそれ以上のRCPTコマン ドが続く。そして、DATAコマンドはメールデータの転送の初期化を行い、これ またトランザクションで確認される"end of mail"の指示で終わる。 The first step in the procedure is the MAIL command. 手続き中、最初のステップはMAILコマンドである。 MAIL FROM: [SP ] This command tells the SMTP-receiver that a new mail transaction is starting and to reset all its state tables and buffers, including any recipients or mail data. The portion of the first or only argument contains the source mailbox (between "<" and ">" brackets), which can be used to report errors (see section 4.2 for a discussion of error reporting). If accepted, the SMTP server returns a 250 OK reply. If the mailbox specification is not acceptable for some reason, the server MUST return a reply indicating whether the Klensin Standards Track [Page 16] RFC 2821 Simple Mail Transfer Protocol April 2001 failure is permanent (i.e., will occur again if the client tries to send the same address again) or temporary (i.e., the address might be accepted if the client tries again later). Despite the apparent scope of this requirement, there are circumstances in which the acceptability of the reverse-path may not be determined until one or more forward-paths (in RCPT commands) can be examined. In those cases, the server MAY reasonably accept the reverse-path (with a 250 reply) and then report problems after the forward-paths are received and examined. Normally, failures produce 550 or 553 replies. このコマンドは、新しいメールトランザクションが始まり、メール送信先やデー タを含む、すべての状態テーブルとバッファをリセットすることをSMTPの受け 手に伝える。最初ないし唯一の引数であるの部分は、起源とな るメールボックス(ブラケット"<"と">"にはさまれる)を持ち、エラー報告に使 われ得る(セクション4.2 エラーの報告の議論を見よ)。もし受け入れられたら、 SMTPサーバは 250 OK の応答を返す。何らかの理由によりメールボックスの仕 様が受けいれられないものであった場合、サーバは、失敗が永続的なもの(そ のクライアントが同じアドレスで再び送る試みをしてもまた起こる)か、一時 的なもの(あとでそのクライアントた試したとき、受けいれられるかもしれな い)かを示して応答を返さなければならない(MUST)。この要求の明確な意図に かかわらず、1つないし複数のforward-pathが(RCPTコマンドによって)確認で きるまで、reverse-pathの受容可能性が決定できない状況が存在する。その場 合、サーバは合理的に(250応答により)reverse-pathを受容し、そして forward-pathを受信し、確認してから問題を報告してもよい(MAY)。普通、手 続きの失敗には550ないし553を返す。 Historically, the can contain more than just a mailbox, however, contemporary systems SHOULD NOT use source routing (see appendix C). 歴史的に、は単なるメールボックス以上のものを持つことがで きるが、現代のシステムではソースルーティングを使うべきではない(SHOULD NOT)(Appendix Cを見よ)。 The optional are associated with negotiated SMTP service extensions (see section 2.2). オプションのは取り決められたSMTP拡張サービスに関連す る。 The second step in the procedure is the RCPT command. 手続き中、第2のステップはRCPTコマンドである。 RCPT TO: [ SP ] The first or only argument to this command includes a forward-path (normally a mailbox and domain, always surrounded by "<" and ">" brackets) identifying one recipient. If accepted, the SMTP server returns a 250 OK reply and stores the forward-path. If the recipient is known not to be a deliverable address, the SMTP server returns a 550 reply, typically with a string such as "no such user - " and the mailbox name (other circumstances and reply codes are possible). This step of the procedure can be repeated any number of times. このコマンドの最初ないし唯一の引数は、1つの受け手を識別する forward-path(普通メールボックスとドメインで、常に"<"と">"かっこで囲ま れる)を含む。もし受け入れられたなら、SMTPサーバは250 OKを返し、 forward-pathを記録する。もし受け手が配送可能なアドレスではないことを知っ ているなら、SMTPサーバは、典型的には"no such user -"のような文字列とメー ルボックス名をつけて550応答を返す(別の事情と応答コードも可能である)。 手続き中、このステップは何度でも繰り返すことができる。 The can contain more than just a mailbox. Historically, the can be a source routing list of hosts and the destination mailbox, however, contemporary SMTP clients SHOULD NOT utilize source routes (see appendix C). Servers MUST be prepared to encounter a list of source routes in the forward path, but SHOULD ignore the routes or MAY decline to support the relaying they imply. Similarly, servers MAY decline to accept mail that is destined for other hosts or systems. These restrictions make a server useless as a relay for clients that do not support full SMTP functionality. Consequently, restricted-capability clients MUST NOT assume that any SMTP server on the Internet can be used as their mail processing (relaying) site. If a RCPT command appears without a previous MAIL command, the server MUST return a 503 "Bad sequence of commands" response. The optional are associated with negotiated SMTP service extensions (see section 2.2). は単なるメールボックス以上のものを持つことができる。歴史 的に、はホストのソースルーティングリストや配送先のメール ボックスであることが可能だが、今のSMTPクライアントはソールスーティング を利用すべきでない(SHOULD NOT)(appendix Cを見よ)。サーバはforward-path にソースルーティングのリストが現れるのに準備しておかねばならない(MUST) が、そのルートを無視すべき(SHOULD)、ないしそれを含むリレーを拒否しても よい(MAY)。似た状況で、サーバはほかのホストやシステムへ向けられたメー ルを受けとることを拒否してもよい(MAY)。これらの制限により、完全にSMTP 機能をサポートしないクライアントのためにリレーするサーバとしては役立た ずになる。それゆえ、制限された機能のクライアントは、インターネット上に あるどのSMTPサーバもそのメールをさばける(リレーする)サイトとして使える と仮定してはならない(MUST NOT)。もしもRCPTコマンドが先行するMAILコマン ドなしで現れたなら、サーバは503 "Bad sequence of commands"応答を返さな ければならない(MUST)。オプションのは、取り決められた SMTP拡張サービスに関連する(セクション2.2を見よ)。 The third step in the procedure is the DATA command (or some alternative specified in a service extension). 手続き中、第3のステップはDATAコマンドである(あるいは、サービス拡張で の代替の仕様である) Klensin Standards Track [Page 17] RFC 2821 Simple Mail Transfer Protocol April 2001 DATA If accepted, the SMTP server returns a 354 Intermediate reply and considers all succeeding lines up to but not including the end of mail data indicator to be the message text. When the end of text is successfully received and stored the SMTP-receiver sends a 250 OK reply. もし受容されたら、SMTPサーバは354 Intermidiate(途中)の応答を返し、メッ セージテキスト中のメールの終りを示すデータ以外を、すべて続く行であると 考える。テキストの終りがうまく受信され、SMTP受信者に蓄積されれば、250 OK応答が送られる。 Since the mail data is sent on the transmission channel, the end of mail data must be indicated so that the command and reply dialog can be resumed. SMTP indicates the end of the mail data by sending a line containing only a "." (period or full stop). A transparency procedure is used to prevent this from interfering with the user's text (see section 4.5.2). メールデータは転送チャネルで送られるので、コマンドと応答のやりとりを再 開するため、メールの終りのデータが示されなければならない。SMTPでは、 "."(ピリオド あるいは full stop)だけを含む行を送ることでメールデータの 終りが示される。ユーザのテキストの影響を避けるのに透明手続きが使われる (セクション4.5.2を見よ)。 The end of mail data indicator also confirms the mail transaction and tells the SMTP server to now process the stored recipients and mail data. If accepted, the SMTP server returns a 250 OK reply. The DATA command can fail at only two points in the protocol exchange: メールデータの終りのインジケータはまた、メールトランザクションを確認し、 SMTPサーバに、現在のプロセスが受信者とメールデータを処理するように伝え る。もし受容されたら、SMTPサーバは250 OKの応答を返す。DATAコマンドは、 プロトコル交換で2つの点でのみ、失敗し得る。 - If there was no MAIL, or no RCPT, command, or all such commands were rejected, the server MAY return a "command out of sequence" (503) or "no valid recipients" (554) reply in response to the DATA command. If one of those replies (or any other 5yz reply) is received, the client MUST NOT send the message data; more generally, message data MUST NOT be sent unless a 354 reply is received. もしMAILかRCPTコマンドがない、あるいはすべてのそのようなコマンドが拒否 された場合、サーバはDATAコマンドに対するレスポンスとして、"command out of sequence"(503)ないし"no valid recipients" (554)応答を返してもよい (MAY)。もしそれらの応答の1つ(あるいはどんな5yzの応答でも)を受けとった なら、クライアントはメッセージデータを送信してはならない(MUST NOT);よ り一般的に、メッセージデータは、354応答を受信しない限り送ってはならな い(MUST NOT)。 - If the verb is initially accepted and the 354 reply issued, the DATA command should fail only if the mail transaction was incomplete (for example, no recipients), or if resources were unavailable (including, of course, the server unexpectedly becoming unavailable), or if the server determines that the message should be rejected for policy or other reasons. もし動詞が最初に承諾されて354の応答が発行された場合、メールトランザク ションが不完全であった場合(例えば受け取り人がいない)、またはリソースが 利用できない場合(もちろん、サーバが予期せず利用できなくなった場合を含 む)、そのメッセージはポリシー、あるいはその他の理由で拒否すべきである と決定した場合に限り、DATAコマンドが失敗するべきである。 However, in practice, some servers do not perform recipient verification until after the message text is received. These servers SHOULD treat a failure for one or more recipients as a "subsequent failure" and return a mail message as discussed in section 6. Using a "550 mailbox not found" (or equivalent) reply code after the data are accepted makes it difficult or impossible for the client to determine which recipients failed. にもかかわらず、実際にはいくつかのサーバはメッセージテキストを受けとる まで受け取り手の確認をしない。これらのサーバは1つないしより多くの受け 取り手のエラーを"subsequent failure" (後に続くエラー)として扱い、メー ルメッセージをセクション6で議論しているように返すべきである(SHOULD)。 DATAの後に"550 mailbox not found" (あるいは同等のもの)の応答コードを用 いると、クライアントにとって、どの受け手が失敗したのか決定するのが困難 ないし不可能になる。 When RFC 822 format [7] is being used, the mail data include the memo header items such as Date, Subject, To, Cc, From [32]. Server SMTP systems SHOULD NOT reject messages based on perceived defects in the RFC 822 or MIME [12] message header or message body. In particular, they MUST NOT reject messages in which the numbers of Resent-fields Klensin Standards Track [Page 18] RFC 2821 Simple Mail Transfer Protocol April 2001 do not match or Resent-to appears without Resent-from and/or Resent- date. RFC 822のフォーマット[7]が使われたとき、メールにはDate, Subject, To, Cc, From[32]のようなメモヘッダアイテムが含まれる。SMTPサーバシステムは RFC 822ないしMIME[12]メッセージヘッダやメッセージボディの欠点によって、 メッセージを拒否するべきではない(SHOULD NOT)。特に、Resent-fieldsの数 が一致しない、Resent-toがResent-from や Resent-dateなしで使われている メッセージを拒否してはならない(MUST NOT)。 Mail transaction commands MUST be used in the order discussed above. メールトランザクションコマンドは、上で議論した順番で使われなければなら ない(MUST)。 3.4 Forwarding for Address Correction or Updating 3.4 アドレスの修正やアップデートのために転送すること Forwarding support is most often required to consolidate and simplify addresses within, or relative to, some enterprise and less frequently to establish addresses to link a person's prior address with current one. Silent forwarding of messages (without server notification to the sender), for security or non-disclosure purposes, is common in the contemporary Internet. 転送サポートは、いくつかの会社の合併や内部のアドレスを比較的簡略化する のに最もよく使われ、また、ある人のより重要なアドレスと現在のアドレスと のリンクを確立するのにたまに使われる。メッセージを静かに転送すること (サーバが送り主に知らせることなく)は、セキュリティや情報開示を避ける目 的で、今日のインターネットでは一般的である。 In both the enterprise and the "new address" cases, information hiding (and sometimes security) considerations argue against exposure of the "final" address through the SMTP protocol as a side-effect of the forwarding activity. This may be especially important when the final address may not even be reachable by the sender. Consequently, the "forwarding" mechanisms described in section 3.2 of RFC 821, and especially the 251 (corrected destination) and 551 reply codes from RCPT must be evaluated carefully by implementers and, when they are available, by those configuring systems. 会社と「新しいアドレス」の場合両方において、情報を隠すこと(時にセキュ リティ)の考察は、転送活動の副作用として、SMTPプロトコルを通じて「最終 の」アドレスが公開されないことを論ずる。最終アドレスが送り主にとって、 到達可能でさえないかもしれないとき、これは特に重要である。それゆえ、 RFC 821のセクション 3.2に書かれた「転送」メカニズムと、特にRCPTからの 251(修正された宛て先)と551の応答コードについては、実装者と、それが可能 な時はシステムを設定する人によって、注意深く評価されねばならない。 In particular: 特に、 * Servers MAY forward messages when they are aware of an address change. When they do so, they MAY either provide address-updating information with a 251 code, or may forward "silently" and return a 250 code. But, if a 251 code is used, they MUST NOT assume that the client will actually update address information or even return that information to the user. アドレスが変更されたことに気づいたとき、サーバはメッセージを転送しても よい(MAY)。そうした場合、サーバはアドレスが更新された情報を251コードと 共に提供するか、「静かに」転送して250コードを返すかしてよい(MAY)。しか しながら、もし251コードを用いたなら、クライアントが実際にアドレス情報 を更新したり、あまつさえその情報をユーザに返したりすることを仮定しては ならない(MUST NOT)。 Alternately, 他方、 * Servers MAY reject or bounce messages when they are not deliverable when addressed. When they do so, they MAY either provide address-updating information with a 551 code, or may reject the message as undeliverable with a 550 code and no address-specific information. But, if a 551 code is used, they MUST NOT assume that the client will actually update address information or even return that information to the user. 配送不能アドレスに向けられたとき、サーバはメッセージを拒否したり、跳ね 返したりしてもよい(MAY)。そうする場合、 サーバは551コードでアップデートされたアドレスの情報を提供しても良いし、 550コードと配送不能メッセージをもって拒否し、アドレスを特定する情報を 出さなくてもよい(MAY)。しかしながら、もし551コードを用いた場合、クライ アントが実際にアドレス情報をアップデートしたり、ユーザにその情報を返し たりさえすることを仮定してはならない(MUST NOT)。 SMTP server implementations that support the 251 and/or 551 reply codes are strongly encouraged to provide configuration mechanisms so that sites which conclude that they would undesirably disclose information can disable or restrict their use. SMTPサーバの実装では、251と/または551の応答コードをサポートすることが 設定メカニズムを提供するために強く推奨されているので、サイトは、サーバ が望ましくなく情報を公開する結果となるので、不許可にしたりその使用を制 限したりできる。 Klensin Standards Track [Page 19] RFC 2821 Simple Mail Transfer Protocol April 2001 3.5 Commands for Debugging Addresses 3.5 デバッグアドレスのためのコマンド 3.5.1 Overview 3.5.1 俯瞰 SMTP provides commands to verify a user name or obtain the content of a mailing list. This is done with the VRFY and EXPN commands, which have character string arguments. Implementations SHOULD support VRFY and EXPN (however, see section 3.5.2 and 7.3). SMTPはユーザ名を確認したりメーリングリストの中身を手に入れるためのコマ ンドを提供する。これはVRFYとEXPNコマンドによってなされ、文字列の引数を とる。実装は(セクション3.5.2と7.3にかかわらず)VRFYとEXPNをサポートすべ きである(SHOULD)。 For the VRFY command, the string is a user name or a user name and domain (see below). If a normal (i.e., 250) response is returned, the response MAY include the full name of the user and MUST include the mailbox of the user. It MUST be in either of the following forms: VRFYコマンドで、文字列はユーザ名か、ユーザ名とドメイン(以下を見よ)であ る。普通の(例:250)応答が返ったなら、応答はユーザのフルネームを含んで いてもよく(MAY)、またそのユーザのメールボックスを含まなければならない (MUST)。それは、以下の形式のいずれかでなければならない(MUST): User Name local-part@domain When a name that is the argument to VRFY could identify more than one mailbox, the server MAY either note the ambiguity or identify the alternatives. In other words, any of the following are legitimate response to VRFY: VRFYへの引数の名前が1つを超えるメールボックスを識別するとき、サーバは あいまい(ambiguous)であると注意をするか、いずれかを返すかしてよい(MAY)。 いいかえれば、以下のいずれもVRFYへの正式な応答である: 553 User ambiguous or 553- Ambiguous; Possibilities are 553-Joe Smith 553-Harry Smith 553 Melvin Smith or 553-Ambiguous; Possibilities 553- 553- 553 Under normal circumstances, a client receiving a 553 reply would be expected to expose the result to the user. Use of exactly the forms given, and the "user ambiguous" or "ambiguous" keywords, possibly supplemented by extended reply codes such as those described in [34], will facilitate automated translation into other languages as needed. Of course, a client that was highly automated or that was operating in another language than English, might choose to try to translate the response, to return some other indication to the user than the Klensin Standards Track [Page 20] RFC 2821 Simple Mail Transfer Protocol April 2001 literal text of the reply, or to take some automated action such as consulting a directory service for additional information before reporting to the user. 普通の環境では、553応答を受けとったクライアントはユーザに結果を説明す ることが期待される。与えられた正確な形式である"user ambiguous"か "ambiguous"というキーワードや、[34]に解説されているような拡張応答コー ドにより提供可能なものを利用することは、必要に応じて自動翻訳するのを楽 にする。もちろん、高度に自動化されたり英語以外の言語で運用されるクライ アントは応答を翻訳しようとすることを選ぶかもしれず、また、応答テキスト 通り以上の他の表示をユーザに返すか、ユーザに報告する前に、さらなる情報 をディレクトリサービスに問いあわせるような何らかの自動アクションをとる かもしれない。 For the EXPN command, the string identifies a mailing list, and the successful (i.e., 250) multiline response MAY include the full name of the users and MUST give the mailboxes on the mailing list. EXPNコマンドでは、文字列はメーリングリストを識別し、成功(例えば250)の 複数行の応答はユーザのフルネームを含んでいるかもしれず(MAY)、メーリン グリストにあるメールボックスを与えなければならない(MUST)。 In some hosts the distinction between a mailing list and an alias for a single mailbox is a bit fuzzy, since a common data structure may hold both types of entries, and it is possible to have mailing lists of one mailbox. If a request is made to verify a mailing list, a positive response MAY be given if a message so addressed would be delivered to everyone on the list, otherwise an error SHOULD be reported (e.g., "550 That is a mailing list, not a user" or "252 Unable to verify members of mailing list"). If a request is made to expand a user name, the server MAY return a positive response consisting of a list containing one name, or an error MAY be reported (e.g., "550 That is a user name, not a mailing list"). いくつかのホストでは、双方の型が共通のデータ構造を持つのと、1つのメー ルボックスのメーリングリストを持つことが可能であることから、メーリング リストと1つのメールボックスへの別名の区別がいささかあいまいである。 もし要求がメーリングリストへのverify(VRFY)なら、向けられたメッセージが リストの全員に配送されるならポジティブな応答を与えてもよく(MAY)、さも なくばエラーが報告されるべきである(SHOULD)(例えば、550 これはメーリン グリストでありユーザではない、あるいは 252 メーリングリストメンバーの VRFYは不可能)。もし要求がユーザ名へのexpand(EXPN)なら、サーバは1つの名 前を持つリストからなるポジティブな応答を返してもよい(MAY)し、エラーが 報告されてもよい(MAY)(例えば 550 これはユーザ名であり、メーリングリス トではない)。 In the case of a successful multiline reply (normal for EXPN) exactly one mailbox is to be specified on each line of the reply. The case of an ambiguous request is discussed above. 複数行の応答が成功した場合(EXPNの標準的な場合)、正確に1つのメールボッ クスが応答のそれぞれの行に明記される。あいまい(ambiguous)な要求の場合 は上で議論した通りである。 "User name" is a fuzzy term and has been used deliberately. An implementation of the VRFY or EXPN commands MUST include at least recognition of local mailboxes as "user names". However, since current Internet practice often results in a single host handling mail for multiple domains, hosts, especially hosts that provide this functionality, SHOULD accept the "local-part@domain" form as a "user name"; hosts MAY also choose to recognize other strings as "user names". "User name"はファジーな言葉であり、故意に用いてきた。VRFYやEXPNコマン ドの実装では、"user names"として少なくともローカルなメールボックスと認 識できるものを含まなければならない。しかしながら、現在のインターネット の実際ではしばしば1つのホストが複数のドメインのメールを扱うことになる。 ホスト、特にこの機能を提供するホストは"user name"として "local-part@domain"の形式を受けいれるべきである(SHOULD);ホストはまた、 "user name"として他の文字列を解釈することを選んでもよい(MAY)。 The case of expanding a mailbox list requires a multiline reply, such as: メーリングリストの展開の場合は、次のように複数行の応答を要求する: C: EXPN Example-People S: 250-Jon Postel S: 250-Fred Fonebone S: 250 Sam Q. Smith or C: EXPN Executive-Washroom-List S: 550 Access Denied to You. Klensin Standards Track [Page 21] RFC 2821 Simple Mail Transfer Protocol April 2001 The character string arguments of the VRFY and EXPN commands cannot be further restricted due to the variety of implementations of the user name and mailbox list concepts. On some systems it may be appropriate for the argument of the EXPN command to be a file name for a file containing a mailing list, but again there are a variety of file naming conventions in the Internet. Similarly, historical variations in what is returned by these commands are such that the response SHOULD be interpreted very carefully, if at all, and SHOULD generally only be used for diagnostic purposes. VRFYとEXPNの文字列引数は、ユーザ名やメールボックスのリストについての概 念からいろいろな実装があり、さらなる制限を課すことはできない。いくつか のシステムでは、メーリングリストの内容を持っているファイルのファイル名 EXPNコマンドの引数として代用するかもしれないが、再度言うと、インターネッ トではいろいろなファイル名の慣習がある。似たものとして、これらのコマン ドで返される歴史的な種類から、応答は非常に注意深く解釈されるべき (SHOULD)であり、一般に対話の目的としてのみ用いられるべきである。 3.5.2 VRFY Normal Response 3.5.2 VRFYの一般的応答 When normal (2yz or 551) responses are returned from a VRFY or EXPN request, the reply normally includes the mailbox name, i.e., "", where "domain" is a fully qualified domain name, MUST appear in the syntax. In circumstances exceptional enough to justify violating the intent of this specification, free-form text MAY be returned. In order to facilitate parsing by both computers and people, addresses SHOULD appear in pointed brackets. When addresses, rather than free-form debugging information, are returned, EXPN and VRFY MUST return only valid domain addresses that are usable in SMTP RCPT commands. Consequently, if an address implies delivery to a program or other system, the mailbox name used to reach that target MUST be given. Paths (explicit source routes) MUST NOT be returned by VRFY or EXPN. VRFYやEXPN要求に対して普通の(2yzないし551)応答が返ったとき、一般に、例 えば ""、ここで、"domain"はFQDN(完全修飾されたド メイン名)のように、メールボックス名が構文中に現れる応答が含まれなけ ればならない(MUST)。この規定の意図を破るのが正当化できるに十分な例外的 環境では、フリーフォームのテキストが返されるかもしれない(MAY)。コンピュー タ、人間双方にとって文法解釈を楽にするために、アドレスはかくかっこ(<>) 内にあらわれるべきである(SHOULD)。フリーフォームのデバッグ情報というよ りむしろアドレスが返された場合には、EXPNとVRFYはSMTP RCPTコマンドで使 える有効なドメインアドレスのみを返さなければならない(MUST)。したがって、 もし、あるアドレスがプログラムや別のシステムへの配送を意味する場合には、 その宛て先への到達に使われるメールボックス名が与えられなければならない (MUST)。パス(明確なソースルーティング)はVRFYやEXPNに対して返してはなら ない(MUST NOT). Server implementations SHOULD support both VRFY and EXPN. For security reasons, implementations MAY provide local installations a way to disable either or both of these commands through configuration options or the equivalent. When these commands are supported, they are not required to work across relays when relaying is supported. Since they were both optional in RFC 821, they MUST be listed as service extensions in an EHLO response, if they are supported. サーバの実装では、VRFYとEXPN双方をサポートすべきである(SHOULD)。セキュ リティ上の理由から、これらのコマンドのいずれか、ないし双方を、設定オプ ションやそれに類するものにより無効化する方法を、ローカルのインストール のために提供してもよい(MAY)。これらのコマンドがサポートされたとき、リ レーがサポートされている場合にこれらのコマンドが、リレーを越えて動作す ることは要求されない。RFC 821では双方ともオプションであるから、もしサ ポートされているなら、サービスの拡張としてEHLO応答にリストされなければ ならない(MUST)。 3.5.3 Meaning of VRFY or EXPN Success Response 3.5.3 VRFYやEXPNの成功応答の意味 A server MUST NOT return a 250 code in response to a VRFY or EXPN command unless it has actually verified the address. In particular, a server MUST NOT return 250 if all it has done is to verify that the syntax given is valid. In that case, 502 (Command not implemented) or 500 (Syntax error, command unrecognized) SHOULD be returned. As stated elsewhere, implementation (in the sense of actually validating addresses and returning information) of VRFY and EXPN are strongly recommended. Hence, implementations that return 500 or 502 for VRFY are not in full compliance with this specification. サーバは、実際にアドレスを確認することなくVRFYやEXPNコマンドに対して 250コードの応答を返してはならない(MUST NOT)。特に、コマンドでなされた すべてが、与えられた構文が有効であると確認されただけで250を返してはな らない(MUST NOT)。その場合、502(コマンドは実装されていない)か500(構文 エラー、コマンドは理解されなかった)が返されるべきである(SHOULD)。他で 延べたように、VRFYとEXPNの実装(実際にアドレスを確認して情報を返すとい う意味で)は強く推奨される。それゆえ、VRFYに対して500や502を返す実装は この規定に完全には準拠していない。 Klensin Standards Track [Page 22] RFC 2821 Simple Mail Transfer Protocol April 2001 There may be circumstances where an address appears to be valid but cannot reasonably be verified in real time, particularly when a server is acting as a mail exchanger for another server or domain. "Apparent validity" in this case would normally involve at least syntax checking and might involve verification that any domains specified were ones to which the host expected to be able to relay mail. In these situations, reply code 252 SHOULD be returned. These cases parallel the discussion of RCPT verification discussed in section 2.1. Similarly, the discussion in section 3.4 applies to the use of reply codes 251 and 551 with VRFY (and EXPN) to indicate addresses that are recognized but that would be forwarded or bounced were mail received for them. Implementations generally SHOULD be more aggressive about address verification in the case of VRFY than in the case of RCPT, even if it takes a little longer to do so. アドレスが有効に見えるが、特に、サーバが別のサーバやドメインのメールエ クスチェンジャとして動作していて、合理的にリアルタイムに確認できない場 合があるかもしれない。この場合、"Apparent validity"(明白な有効性)は、 普通少なくとも構文チェックと、おそらく規定されたドメインが、このホスト がメールをリレーすることができると期待されるものであることの確認を含む。 これらの場合、応答コード252が返されるべきである(SHOULD)。こういった場 合は、セクション2.1で議論した、RCPTの確認に関する議論とパラレルである。 似た場合で、VRFY(とEXPN)で、解釈されたが受けとったメールが転送ないしバ ウンスされたアドレスであることをを示す応答コード251と551の使用について は、セクション3.4が適用される。実装は一般に、RCPTの場合と比較してVRFY の場合のアドレスの確認の方が、そうすることで若干長い時間がかかるとして も、より挑戦的であるべきである(SHOULD)。 3.5.4 Semantics and Applications of EXPN 3.5.4 EXPNの意味論と応用 EXPN is often very useful in debugging and understanding problems with mailing lists and multiple-target-address aliases. Some systems have attempted to use source expansion of mailing lists as a means of eliminating duplicates. The propagation of aliasing systems with mail on the Internet, for hosts (typically with MX and CNAME DNS records), for mailboxes (various types of local host aliases), and in various proxying arrangements, has made it nearly impossible for these strategies to work, and mail systems SHOULD NOT attempt them. EXPNはデバッグにおいて、またメーリングリストや複数をターゲットとするア ドレス別名に関する問題の理解にしばしば非常に有効である。いくつかのシス テムでは、重複を除いてメーリングリストのソース展開を用いることを試みる。 ホスト(典型的にはMX、CNAMEのDNSレコード)、メールボックス(いろいろな種 類のローカルホストでの別名)、いろいろなプロキシの取りあわせといったイ ンターネット上のメールの別名システムの広がりは、これらの戦術での動作を ほとんど不可能にするので、メールシステムはそうするべきではない(SHOULD NOT)。 3.6 Domains 3.6 ドメイン Only resolvable, fully-qualified, domain names (FQDNs) are permitted when domain names are used in SMTP. In other words, names that can be resolved to MX RRs or A RRs (as discussed in section 5) are permitted, as are CNAME RRs whose targets can be resolved, in turn, to MX or A RRs. Local nicknames or unqualified names MUST NOT be used. There are two exceptions to the rule requiring FQDNs: SMTPで用いられるドメイン名として、解決可能で、完全修飾されたドメイン名 (FQDN)だけが許される。いいかえれば、MX RRやA RR(セクション5で議論され る)として解決できる名前が許され、またターゲットが順次MXないしA RRに解 決可能なCNAME RRが許される。ローカルなニックネームや完全修飾されない名 前は使用してはならない(MUST NOT)。FQDNを要求するルールに2つの例外があ る: - The domain name given in the EHLO command MUST BE either a primary host name (a domain name that resolves to an A RR) or, if the host has no name, an address literal as described in section 4.1.1.1. EHLOコマンドで与えられるドメイン名は、プライマリなホスト名(A RRで解決 されるドメイン名)か、ホストが名前を持たないならば、セクション4.1.1.1に 示される文字通りのアドレスである。 - The reserved mailbox name "postmaster" may be used in a RCPT command without domain qualification (see section 4.1.1.3) and MUST be accepted if so used. 予約されたメールボックス名である"postmaster"は、ドメイン修飾なしでRCPT コマンド中用いられ(セクション 4.1.1.3を見よ)、それが用いられた場合には 受けとらなければならない(MUST)。 3.7 Relaying 3.7 リレー In general, the availability of Mail eXchanger records in the domain name system [22, 27] makes the use of explicit source routes in the Internet mail system unnecessary. Many historical problems with Klensin Standards Track [Page 23] RFC 2821 Simple Mail Transfer Protocol April 2001 their interpretation have made their use undesirable. SMTP clients SHOULD NOT generate explicit source routes except under unusual circumstances. SMTP servers MAY decline to act as mail relays or to accept addresses that specify source routes. When route information is encountered, SMTP servers are also permitted to ignore the route information and simply send to the final destination specified as the last element in the route and SHOULD do so. There has been an invalid practice of using names that do not appear in the DNS as destination names, with the senders counting on the intermediate hosts specified in source routing to resolve any problems. If source routes are stripped, this practice will cause failures. This is one of several reasons why SMTP clients MUST NOT generate invalid source routes or depend on serial resolution of names. 一般に、ドメインネームシステム[22,27]におけるメールエクスチェンジャレ コード(MXレコード)が利用できることから、インターネットメールシステムに おいては、明確なソースルーティングを使用する必要がない。その解釈にとも なって、歴史的に多くの問題が生じたので、その利用が望ましくない。SMTPク ライアントは、普通でない環境下を除き、明確なソースルーティングを生成す べきでない(SHOULD NOT)。SMTPサーバは、メールリレーとして動作したり、特 定のソースルーティングアドレスを受けとったりすることを断ってもよい (MAY)。ルーティング情報を見付けたとき、SMTPサーバはまた、ルーティング 情報を無視し、単にルーティングの最後の要素にある最終到達地点へ送ること が許されており、またそうすべきである(SHOULD)。到達地点の名前として、問 題を解決させるためにソースルーティングで規定した途中のホストにまかせる 送り手がDNSに現れない名前を利用することは、無効な動作である。ソースルー ティングを裸にすると、この動作は失敗をもたらすだろう。これが、なぜSMTP クライアントが無効なソースルーティングを生成したり名前の連続した解決に 依存してはならない(MUST NOT)かのいくつかの理由のうちの1つである。 When source routes are not used, the process described in RFC 821 for constructing a reverse-path from the forward-path is not applicable and the reverse-path at the time of delivery will simply be the address that appeared in the MAIL command. ソースルーティングが使われないとき、RFC 821に記述されたフォワードパス からリバースパスを生成するための処理は適用できず、配送の時、リバースパ スは単にMAILコマンドで現れるアドレスとなる。 A relay SMTP server is usually the target of a DNS MX record that designates it, rather than the final delivery system. The relay server may accept or reject the task of relaying the mail in the same way it accepts or rejects mail for a local user. If it accepts the task, it then becomes an SMTP client, establishes a transmission channel to the next SMTP server specified in the DNS (according to the rules in section 5), and sends it the mail. If it declines to relay mail to a particular address for policy reasons, a 550 response SHOULD be returned. リレーのSMTPサーバは、たいていの場合最終配送システムというよりはむしろ、 それを意味するDNS MXレコードのターゲットである。リレーサーバは、ローカ ルユーザのメールを受けとったり拒否したりするのと同じ方法でメールをリレー するタスクを受けても拒否してもよい。もしタスクを受けとった場合にはSMTP クライアントとなり、DNSで規定された次のSMTPサーバへと転送チャネルを確 立し(セクション5のルールにしたがって)、そこにメールを送る。ポリシー上 の理由により特定アドレスへのメールリレーを断わる場合、550応答が返され るべきである(SHOULD)。 Many mail-sending clients exist, especially in conjunction with facilities that receive mail via POP3 or IMAP, that have limited capability to support some of the requirements of this specification, such as the ability to queue messages for subsequent delivery attempts. For these clients, it is common practice to make private arrangements to send all messages to a single server for processing and subsequent distribution. SMTP, as specified here, is not ideally suited for this role, and work is underway on standardized mail submission protocols that might eventually supercede the current practices. In any event, because these arrangements are private and fall outside the scope of this specification, they are not described here. 特に、POP3やIMAPを経由してメールを受けとる機能を持つメールを送るクライ アントがたくさん存在するが、これは続く配送の試みのためにメッセージを キューにためる機能といった、この標準の要求をいくらかサポートする可能性 を限定する。これらのクライアントにとっては、処理と続く配送のために、す べてのメッセージを1つのサーバに送るプライベートな処理をするのが共通し た動作である。ここで規定されるSMTPは、理想を言えばこの役割に好都合では なく、現在の実行にとってかわるかもしれない、標準化されたメール提出プロ トコルで仕事は進行する。いずれにしても、これらの手はずはプライベートな ものであり、この標準の範囲外なので、ここでは記述しない。 It is important to note that MX records can point to SMTP servers which act as gateways into other environments, not just SMTP relays and final delivery systems; see sections 3.8 and 5. MXレコードは、SMTPリレーや最終配送先のシステムのみならず別の環境へのゲー トウェイとして動作するSMTPサーバを指すことができることに注意するのは重 要である; セクション3.8と5を見よ。 Klensin Standards Track [Page 24] RFC 2821 Simple Mail Transfer Protocol April 2001 If an SMTP server has accepted the task of relaying the mail and later finds that the destination is incorrect or that the mail cannot be delivered for some other reason, then it MUST construct an "undeliverable mail" notification message and send it to the originator of the undeliverable mail (as indicated by the reverse- path). Formats specified for non-delivery reports by other standards (see, for example, [24, 25]) SHOULD be used if possible. もしSMTPサーバがメールをリレーするタスクを受け入れ、後に宛て先が正しく ない、あるいは他の何かの理由でそのメールを配送できないことがわかったな らば、配送不能メール("undeliverable mail")のお知らせメッセージを作成し、 配送不能メールの(リバースパスで示された)送り主にそれを送らなければなら ない(MUST)。別の標準(例えば、[24,25]を見よ)による配送不能レポートのフォー マットに関する規定は、可能なら利用すべきである(SHOULD)。 This notification message must be from the SMTP server at the relay host or the host that first determines that delivery cannot be accomplished. Of course, SMTP servers MUST NOT send notification messages about problems transporting notification messages. One way to prevent loops in error reporting is to specify a null reverse-path in the MAIL command of a notification message. When such a message is transmitted the reverse-path MUST be set to null (see section 4.5.5 for additional discussion). A MAIL command with a null reverse-path appears as follows: このお知らせメッセージはリレーホストか、配送をなしとげられないと決定し た最初のホストからに違いない。もちろん、SMTPサーバは、お知らせメッセー ジの輸送時の問題について、お知らせメッセージを送ってはならない(MUST NOT)。エラーレポートのループを防ぐ1つの方法は、お知らせメッセージの MAILコマンドでヌルのリバースパスを明記することである。そのようなメッセー ジが送出されるとき、リバースパスはヌルとされなければならない(MUST)(さ らなる議論のため、セクション4.5.5を見よ)。ヌルのリバースパスのMAILコマ ンドは以下のようになる: MAIL FROM:<> As discussed in section 2.4.1, a relay SMTP has no need to inspect or act upon the headers or body of the message data and MUST NOT do so except to add its own "Received:" header (section 4.4) and, optionally, to attempt to detect looping in the mail system (see section 6.2). セクション2.4.1で議論したように、リレーのSMTPはメッセージのヘッダやボ ディのデータを調べたりそれにより動作したりする必要はなく、自分自身の "Received:"ヘッダを加えること、またオプションでメールシステムのループ を検出する(セクション6.2を見よ)ことを除きそうしてはならない(MUST NOT)。 3.8 Mail Gatewaying 3.8 メールゲートウェイ While the relay function discussed above operates within the Internet SMTP transport service environment, MX records or various forms of explicit routing may require that an intermediate SMTP server perform a translation function between one transport service and another. As discussed in section 2.3.8, when such a system is at the boundary between two transport service environments, we refer to it as a "gateway" or "gateway SMTP". 上で議論したリレー機能はインターネットのSMTP配送サービス環境で運用され るので、MXレコードやいろいろな形式の明確なルーティングは、途中のSMTPサー バがある配送サービスから別のものに配送する機能を行うために必要とされる。 セクション2.3.8で議論したように、そういったシステムが2つの配送環境の境 界に位置するとき、我々はそれを「ゲートウェイ」ないし「ゲートウェイSMTP」 と呼ぶ。 Gatewaying mail between different mail environments, such as different mail formats and protocols, is complex and does not easily yield to standardization. However, some general requirements may be given for a gateway between the Internet and another mail environment. 異なるメール環境間、たとえばメールフォーマットやプロトコルが異なるなど、 でメールをゲートウェイすることは複雑で、簡単に標準化できるものではない。 しかしながら、インターネットと別のメール環境の間のゲートウェイについて、 一般的な要求事項が与えられるかもしれない。 3.8.1 Header Fields in Gatewaying 3.8.1 ゲートウェイするときのヘッダフィールド Header fields MAY be rewritten when necessary as messages are gatewayed across mail environment boundaries. This may involve inspecting the message body or interpreting the local-part of the destination address in spite of the prohibitions in section 2.4.1. メッセージがメール環境の境界を超えてゲートウェイされるのに必要な時、 ヘッダフィールドを書き換えてもよい(MAY)。これは、セクション2.4.1での禁 止事項にもかかわらず、メッセージボディの検査や宛て先のローカルパートの 解釈を含んでもよい。 Klensin Standards Track [Page 25] RFC 2821 Simple Mail Transfer Protocol April 2001 Other mail systems gatewayed to the Internet often use a subset of RFC 822 headers or provide similar functionality with a different syntax, but some of these mail systems do not have an equivalent to the SMTP envelope. Therefore, when a message leaves the Internet environment, it may be necessary to fold the SMTP envelope information into the message header. A possible solution would be to create new header fields to carry the envelope information (e.g., "X-SMTP-MAIL:" and "X-SMTP-RCPT:"); however, this would require changes in mail programs in foreign environments and might risk disclosure of private information (see section 7.2). インターネットへゲートウェイされる別のメールシステムでは、しばしば RFC822にあるヘッダのサブセットが使われていたり、別の構文で似た機能が提 供されていたりするが、これらのメールシステムのいくつかには、SMTPでのエ ンベロープと等価なものは存在しない。それ故、メッセージがインターネット 環境を離れたとき、SMTPエンベロープの情報をメッセージヘッダに折り込むこ とが必要となるかもしれない。可能な解決法は、エンベロープ情報を入れるた めの新しいヘッダフィールドをつくること(例えば "X-SMTP-MAIL:" や "X-SMTP-RCPT:")であるが、しかしながら、これは外の環境のメールプログラ ムを変更することが必要となるだろうし、プライベートな情報を公開してしま う危険もあり得る(セクション 7.2を見よ)。 3.8.2 Received Lines in Gatewaying 3.8.2 ゲートウェイで受信した行 When forwarding a message into or out of the Internet environment, a gateway MUST prepend a Received: line, but it MUST NOT alter in any way a Received: line that is already in the header. インターネットから、あるいはインターネットへメッセージを転送したとき、 ゲートウェイはReceived: 行を前に付加しなければならない(MUST)が、どのよ うな方法であれヘッダ中に既存のReceived:行を変更してはならない(MUST NOT)。 "Received:" fields of messages originating from other environments may not conform exactly to this specification. However, the most important use of Received: lines is for debugging mail faults, and this debugging can be severely hampered by well-meaning gateways that try to "fix" a Received: line. As another consequence of trace fields arising in non-SMTP environments, receiving systems MUST NOT reject mail based on the format of a trace field and SHOULD be extremely robust in the light of unexpected information or formats in those fields. 別環境から来たメッセージの"Received:"フィールドはこの規定に厳密に適合 しないだろう。しかしながら、Received: 行の最も重要な利用はメールのエラー をデバッグするためであり、ゲートウェイが善意で"Received:"ヘッダを直す 試みを行うことで、このデバッグを極めて難しくする可能性がある。SMTPでな い環境で起こる追跡フィールドに関する別の問題で、受けとるシステムはトレー スフィールドのフォーマットに基づいてメールを拒否してはならず(MUST NOT)、 またそのフィールドでの予期しない情報やフォーマットの発見に対して、極め てたくましくあるべきである(SHOULD)。 The gateway SHOULD indicate the environment and protocol in the "via" clauses of Received field(s) that it supplies. ゲートウェイは、それが提供するReceivedフィールドの"via"節に環境とプロ トコルを示すべきである(SHOULD)。 3.8.3 Addresses in Gatewaying 3.8.3 ゲートウェイでのアドレス From the Internet side, the gateway SHOULD accept all valid address formats in SMTP commands and in RFC 822 headers, and all valid RFC 822 messages. Addresses and headers generated by gateways MUST conform to applicable Internet standards (including this one and RFC 822). Gateways are, of course, subject to the same rules for handling source routes as those described for other SMTP systems in section 3.3. インターネット側から、ゲートウェイはSMTPコマンドおよびRFC822ヘッダ中の あらゆる有効なアドレスフォーマットと、すべての有効なRFC822メッセージを 受けとるべきである(SHOULD)。ゲートウェイによって生成されたアドレスとヘッ ダは、(これやRFC822を含む)インターネット標準に適合しなければならない (MUST)。ゲートウェイは、もちろんソースルーティングの扱いについて、別の SMTPシステムのために、セクション3.3に書かれたのと同じルールが適用される。 3.8.4 Other Header Fields in Gatewaying 3.8.4 ゲートウェイに際する他のヘッダフィールド The gateway MUST ensure that all header fields of a message that it forwards into the Internet mail environment meet the requirements for Internet mail. In particular, all addresses in "From:", "To:", "Cc:", etc., fields MUST be transformed (if necessary) to satisfy RFC 822 syntax, MUST reference only fully-qualified domain names, and MUST be effective and useful for sending replies. The translation Klensin Standards Track [Page 26] RFC 2821 Simple Mail Transfer Protocol April 2001 algorithm used to convert mail from the Internet protocols to another environment's protocol SHOULD ensure that error messages from the foreign mail environment are delivered to the return path from the SMTP envelope, not to the sender listed in the "From:" field (or other fields) of the RFC 822 message. ゲートウェイは、インターネットメール環境へと転送されるメッセージ中、す べてのヘッダフィールドがインターネットメールでの要求を満足することを保 証しなければならない(MUST)。特に、"From:", "To:", "Cc:"などのフィール ド中にあるアドレスは、RFC 822の構文を満足するよう(必要とあれば)変形さ せなければならず(MUST)、完全修飾されたドメイン名(FQDN)だけを参照するよ うにしなければならず(MUST)、応答を送るのに有効かつ有用であるようにしな ければならない(MUST)。インターネットプロトコルから別の環境のプロトコル へとメールを変換するのに使われる変換アルゴリズムは、別のメール環境から のエラーメッセージが、RFC 822メッセージにおける"From:"フィールドに書か れた送り主(あるいは別のフィールド)ではなく、SMTPエンベロープのreturn pathへと配送されることを保証すべきである(SHOULD)。 3.8.5 Envelopes in Gatewaying 3.8.5 ゲートウェイでのエンベロープ Similarly, when forwarding a message from another environment into the Internet, the gateway SHOULD set the envelope return path in accordance with an error message return address, if supplied by the foreign environment. If the foreign environment has no equivalent concept, the gateway must select and use a best approximation, with the message originator's address as the default of last resort. メッセージを別環境からインターネットに転送するときに似て、ゲートウェイ は、エラーメッセージを返すべきアドレスがもし別の環境で提供されているな らば、それをエンベロープreturnpathに一致させるべきである(SHOULD)。 別環境に等価の概念が存在しない場合、ゲートウェイは最善の近似を選び、使 わなければならないが、最終手段のデフォルトとして、メッセージの最初の送 信者のアドレスがある。 3.9 Terminating Sessions and Connections 3.9 セッションとコネクションの終了 An SMTP connection is terminated when the client sends a QUIT command. The server responds with a positive reply code, after which it closes the connection. SMTPコネクションは、クライアントがQUITコマンドを送出したときに終了する。 サーバはポジティブな応答コードを返してからコネクションを終了する。 An SMTP server MUST NOT intentionally close the connection except: SMTPサーバは、以下の場合を除いて故意にコネクションを閉じてはいけない (MUST NOT): - After receiving a QUIT command and responding with a 221 reply. QUITコマンドを受けとり、221応答を返したあと - After detecting the need to shutdown the SMTP service and returning a 421 response code. This response code can be issued after the server receives any command or, if necessary, asynchronously from command receipt (on the assumption that the client will receive it after the next command is issued). SMTPサービスをシャットダウンする必要が発見され、421応答コードを返した 後。この応答コードは、サーバが何らかのコマンドを受けとった後か、必要な らコマンドの受信と非同期に発行され得る(クライアントは次のコマンドが発 行される前に受けとるであろうと仮定)。 In particular, a server that closes connections in response to commands that are not understood is in violation of this specification. Servers are expected to be tolerant of unknown commands, issuing a 500 reply and awaiting further instructions from the client. 特に、理解できないコマンドへの応答でコネクションを切るサーバは、この規 格に反している。サーバは未知のコマンドに寛容であることが期待され、500 応答を発行してクライアントからのさらなる指示を待つ。 An SMTP server which is forcibly shut down via external means SHOULD attempt to send a line containing a 421 response code to the SMTP client before exiting. The SMTP client will normally read the 421 response code after sending its next command. 外部からの方法で強制的にシャットダウンされたSMTPサーバは、終了する前に SMTPクライアントに対し、421応答コードを含む行を送出しようとすべきであ る(SHOULD)。SMTPクライアントは普通、次のコマンドを送ったあとに421応答 コードを読むだろう。 SMTP clients that experience a connection close, reset, or other communications failure due to circumstances not under their control (in violation of the intent of this specification but sometimes unavoidable) SHOULD, to maintain the robustness of the mail system, treat the mail transaction as if a 451 response had been received and act accordingly. コネクションクローズ、リセット、その他コントロールできない環境によるコ ミュニケーションの失敗(この規格の意図に反するが、ときには避けられない) を経験したSMTPクライアントは、メールシステムが確固として保守されるため に、あたかもメールトランザクションを451応答を受けとったように、それ相 当にふるまうべきである(SHOULD)。 Klensin Standards Track [Page 27] RFC 2821 Simple Mail Transfer Protocol April 2001 3.10 Mailing Lists and Aliases 3.10 メーリングリストと別名 An SMTP-capable host SHOULD support both the alias and the list models of address expansion for multiple delivery. When a message is delivered or forwarded to each address of an expanded list form, the return address in the envelope ("MAIL FROM:") MUST be changed to be the address of a person or other entity who administers the list. However, in this case, the message header [32] MUST be left unchanged; in particular, the "From" field of the message header is unaffected. SMTPを扱えるホストは、別名と、複数の配送先へとアドレスが展開されるリス トモデルの双方をサポートすべきである(SHOULD)。メッセージが拡張されたリ ストの形式のそれぞれのアドレスへと配送ないし転送されたとき、エンベロー プのリターンアドレス(MAIL FROM:)は、メーリングリストを管理する人ないし 管理者たちの統一体のアドレスに変更されなければならない(MUST)。にもかか わらず、この場合、メッセージヘッダ[32]は変更することなく残さなければな らない(MUST);特に、メッセージヘッダの"From:"フィールドは影響を受けない。 An important mail facility is a mechanism for multi-destination delivery of a single message, by transforming (or "expanding" or "exploding") a pseudo-mailbox address into a list of destination mailbox addresses. When a message is sent to such a pseudo-mailbox (sometimes called an "exploder"), copies are forwarded or redistributed to each mailbox in the expanded list. Servers SHOULD simply utilize the addresses on the list; application of heuristics or other matching rules to eliminate some addresses, such as that of the originator, is strongly discouraged. We classify such a pseudo- mailbox as an "alias" or a "list", depending upon the expansion rules. 重要なメールの機能として、宛て先のメールボックスアドレスのリストからな る偽のメールボックスアドレスを変換(展開あるいは爆発)することにより、1 つのメッセージを複数の宛て先に配送するメカニズムがあげられる。メッセー ジがそのような偽のメールボックス(時に「爆発するもの」と呼ばれる)に送ら れたとき、コピーが展開されたリストにあるそれぞれのメールボックスへと転 送されるか、再配送される。サーバは、単にリスト上のアドレスを使う;経験 則によるアプリケーションや、送信者のような、いくつかのアドレスをとり除 くためのその他のマッチングルールは、強く思いとどまるべきである。拡張ルー ルに依存して、"alias"(別名)や"list"(リスト)のような偽のメールボックス を分類する。 3.10.1 Alias 3.10.1 別名 To expand an alias, the recipient mailer simply replaces the pseudo- mailbox address in the envelope with each of the expanded addresses in turn; the rest of the envelope and the message body are left unchanged. The message is then delivered or forwarded to each expanded address. 別名の展開において、受けとったメーラは、エンベロープ中の偽のメールボッ クスアドレスを、単純に順番に拡張されたアドレスのそれぞれへと展開する; エンベロープの残りの部分とメッセージボディは、変更せず残される。続いて メッセージは、展開されたアドレスのそれぞれへと配送ないし転送される。 3.10.2 List 3.10.2 リスト A mailing list may be said to operate by "redistribution" rather than by "forwarding". To expand a list, the recipient mailer replaces the pseudo-mailbox address in the envelope with all of the expanded addresses. The return address in the envelope is changed so that all error messages generated by the final deliveries will be returned to a list administrator, not to the message originator, who generally has no control over the contents of the list and will typically find error messages annoying. メーリングリストは、転送というより再配送による運用であると言えるかもし れない。リストを展開するとき、受け手のメーラはエンベロープにある偽のメー ルボックスアドレスをすべて展開されたアドレスに置き換える。最終配送シス テムで生成されるすべてのエラーメッセージを、普通リストの内容をコントロー ルできず、典型的にエラーメッセージが迷惑だと思うだろうメッセージの送信 者ではなくリスト管理者へ送らせるため、エンベロープ中のリターンアドレス は変更される。 Klensin Standards Track [Page 28] RFC 2821 Simple Mail Transfer Protocol April 2001 ---- 訳について この訳は、美森勇気 が個人的な目的で行いました。利用 は自由ですが、一切の保証はしません。