t.m.i.IMAP4Server(basic.LineReceiver, policies.TimeoutMixin) : class documentation

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

Implements interfaces: twisted.mail.imap4.IMailboxListener

Protocol implementation for an IMAP4rev1 server.

The server can be in any of four states:
Method __init__ Undocumented
Method capabilities Undocumented
Method connectionMade Called when a connection is made.
Method connectionLost Called when the connection is shut down.
Method timeoutConnection Called when the connection times out. Override to define behavior other than dropping the connection.
Method rawDataReceived Override this for when raw data is received.
Method lineReceived Override this for when each line is received.
Method parse_command Undocumented
Method parse_pending Undocumented
Method dispatchCommand Undocumented
Method lookupCommand Undocumented
Method arg_astring Parse an astring from the line, return (arg, rest), possibly via a deferred (to handle literals)
Method arg_atom Parse an atom from the line
Method arg_plist Parse a (non-nested) parenthesised list from the line
Method arg_literal Parse a literal from the line
Method arg_searchkeys searchkeys
Method arg_seqset sequence-set
Method arg_fetchatt fetch-att
Method arg_flaglist Flag part of store-att-flag
Method arg_line Command line of UID command
Method opt_plist Optional parenthesised list
Method opt_datetime Optional date-time string
Method opt_charset Optional charset of SEARCH command
Method sendServerGreeting Undocumented
Method sendBadResponse Undocumented
Method sendPositiveResponse Undocumented
Method sendNegativeResponse Undocumented
Method sendUntaggedResponse Undocumented
Method sendContinuationRequest Undocumented
Method listCapabilities Undocumented
Method do_CAPABILITY Undocumented
Method do_LOGOUT Undocumented
Method do_NOOP Undocumented
Method do_AUTHENTICATE Undocumented
Method authenticate Undocumented
Method do_STARTTLS Undocumented
Method do_LOGIN Undocumented
Method authenticateLogin Lookup the account associated with the given parameters
Method do_NAMESPACE Undocumented
Method do_IDLE Undocumented
Method parse_idle Undocumented
Method do_CREATE Undocumented
Method do_DELETE Undocumented
Method do_RENAME Undocumented
Method do_SUBSCRIBE Undocumented
Method do_UNSUBSCRIBE Undocumented
Method do_STATUS Undocumented
Method do_APPEND Undocumented
Method do_CHECK Undocumented
Method checkpoint Called when the client issues a CHECK command.
Method do_CLOSE Undocumented
Method do_EXPUNGE Undocumented
Method do_SEARCH Undocumented
Method searchFilter Undocumented
Method singleSearchStep Undocumented
Method search_ALL Undocumented
Method search_ANSWERED Undocumented
Method search_BCC Undocumented
Method search_BEFORE Undocumented
Method search_BODY Undocumented
Method search_CC Undocumented
Method search_DELETED Undocumented
Method search_DRAFT Undocumented
Method search_FLAGGED Undocumented
Method search_FROM Undocumented
Method search_HEADER Undocumented
Method search_KEYWORD Undocumented
Method search_LARGER Undocumented
Method search_NEW Undocumented
Method search_NOT Undocumented
Method search_OLD Undocumented
Method search_ON Undocumented
Method search_OR Undocumented
Method search_RECENT Undocumented
Method search_SEEN Undocumented
Method search_SENTBEFORE Undocumented
Method search_SENTON Undocumented
Method search_SENTSINCE Undocumented
Method search_SINCE Undocumented
Method search_SMALLER Undocumented
Method search_SUBJECT Undocumented
Method search_TEXT Undocumented
Method search_TO Undocumented
Method search_UID Undocumented
Method search_UNANSWERED Undocumented
Method search_UNDELETED Undocumented
Method search_UNDRAFT Undocumented
Method search_UNFLAGGED Undocumented
Method search_UNKEYWORD Undocumented
Method search_UNSEEN Undocumented
Method do_FETCH Undocumented
Method spew_envelope Undocumented
Method spew_flags Undocumented
Method spew_internaldate Undocumented
Method spew_rfc822header Undocumented
Method spew_rfc822text Undocumented
Method spew_rfc822size Undocumented
Method spew_rfc822 Undocumented
Method spew_uid Undocumented
Method spew_bodystructure Undocumented
Method spew_body Undocumented
Method spewMessage Undocumented
Method do_STORE Undocumented
Method do_COPY Undocumented
Method do_UID Undocumented
Method modeChanged Indicates that the write status of a mailbox has changed.
Method flagsChanged Indicates that the flags of one or more messages have changed.
Method newMessages Indicates that the number of messages in a mailbox has changed.
Method _unblock Undocumented
Method __doCommand Undocumented
Method __cbDispatch Undocumented
Method __ebDispatch Undocumented
Method _stringLiteral Undocumented
Method _fileLiteral Undocumented
Method _respond Undocumented
Method _setupChallenge Undocumented
Method __cbAuthChunk Undocumented
Method __cbAuthResp Undocumented
Method __ebAuthResp Undocumented
Method __ebAuthChunk Undocumented
Method __cbLogin Undocumented
Method __ebLogin Undocumented
Method _parseMbox Undocumented
Method _selectWork Undocumented
Method _ebSelectWork Undocumented
Method _cbSelectWork Undocumented
Method _listWork Undocumented
Method _cbListWork Undocumented
Method _ebListWork Undocumented
Method _cbStatusGotMailbox Undocumented
Method _ebStatusGotMailbox Undocumented
Method __cbStatus Undocumented
Method __ebStatus Undocumented
Method _cbAppendGotMailbox Undocumented
Method _ebAppendGotMailbox Undocumented
Method __cbAppend Undocumented
Method __ebAppend Undocumented
Method __cbCheck Undocumented
Method __ebCheck Undocumented
Method __cbClose Undocumented
Method __ebClose Undocumented
Method __cbExpunge Undocumented
Method __ebExpunge Undocumented
Method __cbSearch Undocumented
Method __cbManualSearch Undocumented
Method __ebSearch Undocumented
Method __cbFetch Undocumented
Method __ebSpewMessage Undocumented
Method __ebFetch Undocumented
Method __cbStore Undocumented
Method __ebStore Undocumented
Method _cbCopySelectedMailbox Undocumented
Method _ebCopySelectedMailbox Undocumented
Method __cbCopy Undocumented
Method __cbCopied Undocumented
Method __ebCopy Undocumented

