t.m.r.SmartHostSMTPRelayingManager : class documentation

Part of twisted.mail.relaymanager View Source View In Hierarchy

Known subclasses: twisted.mail.relaymanager.SmartHostESMTPRelayingManager

Manage SMTP Relayers

Manage SMTP relayers, keeping track of the existing connections, each connection's responsibility in term of messages. Create more relayers if the need arises.

Someone should press .checkState periodically
Instance VariablesfArgsAdditional positional arguments used to instantiate factory.
fKwArgsAdditional keyword arguments used to instantiate factory.
factoryA callable which returns a ClientFactory suitable for making SMTP connections.
Method __init__
Method __getstate__ (internal) delete volatile state
Method __setstate__ (internal) restore volatile state
Method checkState Synchronize with the state of the world, and maybe launch a new relay.
Method _checkStateMX Undocumented
Method _cbExchange Undocumented
Method _ebExchange Undocumented
def __init__(self, queue, maxConnections=2, maxMessagesPerConnection=10): (source)
ParametersqueueThe object used to queue messages on their way to delivery. (type: Any implementor of IQueue )
maxConnectionsThe maximum number of SMTP connections to allow to be opened at any given time. (type: int )

The maximum number of messages a relayer will be given responsibility for.

Default values are meant for a small box with 1-5 users. (type: int )
def __getstate__(self): (source)
(internal) delete volatile state
def __setstate__(self, state): (source)
(internal) restore volatile state
def checkState(self): (source)

Synchronize with the state of the world, and maybe launch a new relay.

Call me periodically to check I am still up to date.
ReturnsNone or a Deferred which fires when all of the SMTP clients started by this call have disconnected.
def _checkStateMX(self): (source)
def _cbExchange(self, address, port, factory): (source)
def _ebExchange(self, failure, factory, domain): (source)
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:02:37.