Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2363e8f

Browse files
committed
Added documentation for the "smtpd" module.
Closes SF bug #450803.
1 parent 88e8e34 commit 2363e8f

3 files changed

Lines changed: 65 additions & 0 deletions

File tree

Doc/Makefile.deps

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ LIBFILES= $(MANSTYLES) $(INDEXSTYLES) $(COMMONTEX) \
288288
lib/libheapq.tex \
289289
lib/libmimetypes.tex \
290290
lib/libsmtplib.tex \
291+
lib/libsmtpd.tex \
291292
lib/libcmd.tex \
292293
lib/libmultifile.tex \
293294
lib/libthreading.tex \

Doc/lib/lib.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ \chapter*{Front Matter\label{front}}
228228
\input{libimaplib}
229229
\input{libnntplib}
230230
\input{libsmtplib}
231+
\input{libsmtpd}
231232
\input{libtelnetlib}
232233
\input{liburlparse}
233234
\input{libsocksvr}

Doc/lib/libsmtpd.tex

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
\section{\module{smtpd} ---
2+
SMTP Server}
3+
4+
\declaremodule{standard}{smtpd}
5+
6+
\moduleauthor{Barry Warsaw}{[email protected]}
7+
\sectionauthor{Moshe Zadka}{[email protected]}
8+
9+
\modulesynopsis{Implement a flexible SMTP server}
10+
11+
This module offers several classes to implement SMTP servers. One is
12+
a generic do-nothing implementation, which can be overridden, while
13+
the other two offer specific mail-sending strategies.
14+
15+
16+
\subsection{SMTPServer Objects}
17+
18+
\begin{classdesc}{SMTPServer}{localaddr, remoteaddr}
19+
Create a new \class{SMTPServer} object, which binds to local address
20+
\var{localaddr}. It will treat \var{remoteaddr} as an upstream SMTP
21+
relayer. It inherits from \class{asyncore.dispatcher}, and so will
22+
insert itself into \refmodule{asyncore}'s event loop on instantiation.
23+
\end{classdesc}
24+
25+
\begin{methoddesc}[SMTPServer]{process_message}{peer, mailfrom, rcpttos, data}
26+
Raise \exception{NotImplementedError} exception. Override this in
27+
subclasses to do something useful with this message. Whatever was
28+
passed in the constructor as \var{remoteaddr} will be available as the
29+
\member{_remoteaddr} attribute. \var{peer} is the remote host's address,
30+
\var{mailfrom} is the envelope originator, \var{rcpttos} are the
31+
envelope recipients and \var{data} is a string containing the contents
32+
of the e-mail (which should be in \rfc{2822} format).
33+
\end{methoddesc}
34+
35+
36+
\subsection{DebuggingServer Objects}
37+
38+
\begin{classdesc}{DebuggingServer}{localaddr, remoteaddr}
39+
Create a new debugging server. Arguments are as per
40+
\class{SMTPServer}. Messages will be discarded, and printed on
41+
stdout.
42+
\end{classdesc}
43+
44+
45+
\subsection{PureProxy Objects}
46+
47+
\begin{classdesc}{PureProxy}{localaddr, remoteaddr}
48+
Create a new pure proxy server. Arguments are as per \class{SMTPServer}.
49+
Everything will be relayed to \var{remoteaddr}. Note that running
50+
this has a good chance to make you into an open relay, so please be
51+
careful.
52+
\end{classdesc}
53+
54+
55+
\subsection{MailmanProxy Objects}
56+
57+
\begin{classdesc}{MailmanProxy}{localaddr, remoteaddr}
58+
Create a new pure proxy server. Arguments are as per
59+
\class{SMTPServer}. Everything will be relayed to \var{remoteaddr},
60+
unless local mailman configurations knows about an address, in which
61+
case it will be handled via mailman. Note that running this has a
62+
good chance to make you into an open relay, so please be careful.
63+
\end{classdesc}

0 commit comments

Comments
 (0)