Table of Contents

Class: SmartHostSMTPRelayingManager Twisted-0.17.4/twisted/mail/relaymanager.py

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

Methods   
__getstate__
__init__
__setstate__
_finish
checkState
notifyDone
notifyFailure
notifyNoConnection
notifySuccess
readDirectory
  __getstate__ 
__getstate__ ( self )

(internal) delete volatile state

  __init__ 
__init__ (
        self,
        directory,
        smartHostAddr,
        maxConnections=1,
        maxMessagesPerConnection=10,
        )

initialize

directory should be a directory full of pickles smartHostIP is the IP for the smart host maxConnections is the number of simultaneous relayers maxMessagesPerConnection is the maximum number of messages a relayer will be given responsibility for.

Default values are meant for a small box with 1-5 users.

  __setstate__ 
__setstate__ ( self,  state )

(internal) restore volatile state

  _finish 
_finish ( self,  message )

  checkState 
checkState ( self )

call me periodically to check I am still up to date

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

  notifyDone 
notifyDone ( self,  relay )

a relay finished

unmark all pending messages under this relay's resposibility as being relayed, and remove the relay.

  notifyFailure 
notifyFailure (
        self,
        relay,
        message,
        )

  notifyNoConnection 
notifyNoConnection ( self,  relay )

  notifySuccess 
notifySuccess (
        self,
        relay,
        message,
        )

a relay sent a message successfully

Mark it as sent in our lists

  readDirectory 
readDirectory ( self )

read the messages directory

look for new messages


Table of Contents

This document was automatically generated on Sat Apr 20 01:30:55 2002 by HappyDoc version 2.0