t.m.p.POP3(basic.LineOnlyReceiver, policies.TimeoutMixin) : class documentation

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

Known subclasses: twisted.mail.protocols.VirtualPOP3

Implements interfaces: twisted.internet.interfaces.IProducer

POP3 server protocol implementation.
Instance Variable portal A reference to the twisted.cred.portal.Portal instance we will authenticate through.
Instance Variable factory A twisted.mail.pop3.IServerFactory which will be used to determine some extended behavior of the server.
Instance Variable timeOut An integer which defines the minimum amount of time which may elapse without receiving any traffic after which the client will be disconnected.
Instance Variable schedule A one-argument callable which should behave like twisted.internet.task.coiterate.
Method connectionMade Called when a connection is made.
Method connectionLost Called when the connection is shut down.
Method generateMagic Undocumented
Method successResponse Undocumented
Method failResponse Undocumented
Method lineReceived Override this for when each line is received.
Method state_COMMAND Undocumented
Method processCommand Undocumented
Method listCapabilities Undocumented
Method do_CAPA Undocumented
Method do_AUTH Undocumented
Method state_AUTH Undocumented
Method do_APOP Undocumented
Method do_USER Undocumented
Method do_PASS Undocumented
Method do_STAT Undocumented
Method do_LIST Undocumented
Method do_UIDL Undocumented
Method do_TOP Undocumented
Method do_RETR Undocumented
Method transformChunk Undocumented
Method finishedFileTransfer Undocumented
Method do_DELE Undocumented
Method do_NOOP Perform no operation. Return a success code
Method do_RSET Unset all deleted message flags
Method do_LAST Return the index of the highest message yet downloaded.
Method do_RPOP Undocumented
Method do_QUIT Undocumented
Method authenticateUserAPOP Perform authentication of an APOP login.
Method authenticateUserPASS Perform authentication of a username/password login.
Method _unblock Undocumented
Method _cbMailbox Undocumented
Method _ebMailbox Undocumented
Method _ebUnexpected Undocumented
Method _longOperation Undocumented
Method _coiterate Undocumented
Method _getMessageFile Retrieve the size and contents of a given message, as a two-tuple.
Method _sendMessageContent Undocumented

Inherited from LineOnlyReceiver:

Class Variable delimiter The line-ending delimiter to use. By default this is '\r\n'.
Class Variable MAX_LENGTH The maximum length of a line to allow (If a sent line is longer than this, the connection is dropped). Default is 16384.
Method dataReceived Translates bytes into lines, and calls lineReceived.
Method sendLine Sends a line to the other end of the connection.
Method lineLengthExceeded Called when the maximum line length has been reached. Override if it needs to be dealt with in some special way.

Inherited from Protocol (via LineOnlyReceiver):

Method logPrefix Return a prefix matching the class name, to identify log messages related to this protocol instance.

Inherited from BaseProtocol (via LineOnlyReceiver, Protocol):

Method makeConnection Make a connection to a transport and a server.

Inherited from TimeoutMixin:

Method callLater Wrapper around reactor.callLater for test purpose.
Method resetTimeout Reset the timeout count down.
Method setTimeout Change the timeout period
Method timeoutConnection Called when the connection times out.
Method __timedOut Undocumented
portal =
A reference to the twisted.cred.portal.Portal instance we will authenticate through.
factory =
A twisted.mail.pop3.IServerFactory which will be used to determine some extended behavior of the server.
timeOut =
An integer which defines the minimum amount of time which may elapse without receiving any traffic after which the client will be disconnected.
schedule =
A one-argument callable which should behave like twisted.internet.task.coiterate.
def connectionMade(self): (source)
Called when a connection is made.

This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.

def connectionLost(self, reason): (source)
Called when the connection is shut down.

Clear any circular references here, and any external references to this Protocol. The connection has been closed.

def generateMagic(self): (source)
Undocumented
def successResponse(self, message=''): (source)
Undocumented
def failResponse(self, message=''): (source)
Undocumented
def lineReceived(self, line): (source)
Override this for when each line is received.
ParameterslineThe line which was received with the delimiter removed. (type: str)
def _unblock(self, _): (source)
Undocumented
def state_COMMAND(self, line): (source)
Undocumented
def processCommand(self, command, *args): (source)
Undocumented
def listCapabilities(self): (source)
Undocumented
def do_CAPA(self): (source)
Undocumented
def do_AUTH(self, args=None): (source)
Undocumented
def state_AUTH(self, line): (source)
Undocumented
def do_APOP(self, user, digest): (source)
Undocumented
def _cbMailbox(self, (interface, avatar, logout), user): (source)
Undocumented
def _ebMailbox(self, failure): (source)
Undocumented
def _ebUnexpected(self, failure): (source)
Undocumented
def do_USER(self, user): (source)
Undocumented
def do_PASS(self, password): (source)
Undocumented
def _longOperation(self, d): (source)
Undocumented
def _coiterate(self, gen): (source)
Undocumented
def do_STAT(self): (source)
Undocumented
def do_LIST(self, i=None): (source)
Undocumented
def do_UIDL(self, i=None): (source)
Undocumented
def _getMessageFile(self, i): (source)
Retrieve the size and contents of a given message, as a two-tuple.
ParametersiThe number of the message to operate on. This is a base-ten string representation starting at 1.
ReturnsA Deferred which fires with a two-tuple of an integer and a file-like object.
def _sendMessageContent(self, i, fpWrapper, successResponse): (source)
Undocumented
def do_TOP(self, i, size): (source)
Undocumented
def do_RETR(self, i): (source)
Undocumented
def transformChunk(self, chunk): (source)
Undocumented
def finishedFileTransfer(self, lastsent): (source)
Undocumented
def do_DELE(self, i): (source)
Undocumented
def do_NOOP(self): (source)
Perform no operation. Return a success code
def do_RSET(self): (source)
Unset all deleted message flags
def do_LAST(self): (source)
Return the index of the highest message yet downloaded.
def do_RPOP(self, user): (source)
Undocumented
def do_QUIT(self): (source)
Undocumented
def authenticateUserAPOP(self, user, digest): (source)
Perform authentication of an APOP login.
ParametersuserThe name of the user attempting to log in. (type: str)
digestThe response string with which the user replied. (type: str)
ReturnsA deferred whose callback is invoked if the login is successful, and whose errback will be invoked otherwise. The callback will be passed a 3-tuple consisting of IMailbox, an object implementing IMailbox, and a zero-argument callable to be invoked when this session is terminated. (type: Deferred)
def authenticateUserPASS(self, user, password): (source)
Perform authentication of a username/password login.
ParametersuserThe name of the user attempting to log in. (type: str)
passwordThe password to attempt to authenticate with. (type: str)
ReturnsA deferred whose callback is invoked if the login is successful, and whose errback will be invoked otherwise. The callback will be passed a 3-tuple consisting of IMailbox, an object implementing IMailbox, and a zero-argument callable to be invoked when this session is terminated. (type: Deferred)
API Documentation for Twisted, generated by pydoctor at 2012-06-04 17:20:01.