Inherited from LineReceiver:

Method clearLineBuffer Clear buffered data.
Method dataReceived Protocol.dataReceived. Translates bytes into lines, and calls lineReceived (or rawDataReceived, depending on mode.)
Method setLineMode Sets the line-mode of this receiver.
Method setRawMode Sets the raw mode of this receiver. Further data received will be sent to rawDataReceived rather than 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 BaseProtocol (via LineReceiver, Protocol):

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

Inherited from _PauseableMixin (via LineReceiver):

Method pauseProducing Undocumented
Method resumeProducing Undocumented
Method stopProducing Undocumented

Inherited from TimeoutMixin:

Method callLater Undocumented
Method resetTimeout Reset the timeout count down
Method setTimeout Change the timeout period
Method __timedOut Undocumented
def __init__(self, chal=None, contextFactory=None, scheduler=None): (source)
Undocumented
def capabilities(self): (source)
Undocumented
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.
Parametersreason (type: twisted.python.failure.Failure )
def timeoutConnection(self): (source)
Called when the connection times out. Override to define behavior other than dropping the connection.
def rawDataReceived(self, data): (source)
Override this for when raw data is received.
def _unblock(self): (source)
Undocumented
def lineReceived(self, line): (source)
Override this for when each line is received.
def parse_command(self, line): (source)
Undocumented
def parse_pending(self, line): (source)
Undocumented
def dispatchCommand(self, tag, cmd, rest, uid=None): (source)
Undocumented
def lookupCommand(self, cmd): (source)
Undocumented
def __doCommand(self, tag, handler, args, parseargs, line, uid): (source)
Undocumented
def __cbDispatch(self, (arg, rest), tag, fn, args, parseargs, uid): (source)
Undocumented
def __ebDispatch(self, failure, tag): (source)
Undocumented
def _stringLiteral(self, size): (source)
Undocumented
def _fileLiteral(self, size): (source)
Undocumented
def arg_astring(self, line): (source)
Parse an astring from the line, return (arg, rest), possibly via a deferred (to handle literals)
def arg_atom(self, line): (source)
Parse an atom from the line
def arg_plist(self, line): (source)
Parse a (non-nested) parenthesised list from the line
def arg_literal(self, line): (source)
Parse a literal from the line
def arg_searchkeys(self, line): (source)
searchkeys
def arg_seqset(self, line): (source)
sequence-set
def arg_fetchatt(self, line): (source)
fetch-att
def arg_flaglist(self, line): (source)
Flag part of store-att-flag
def arg_line(self, line): (source)
Command line of UID command
def opt_plist(self, line): (source)
Optional parenthesised list
def opt_datetime(self, line): (source)
Optional date-time string
def opt_charset(self, line): (source)
Optional charset of SEARCH command
def sendServerGreeting(self): (source)
Undocumented
def sendBadResponse(self, tag=None, message=''): (source)
Undocumented
def sendPositiveResponse(self, tag=None, message=''): (source)
Undocumented
def sendNegativeResponse(self, tag=None, message=''): (source)
Undocumented
def sendUntaggedResponse(self, message, async=False): (source)
Undocumented
def sendContinuationRequest(self, msg='Ready for additional command text'): (source)
Undocumented
def _respond(self, state, tag, message): (source)
Undocumented
def listCapabilities(self): (source)
Undocumented
def do_CAPABILITY(self, tag): (source)
Undocumented
def do_LOGOUT(self, tag): (source)
Undocumented
def do_NOOP(self, tag): (source)
Undocumented
def do_AUTHENTICATE(self, tag, args): (source)
Undocumented
def authenticate(self, chal, tag): (source)
Undocumented
def _setupChallenge(self, chal, tag): (source)
Undocumented
def __cbAuthChunk(self, result, chal, tag): (source)
Undocumented
def __cbAuthResp(self, (iface, avatar, logout), tag): (source)
Undocumented
def __ebAuthResp(self, failure, tag): (source)
Undocumented
def __ebAuthChunk(self, failure, tag): (source)
Undocumented
def do_STARTTLS(self, tag): (source)
Undocumented
def do_LOGIN(self, tag, user, passwd): (source)
Undocumented
def authenticateLogin(self, user, passwd): (source)

