]> granicus.if.org Git - python/commitdiff
Added documentation for the "smtpd" module.
authorFred Drake <fdrake@acm.org>
Sun, 11 Jul 2004 16:25:25 +0000 (16:25 +0000)
committerFred Drake <fdrake@acm.org>
Sun, 11 Jul 2004 16:25:25 +0000 (16:25 +0000)
Closes SF bug #450803.

Doc/Makefile.deps
Doc/lib/lib.tex
Doc/lib/libsmtpd.tex [new file with mode: 0644]

index 3f569efa2d316cdffe1e71f80e1af6ea15a27aa9..9ad5f193a648078886e1bd7f96cb4d523d24988c 100644 (file)
@@ -288,6 +288,7 @@ LIBFILES= $(MANSTYLES) $(INDEXSTYLES) $(COMMONTEX) \
        lib/libheapq.tex \
        lib/libmimetypes.tex \
        lib/libsmtplib.tex \
+       lib/libsmtpd.tex \
        lib/libcmd.tex \
        lib/libmultifile.tex \
        lib/libthreading.tex \
index 4fe4f01b78d44c0837ce29255fbf2a28e6c8e1f3..8895b578321d8c0b4f98f5ccf4df4f031fceb8f2 100644 (file)
@@ -228,6 +228,7 @@ and how to embed it in other applications.
 \input{libimaplib}
 \input{libnntplib}
 \input{libsmtplib}
+\input{libsmtpd}
 \input{libtelnetlib}
 \input{liburlparse}
 \input{libsocksvr}
diff --git a/Doc/lib/libsmtpd.tex b/Doc/lib/libsmtpd.tex
new file mode 100644 (file)
index 0000000..657050d
--- /dev/null
@@ -0,0 +1,63 @@
+\section{\module{smtpd} ---
+         SMTP Server}
+
+\declaremodule{standard}{smtpd}
+
+\moduleauthor{Barry Warsaw}{barry@zope.com}
+\sectionauthor{Moshe Zadka}{moshez@moshez.org}
+
+\modulesynopsis{Implement a flexible SMTP server}
+
+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.
+
+
+\subsection{SMTPServer Objects}
+
+\begin{classdesc}{SMTPServer}{localaddr, remoteaddr}
+Create a new \class{SMTPServer} object, which binds to local address
+\var{localaddr}.  It will treat \var{remoteaddr} as an upstream SMTP
+relayer.  It inherits from \class{asyncore.dispatcher}, and so will
+insert itself into \refmodule{asyncore}'s event loop on instantiation.
+\end{classdesc}
+
+\begin{methoddesc}[SMTPServer]{process_message}{peer, mailfrom, rcpttos, data}
+Raise \exception{NotImplementedError} exception. Override this in
+subclasses to do something useful with this message. Whatever was
+passed in the constructor as \var{remoteaddr} will be available as the
+\member{_remoteaddr} attribute. \var{peer} is the remote host's address,
+\var{mailfrom} is the envelope originator, \var{rcpttos} are the
+envelope recipients and \var{data} is a string containing the contents
+of the e-mail (which should be in \rfc{2822} format).
+\end{methoddesc}
+
+
+\subsection{DebuggingServer Objects}
+
+\begin{classdesc}{DebuggingServer}{localaddr, remoteaddr}
+Create a new debugging server.  Arguments are as per
+\class{SMTPServer}.  Messages will be discarded, and printed on
+stdout.
+\end{classdesc}
+
+
+\subsection{PureProxy Objects}
+
+\begin{classdesc}{PureProxy}{localaddr, remoteaddr}
+Create a new pure proxy server. Arguments are as per \class{SMTPServer}.
+Everything will be relayed to \var{remoteaddr}.  Note that running
+this has a good chance to make you into an open relay, so please be
+careful.
+\end{classdesc}
+
+
+\subsection{MailmanProxy Objects}
+
+\begin{classdesc}{MailmanProxy}{localaddr, remoteaddr}
+Create a new pure proxy server. Arguments are as per
+\class{SMTPServer}.  Everything will be relayed to \var{remoteaddr},
+unless local mailman configurations knows about an address, in which
+case it will be handled via mailman.  Note that running this has a
+good chance to make you into an open relay, so please be careful.
+\end{classdesc}