# HG changeset patch # Parent 04b2abf0304686debd4b7c925dbe7b78ad238372 diff -r 04b2abf03046 -r 0d6ec60b7d0a Doc/library/smtpd.rst --- a/Doc/library/smtpd.rst Sun Feb 20 19:19:24 2011 +0100 +++ b/Doc/library/smtpd.rst Sun Feb 20 19:57:00 2011 +0100 @@ -168,3 +168,39 @@ from the client in :attr:`received_data` until the terminator "\r\n.\r\n" is received. ======== =================================================================== + +Run as a script +--------------- + +``smtpd`` is a pluggable RFC 2821-compliant SMTP proxy. + +It relies on proxy classes (such as :class:`PureProxy`) to do the +actual proxying work, and special cases can be handled by provinding a +custom SMTP proxy class. + +.. program:: smtpd.py + +.. option:: -n, --nosetuid + + By default, ``smtpd`` tries to setuid ``nobody``. If it is not run + as root, the ``setuid`` call will fail. You may want to set this + flag in order to run ``smtpd`` as a regular user. + +.. option:: -d, --debug + + Turns on verbose debugging prints (to stderr) + +.. option:: -c , --class + + The concrete SMTP proxy class ``smtpd`` should use to perform its + proxying. To use classes outside of ``smtpd``, specify their + complete dotted name (for classes of ``smtpd``, such as + :class:`MailmanProxy`, the module name is optional). + + The default proxy class is :class:`PureProxy`. + +.. option:: localhost:localport + +.. option:: remotehost:remoteport + + The remote address all SMTP connections are relayed to.