Lookup the account associated with the given parameters

Override this method to define the desired authentication behavior.

The default behavior is to defer authentication to self.portal if it is not None, or to deny the login otherwise.
ParametersuserThe username to lookup (type: str )
passwdThe password to login with (type: str )
def __cbLogin(self, (iface, avatar, logout), tag): (source)
Undocumented
def __ebLogin(self, failure, tag): (source)
Undocumented
def do_NAMESPACE(self, tag): (source)
Undocumented
def _parseMbox(self, name): (source)
Undocumented
def _selectWork(self, tag, name, rw, cmdName): (source)
Undocumented
def _ebSelectWork(self, failure, cmdName, tag): (source)
Undocumented
def _cbSelectWork(self, mbox, cmdName, tag): (source)
Undocumented
def do_IDLE(self, tag): (source)
Undocumented
def parse_idle(self, *args): (source)
Undocumented
def do_CREATE(self, tag, name): (source)
Undocumented
def do_DELETE(self, tag, name): (source)
Undocumented
def do_RENAME(self, tag, oldname, newname): (source)
Undocumented
def do_SUBSCRIBE(self, tag, name): (source)
Undocumented
def do_UNSUBSCRIBE(self, tag, name): (source)
Undocumented
def _listWork(self, tag, ref, mbox, sub, cmdName): (source)
Undocumented
def _cbListWork(self, mailboxes, tag, sub, cmdName): (source)
Undocumented
def _ebListWork(self, failure, tag): (source)
Undocumented
def do_STATUS(self, tag, mailbox, names): (source)
Undocumented
def _cbStatusGotMailbox(self, mbox, tag, mailbox, names): (source)
Undocumented
def _ebStatusGotMailbox(self, failure, tag): (source)
Undocumented
def __cbStatus(self, status, tag, box): (source)
Undocumented
def __ebStatus(self, failure, tag, box): (source)
Undocumented
def do_APPEND(self, tag, mailbox, flags, date, message): (source)
Undocumented
def _cbAppendGotMailbox(self, mbox, tag, flags, date, message): (source)
Undocumented
def _ebAppendGotMailbox(self, failure, tag): (source)
Undocumented
def __cbAppend(self, result, tag, mbox): (source)
Undocumented
def __ebAppend(self, failure, tag): (source)
Undocumented
def do_CHECK(self, tag): (source)
Undocumented
def __cbCheck(self, result, tag): (source)
Undocumented
def __ebCheck(self, failure, tag): (source)
Undocumented
def checkpoint(self): (source)

