Network Working Group R. Gellens Request for Comments: 2645 Qualcomm Category: Standards Track August 1999 ON-DEMAND MAIL RELAY (ODMR) SMTP with Dynamic IP Addresses 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. Copyright Notice Copyright (C) The Internet Society (1999). All Rights Reserved. Table of Contents 1. Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2. Conventions Used in this Document . . . . . . . . . . . . . . 2 3. Comments . . . . . . . . . . . . . . . . . . . . . . . . . . 2 4. Description . . . . . . . . . . . . . . . . . . . . . . . . . 2 5. States . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 5.1. Initial State . . . . . . . . . . . . . . . . . . . . . . 4 5.1.1. EHLO . . . . . . . . . . . . . . . . . . . . . . . . 4 5.1.2. AUTH . . . . . . . . . . . . . . . . . . . . . . . . 4 5.1.3. QUIT . . . . . . . . . . . . . . . . . . . . . . . . 4 5.2. Authenticated State . . . . . . . . . . . . . . . . . . . 4 5.2.1. ATRN (Authenticated TURN) . . . . . . . . . . . . . 4 5.3. Reversed State . . . . . . . . . . . . . . . . . . . . . 5 5.4. Other Commands . . . . . . . . . . . . . . . . . . . . . 6 6. Example On-Demand Mail Relay Session: . . . . . . . . . . . . 6 7. Response Codes . . . . . . . . . . . . . . . . . . . . . . . 6 8. Security Considerations . . . . . . . . . . . . . . . . . . . 6 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 7 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 11. Author's Address . . . . . . . . . . . . . . . . . . . . . 8 12. Full Copyright Statement . . . . . . . . . . . . . . . . . . 9 1. Abstract With the spread of low-cost computer systems and Internet connectivity, the demand for local mail servers has been rising. Many people now want to operate a mail server on a system which has Gellens Standards Track [Page 1] RFC 2645 On-Demand Mail Relay August 1999 only an intermittent connection to a service provider. If the system has a static IP address, the ESMTP ETRN command [ETRN] can be used. However, systems with dynamic IP addresses (which are very common with low-cost connections) have no widely-deployed solution. 1 要約 低価格なコンピュータやインターネット接続の普及により、ローカルメールサー バへの要求が高まっている。現在、多くの人々はISPに断続的に接続されるだ けのシステム上にあるメールサーバを操作することを望んでいる。もしシステ ムが静的なIPアドレスをもつなら、ESMTPのETRNコマンド[ETRN]を利用できる。 しかしながら、(低価格な接続では一般的な)動的IPアドレスのシステムでは、 広く知られた解決法はない。 This memo proposes a new service, On-Demand Mail Relay (ODMR), which is a profile of SMTP [SMTP, ESMTP], providing for a secure, extensible, easy to implement approach to the problem. その問題を解決するセキュアで、拡張可能で実装が容易なSMTPのプロフィール であるOn-Demand Mail Relay (ODMR)というあたらしいサービスをこの文書で 提案する。 2. Conventions Used in this Document Because the client and server roles reverse during the session, to avoid confusion, the terms "customer" and "provider" will be used in place of "client" and "server", although of course this protocol may be useful in cases other than commercial service providers and customers. 2 本文書中で使われる約束 もちろん、このプロトコルが商用サービスプロバイダとその顧客以外でも有用 かも知れないが、セッション中、クライアントとサーバの役割がいれかわるの で、混乱をさけるため"customer"と"provider"を"client"と"server"のかわ りに使用する。 In examples, "P:" is used to indicate lines sent by the provider, and "C:" indicates those sent by the customer. Line breaks within a command are for editorial purposes only. 例で、"P:"はproviderが送信した行を示すのに使い、"C:"はcustomerが送信し た行を示す。コマンド中の行の中断は編集のためである。 The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" in this document are to be interpreted as defined in [KEYWORDS]. "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", 及び "MAY" のキーワード は[KEYWORDS]の定義どおりに解釈されるものとする。 Examples use 'example.net' as the provider, and 'example.org' and ' example.com' as the customers. 例では、'example.net'をprovider、'example.org'と'example.com'を customerとして用いる。 3. Comments Private comments should be sent to the author. Public comments may be sent to the IETF Disconnected SMTP mailing list, . To subscribe, send a message to containing the word SUBSCRIBE as the body. 3 コメント 私的なコメントは著者にあてて送るべきである。公なコメントはIETFの Disconnected SMTP mailing list に送っても良 い。参加するには、本文にSUBSCRIBEと書いたメールを へ送りなさい。 4. Description On-Demand Mail Relay is a restricted profile of SMTP [SMTP, ESMTP]. Port 366 is reserved for On-Demand Mail Relay. The initial client and server roles are short-lived, as the point is to allow the intermittently-connected host to request mail held for it by a service provider. 4 解説 On-Demand Mail Relay (ODMR) はSMTP [SMTP, ESMTP]の制限されたものである。 ODMRのためにport 366が予約される。初めのクライアントとサーバの役割は短 かく、ポイントは、断続的に接続されるホストが、providerがそのホストのた めにもっているメールを要求するのを許可することである。 The customer initiates a connection to the provider, authenticates, and requests its mail. The roles of client and server then reverse, and normal SMTP [SMTP, ESMTP] proceeds. customerはproviderへと接続し、認証し、メールを要求する。クライアントと サーバの役割がいれかわり、普通のSMTP [SMTP, ESMTP]へとうつる。 Gellens Standards Track [Page 2] RFC 2645 On-Demand Mail Relay August 1999 The provider has an On-Demand Mail Relay process listening for connections on the ODMR port. This process does not need to be a full SMTP server. It does need to be an SMTP client with access to the outgoing mail queues, and as a server implement the EHLO, AUTH, ATRN, and QUIT commands. providerはODMR portで接続をlistenするOn-Demand Mail Relayのプロセスを もつ。このプロセスは完全なSMTPサーバの機能を提供する必要はない。 外へと送られるメールキューにアクセスできるSMTPクライアントと、サーバと してEHLO, AUTH, ATRN, QUITがあれば十分である。 An MTA normally has a mail client component which processes the outgoing mail queues, attempting to send mail for particular domains, based on time or event (such as new mail being placed in the queue, or receipt of an ETRN command by the SMTP server component). The On-Demand Mail Relay service processes the outgoing queue not on a timer or new mail creation, but on request. 普通、MTAは特定ドメインへメールを送る試みをするため、また時間やイベン ト(あたらしいメールがqueueにおかれた、SMTPサーバコンポーネントからETRN コマンドを受けとった等)により、外へのメールのqueueを扱うメールクライア ントのコンポーネントをもっている。ODMRサービスでは、タイマーやあたらし いメールの生成でなく、要求により外向きのqueueを処理する。 The provider side has normal SMTP server responsibilities [SMTP], including generation of delivery failure notices, etc. as needed. provider側は、必要なら配送失敗の通知等を含めて普通のSMTPサーバの責任 [SMTP]をおう。 5. States The On-Demand Mail Relay service has three states: an initial state, an authenticated state, and a reversed state. The state progression is illustrated in the following diagram: 5 状態 ODMRサービスでは3つの状態がある;初期状態、認証状態、逆転状態である。 状態遷移を以下の図で示す: --------------------------- ! initial state ! --------------------------- ! ! QUIT AUTH ! ! ! V ! ----------------------- ! ! authenticated state ! ! ----------------------- ! ! ! ! QUIT ATRN ! ! ! ! ! V ! ! ------------------ ! ! ! reversed state ! ! ! ------------------ ! ! ! ! ! QUIT ! ! ! V V V --------------------- ! termination ! --------------------- Gellens Standards Track [Page 3] RFC 2645 On-Demand Mail Relay August 1999 (Note that in the reversed state, commands are sent by the provider, not the customer.) (逆転状態ではコマンドはcustomerではなく、providerによって送信されるこ とに注意。) 5.1. Initial State In the initial state, the provider is the server and the customer is the client. Three commands are valid: EHLO, AUTH, and QUIT. 5.1 初期状態 初期状態では、prividerがサーバであり、customerがクライアントである。 EHLO, AUTH, QUITの3つのコマンドが有効である。 5.1.1. EHLO The EHLO command is the same as in [ESMTP]. The response MUST include AUTH and ATRN. 5.1.1 EHLO EHLOコマンドは[ESMTP]にあるのとおなじである。応答にはAUTHとATRNが含ま れなければならない。 5.1.2. AUTH The AUTH command is specified in [AUTH]. The AUTH command uses a [SASL] mechanism to authenticate the session. The session is not considered authenticated until a success response to AUTH has been sent. For interoperability, implementations MUST support the CRAM-MD5 mechanism [CRAM]. Other SASL mechanisms may be supported. A site MAY disable CRAM-MD5 support if it uses more secure methods. The EXTERNAL mechanism [SASL] might be useful in some cases, for example, if the provider has already authenticated the client, such as during a PPP connection. 5.1.2. AUTH AUTHコマンドは[AUTH]で規定されている。AUTHコマンドは、セッションを認証 する[SASL]のメカニズムを用いる。AUTHコマンドにたいして成功の応答がある まで、セッションは認証されているとは考えない。 相互運用のため、実装では[CRAM]のCRAM-MD5のメカニズムをサポートしなけれ ばならない(MUST)。他のSASLメカニズムをサポートしても良い(MAY)。もしよ りセキュアな方法を用いるなら、サイトはCRAM-MD5を無効にしても良い(MAY)。 PPPコネクション中など、providerが既にclientを認証しているような場合、 [SASL]のEXTERNALメカニズムは有効かも知れない。 5.1.3. QUIT The QUIT command is the same as in [SMTP]. 5.1.3. QUIT QUITコマンドは[SMTP]にあるのとおなじである。 5.2. Authenticated State 5.2 認証状態 The authenticated state is entered after a successful AUTH command. Two commands are valid in the authenticated state: ATRN and QUIT. AUTHコマンドが成功すると、認証状態にはいる。ATRNとQUITの2つのコマンド が有効である。 5.2.1. ATRN (Authenticated TURN) Unlike the TURN command in [SMTP], the ATRN command optionally takes one or more domains as a parameter. The ATRN command MUST be rejected if the session has not been authenticated. Response code 530 [AUTH] is used for this. 5.2.1. ATRN (Authenticated TURN) [SMTP]におけるTURNコマンドとちがい、ATRNコマンドはオプションで、パラメー タとして1つないし複数のドメインを取る。そのセッションが認証されていな いなら、ATRNコマンドは拒否されなければならない(MUST)。この目的で応答コ ード530[AUTH]が用いられる。 The timeout for this command MUST be at least 10 minutes to allow the provider time to process its mail queue. An ATRN command sent with no domains is equivalent to an ATRN command specifying all domains to which the customer has access. このコマンドのタイムアウトは、providerのメールキューの処理のための時間として 少なくとも10分なければならない(MUST)。 ドメインなしで送信されたATRNコマンドは、そのユーザがアクセス可能なすべ てのドメインを指定したATRNコマンドと等価である。 Gellens Standards Track [Page 4] RFC 2645 On-Demand Mail Relay August 1999 If the authentication used by the customer does not provide access to all of the domains specified in ATRN, the provider MUST NOT send mail for any domains to the customer; the provider MUST reject the ATRN command with a 450 code. もしcustomerによる認証が、ATRNで指定したドメインの一部にでもアクセスで きない部分があるなら、providerはcustomerにどのドメインあてのメールも送っ てはならない(MUST);providerはATRNコマンドに対し450の応答コードを返して リジェクトしなければならない)(MUST)。 If the customer does have access to all of the specified domains, but none of them have any queued mail, the provider normally rejects the ATRN command with response code 453. The provider MAY instead issue a 250 success code, and after the roles are reversed, send a QUIT following the EHLO. もしcustomerが指定されたすべてのドメインにアクセスする権限があるが、キュ ーにたまったメールが1通もないなら、providerは普通453の応答コードを以っ てATRNコマンドを拒絶する。providerは250の成功のコードを返し、役割をい れかえたあと、EHLOに続いてQUITを送っても良い(MAY)。 The provider MAY also reject the ATRN command with a 450 response to indicate refusal to accept multiple requests issued within a particular time interval. providerは、ある一定時間内に複数の要求を受けるのを拒否するのを示すため、 ATRNコマンドに450の応答コードで拒否しても良い(MAY)。 If the customer has access to all of the specified domains and mail exists in at least one of them, the provider issues a 250 success code. もしcustomerが指定したすべてのドメインにアクセスでき、かつ少なくともそ の1個所にメールがあるなら、providerは250の成功のコードを発行する。 If the server is unable to verify access to the requested domains (for example, a mapping database is temporarily unavailable), response code 451 is sent. もしサーバが要求されたドメインへのアクセスを照合できなかったなら(たと えば、マッピングデータベースが一時的に利用できない)、451の応答コードが 返される。 [ABNF] for ATRN: atrn = "ATRN" [SP domain *("," domain)] domain = sub-domain 1*("." sub-domain) sub-domain = (ALPHA / DIGIT) *(ldh-str) ldh-str = *(ALPHA / DIGIT / "-") (ALPHA / DIGIT) 5.3. Reversed State 5.3 逆転状態 After the provider has sent a success reply to the ATRN command, the roles reverse, and the customer becomes the server, and the provider becomes the client. providerがATRNコマンドに成功の応答を返した後、役割がいれかわり、 customerがサーバに、providerがクライアントになる。 After receiving the success response to ATRN, the customer sends a standard SMTP initial greeting line. At this point normal SMTP [SMTP, ESMTP] commands are used. Typically the provider sends EHLO after seeing the customer's greeting, to be followed by MAIL FROM and so on. ATRNに成功したという応答を受信した後、customerは標準的なSMTPのgreeting lineを送る。典型的なproviderはそのgreetingをみてからEHLOを送り、MAIL FROM等と続いていく。 Gellens Standards Track [Page 5] RFC 2645 On-Demand Mail Relay August 1999 5.4. Other Commands The provider MAY reject all commands other than EHLO, AUTH, ATRN, and QUIT with response code 502. 5.4 その他のコマンド providerはEHLO, AUTH, ATRN, QUIT以外のすべてのコマンドを応答コード502 で拒絶しても良い(MAY)。 6. Example On-Demand Mail Relay Session 6 ODMRセッションの例 P: 220 EXAMPLE.NET on-demand mail relay server ready C: EHLO example.org P: 250-EXAMPLE.NET P: 250-AUTH CRAM-MD5 EXTERNAL P: 250 ATRN C: AUTH CRAM-MD5 P: 334 MTg5Ni42OTcxNzA5NTJASVNQLkNPTQo= C: Zm9vYmFyLm5ldCBiOTEzYTYwMmM3ZWRhN2E0OTViNGU2ZTczMzRkMzg5MAo= P: 235 now authenticated as example.org C: ATRN example.org,example.com P: 250 OK now reversing the connection C: 220 example.org ready to receive email P: EHLO EXAMPLE.NET C: 250-example.org C: 250 SIZE P: MAIL FROM: C: 250 OK P: RCPT TO: C: 250 OK, recipient accepted ... P: QUIT C: 221 example.org closing connection 7. Response Codes The response codes used in this document are: 250 Requested mail action okay, completed 450 ATRN request refused 451 Unable to process ATRN request now 453 You have no mail 502 Command not implemented 530 Authentication required [AUTH] 7 応答コード 本文書で用いた応答コードは以下のとおり。 250 要求されたメールのアクションは正常に完了した 450 ATRNの要求は拒絶された 451 今はATRN要求を処理できない 453 メールがない 502 コマンドは実装されていない 530 認証が必要である [AUTH] 8. Security Considerations Because access to the On-Demand Mail Relay server is only useful with a prior arrangement between the parties (so the provider is the target of MX records for the customer's domains and thus has mail to relay), it may be useful for the provider to restrict access to the On-Demand Mail Relay port. For example, the ODMR server could be Gellens Standards Track [Page 6] RFC 2645 On-Demand Mail Relay August 1999 configurable, or a TCP wrapper or firewall could be used, to block access to port 366 except within the provider's network. This might be useful when the provider is the customer's ISP. Use of such mechanisms does not reduce the need for the AUTH command, however, but can increase the security it provides. 8 セキュリティに関する考察 ODMRサーバへのアクセスは、それに先だって両者の取り決めがある場合のみや くだつ(つまり、providerがcustomerのドメインのMXレコードをもつことでリ レーするメールをもっている)ので、providerがODMRポートへのアクセスを制 限するのはやくだつかも知れない。たとえば、providerのネットワーク以外か らのport 366へのアクセスをブロックするようODMRサーバを設定するか、TCP wrapperやfirewallを利用するのは可能だろう。そういった機構を利用しても、 それによりセキュリティが高められるかも知れないが、AUTHコマンドの必要性 を減じるわけではない。 Use of SASL in the AUTH command allows for substitution of more secure authentication mechanisms in the future. See sections 5.1.2 and 5.2.1 for additional security details. AUTHコマンドでのSASLの利用は、将来さらにセキュアな認証メカニズムを提供 するだろう。 さらなるセキュリティに関する詳細はセクション5.1.2と5.2.1をみよ。 9. Acknowledgments This memo has been developed in part based on comments and discussions which took place on and off the IETF-disconn-smtp mailing list. Special thanks to Chris Newman and Ned Freed for their comments. 10. References [ABNF] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997. [AUTH] Myers, J., "SMTP Service Extension for Authentication", RFC 2554, March 1999. [CRAM] Klensin, J., Catoe, R. and P. Krumviede, "IMAP/POP AUTHorize Extension for Simple Challenge/Response", RFC 2195, September 1997. [ESMTP] Klensin, J., Freed, N., Rose, M., Stefferud, E. and D. Crocker, "SMTP Service Extensions", RFC 1869, November 1995. [ETRN] De Winter, J., "SMTP Service Extension for Remote Message Queue Starting", RFC 1985, August 1996. [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [SASL] Myers, J., "Simple Authentication and Security Layer (SASL)", RFC 2222, October 1997. [SMTP] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821, August 1982. Gellens Standards Track [Page 7] RFC 2645 On-Demand Mail Relay August 1999 11. Author's Address Randall Gellens QUALCOMM Incorporated 5775 Morehouse Dr. San Diego, CA 92121-2779 U.S.A. Phone: +1.619.651.5115 EMail: randy@qualcomm.com Gellens Standards Track [Page 8] RFC 2645 On-Demand Mail Relay August 1999 12. Full Copyright Statement Copyright (C) The Internet Society (1999). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Acknowledgement Funding for the RFC Editor function is currently provided by the Internet Society. Gellens Standards Track [Page 9]