"smtpd" — SMTP サーバー
***********************

**ソースコード:** Lib/smtpd.py

======================================================================

This module offers several classes to implement SMTP servers.  One is
a generic do-nothing implementation, which can be overridden, while
the other two offer specific mail-sending strategies.


SMTPServer オブジェクト
=======================

class smtpd.SMTPServer(localaddr, remoteaddr)

   新たな "SMTPServer" オブジェクトを作成し、それをローカルのアドレス
   *localaddr* に関連づけ (bind) ます。 このオブジェクトは
   *remoteaddr* を上流の SMTP リレー先とします。 *localaddr* と
   *remoteaddr* のどちらも (host, port) タプルである必要があります。
   このクラスは "asyncore.dispatcher" を継承しており、インスタンス化時
   に自身を "asyncore" のイベントループに登録します。

   process_message(peer, mailfrom, rcpttos, data)

      Raise "NotImplementedError" exception. Override this in
      subclasses to do something useful with this message. Whatever
      was passed in the constructor as *remoteaddr* will be available
      as the "_remoteaddr" attribute. *peer* is the remote host’s
      address, *mailfrom* is the envelope originator, *rcpttos* are
      the envelope recipients and *data* is a string containing the
      contents of the e-mail (which should be in **RFC 2822** format).


DebuggingServer オブジェクト
============================

class smtpd.DebuggingServer(localaddr, remoteaddr)

   新たなデバッグ用サーバを生成します。引数は "SMTPServer" と同じです
   。メッセージが届いても無視し、標準出力に出力します。


PureProxy オブジェクト
======================

class smtpd.PureProxy(localaddr, remoteaddr)

   新たな単純プロキシ (pure proxy) サーバを生成します。引数は
   "SMTPServer" と同じです。全てのメッセージを *remoteaddr* にリレーし
   ます。このオブジェクトを動作させるとオープンリレーを作成してしまう
   可能性が多分にあります。注意してください。


MailmanProxy Objects
====================

class smtpd.MailmanProxy(localaddr, remoteaddr)

   新たな単純プロキシサーバを生成します。引数は "SMTPServer" と同じで
   す。全てのメッセージを *remoteaddr* にリレーしますが、 ローカルの
   mailman の設定に *remoteaddr* がある場合には mailman を使って処理し
   ます。このオブジェクトを動作させるとオープンリレーを 作成してしまう
   可能性が多分にあります。注意してください。