Called when the client issues a CHECK command.

This should perform any checkpoint operations required by the server. It may be a long running operation, but may not block. If it returns a deferred, the client will only be informed of success (or failure) when the deferred's callback (or errback) is invoked.
def do_CLOSE(self, tag): (source)
Undocumented
def __cbClose(self, result, tag): (source)
Undocumented
def __ebClose(self, failure, tag): (source)
Undocumented
def do_EXPUNGE(self, tag): (source)
Undocumented
def __cbExpunge(self, result, tag): (source)
Undocumented
def __ebExpunge(self, failure, tag): (source)
Undocumented
def do_SEARCH(self, tag, charset, query, uid=0): (source)
Undocumented
def __cbSearch(self, result, tag, mbox, uid): (source)
Undocumented
def __cbManualSearch(self, result, tag, mbox, query, uid, searchResults=None): (source)
Undocumented
def searchFilter(self, query, id, msg): (source)
Undocumented
def singleSearchStep(self, query, id, msg): (source)
Undocumented
def search_ALL(self, query, id, msg): (source)
Undocumented
def search_ANSWERED(self, query, id, msg): (source)
Undocumented
def search_BCC(self, query, id, msg): (source)
Undocumented
def search_BEFORE(self, query, id, msg): (source)
Undocumented
def search_BODY(self, query, id, msg): (source)
Undocumented
def search_CC(self, query, id, msg): (source)
Undocumented
def search_DELETED(self, query, id, msg): (source)
Undocumented
def search_DRAFT(self, query, id, msg): (source)
Undocumented
def search_FLAGGED(self, query, id, msg): (source)
Undocumented
def search_FROM(self, query, id, msg): (source)
Undocumented
def search_HEADER(self, query, id, msg): (source)
Undocumented
def search_KEYWORD(self, query, id, msg): (source)
Undocumented
def search_LARGER(self, query, id, msg): (source)
Undocumented
def search_NEW(self, query, id, msg): (source)
Undocumented
def search_NOT(self, query, id, msg): (source)
Undocumented
def search_OLD(self, query, id, msg): (source)
Undocumented
def search_ON(self, query, id, msg): (source)
Undocumented
def search_OR(self, query, id, msg): (source)
Undocumented
def search_RECENT(self, query, id, msg): (source)
Undocumented
def search_SEEN(self, query, id, msg): (source)
Undocumented
def search_SENTBEFORE(self, query, id, msg): (source)
Undocumented
def search_SENTON(self, query, id, msg): (source)
Undocumented
def search_SENTSINCE(self, query, id, msg): (source)
Undocumented
def search_SINCE(self, query, id, msg): (source)
Undocumented
def search_SMALLER(self, query, id, msg): (source)
Undocumented
def search_SUBJECT(self, query, id, msg): (source)
Undocumented
def search_TEXT(self, query, id, msg): (source)
Undocumented
def search_TO(self, query, id, msg): (source)
Undocumented
def search_UID(self, query, id, msg): (source)
Undocumented
def search_UNANSWERED(self, query, id, msg): (source)
Undocumented
def search_UNDELETED(self, query, id, msg): (source)
Undocumented
def search_UNDRAFT(self, query, id, msg): (source)
Undocumented
def search_UNFLAGGED(self, query, id, msg): (source)
Undocumented
def search_UNKEYWORD(self, query, id, msg): (source)
Undocumented
def search_UNSEEN(self, query, id, msg): (source)
Undocumented
def __ebSearch(self, failure, tag): (source)
Undocumented
def do_FETCH(self, tag, messages, query, uid=0): (source)
Undocumented
def __cbFetch(self, results, tag, query, uid): (source)
Undocumented
def __ebSpewMessage(self, failure): (source)
Undocumented
def spew_envelope(self, id, msg, _w=None, _f=None): (source)
Undocumented
def spew_flags(self, id, msg, _w=None, _f=None): (source)
Undocumented
def spew_internaldate(self, id, msg, _w=None, _f=None): (source)
Undocumented
def spew_rfc822header(self, id, msg, _w=None, _f=None): (source)
Undocumented
def spew_rfc822text(self, id, msg, _w=None, _f=None): (source)
Undocumented
def spew_rfc822size(self, id, msg, _w=None, _f=None): (source)
Undocumented
def spew_rfc822(self, id, msg, _w=None, _f=None): (source)
Undocumented
def spew_uid(self, id, msg, _w=None, _f=None): (source)
Undocumented
def spew_bodystructure(self, id, msg, _w=None, _f=None): (source)
Undocumented
def spew_body(self, part, id, msg, _w=None, _f=None): (source)
Undocumented
def spewMessage(self, id, msg, query, uid): (source)
Undocumented
def __ebFetch(self, failure, tag): (source)
Undocumented
def do_STORE(self, tag, messages, mode, flags, uid=0): (source)
Undocumented
def __cbStore(self, result, tag, mbox, uid, silent): (source)
Undocumented
def __ebStore(self, failure, tag): (source)
Undocumented
def do_COPY(self, tag, messages, mailbox, uid=0): (source)
Undocumented
def _cbCopySelectedMailbox(self, mbox, tag, messages, mailbox, uid): (source)
Undocumented
def _ebCopySelectedMailbox(self, failure, tag): (source)
Undocumented
def __cbCopy(self, messages, tag, mbox): (source)
Undocumented
def __cbCopied(self, deferredIds, tag, mbox): (source)
Undocumented
def __ebCopy(self, failure, tag): (source)
Undocumented
def do_UID(self, tag, command, line): (source)
Undocumented
def modeChanged(self, writeable): (source)
Indicates that the write status of a mailbox has changed.
ParameterswriteableA true value if write is now allowed, false otherwise. (type: bool )
def flagsChanged(self, newFlags): (source)
Indicates that the flags of one or more messages have changed.
ParametersnewFlagsA mapping of message identifiers to tuples of flags now set on that message. (type: dict )
def newMessages(self, exists, recent): (source)
Indicates that the number of messages in a mailbox has changed.
ParametersexistsThe total number of messages now in this mailbox. If the total number of messages has not changed, this should be None. (type: int or None )
recentThe number of messages now flagged \Recent. If the number of recent messages has not changed, this should be None. (type: int )
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:02:37.