smtpd.rst 2.26 KB

:mod:`smtpd` --- 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.

SMTPServer Objects

Create a new :class:`SMTPServer` object, which binds to local address localaddr. It will treat remoteaddr as an upstream SMTP relayer. It inherits from :class:`asyncore.dispatcher`, and so will insert itself into :mod:`asyncore`'s event loop on instantiation.

DebuggingServer Objects

Create a new debugging server. Arguments are as per :class:`SMTPServer`. Messages will be discarded, and printed on stdout.

PureProxy Objects

Create a new pure proxy server. Arguments are as per :class:`SMTPServer`. Everything will be relayed to remoteaddr. Note that running this has a good chance to make you into an open relay, so please be careful.

MailmanProxy Objects

Create a new pure proxy server. Arguments are as per :class:`SMTPServer`. Everything will be relayed to 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.