class documentation

class IMAP4Server(basic.LineReceiver, policies.TimeoutMixin): (source)

Implements interfaces: twisted.mail.interfaces.IMailboxIMAPListener

View In Hierarchy

Protocol implementation for an IMAP4rev1 server.

The server can be in any of four states:

  • Non-authenticated
  • Authenticated
  • Selected
  • Logout
Method __init__ 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​_fetchatt fetch-att
Method arg​_finalastring Parse an astring from line that represents a command's final argument. This special case exists to enable parsing empty string literals.
Method arg​_flaglist Flag part of store-att-flag
Method arg​_line Command line of UID command
Method arg​_literal Parse a literal from the line
Method arg​_plist Parse a (non-nested) parenthesised list from the line
Method arg​_searchkeys searchkeys
Method arg​_seqset sequence-set
Method authenticate Undocumented
Method authenticate​Login Lookup the account associated with the given parameters
Method capabilities Undocumented
Method checkpoint Called when the client issues a CHECK command.
Method connection​Lost Called when the connection is shut down.
Method connection​Made Called when a connection is made.
Method dispatch​Command Undocumented
Method do_​APPEND Undocumented
Method do_​AUTHENTICATE Undocumented
Method do_​CAPABILITY Undocumented
Method do_​CHECK Undocumented
Method do_​CLOSE Undocumented
Method do_​COPY Undocumented
Method do_​CREATE Undocumented
Method do_​DELETE Undocumented
Method do_​EXPUNGE Undocumented
Method do_​FETCH Undocumented
Method do_​IDLE Undocumented
Method do_​LOGIN Undocumented
Method do_​LOGOUT Undocumented
Method do_​NAMESPACE Undocumented
Method do_​NOOP Undocumented
Method do_​RENAME Undocumented
Method do_​SEARCH Undocumented
Method do_​STARTTLS Undocumented
Method do_​STATUS Undocumented
Method do_​STORE Undocumented
Method do_​SUBSCRIBE Undocumented
Method do_​UID Undocumented
Method do_​UNSUBSCRIBE Undocumented
Method flags​Changed Indicates that the flags of one or more messages have changed.
Method line​Received Override this for when each line is received.
Method list​Capabilities Undocumented
Method lookup​Command Undocumented
Method mode​Changed Indicates that the write status of a mailbox has changed.
Method new​Messages Indicates that the number of messages in a mailbox has changed.
Method opt​_charset Optional charset of SEARCH command
Method opt​_datetime Optional date-time string
Method opt​_plist Optional parenthesised list
Method parse​_command Undocumented
Method parse​_idle Undocumented
Method parse​_pending Undocumented
Method raw​Data​Received Override this for when raw data is received.
Method search_​ALL Returns True if the message matches the ALL search key (always).
Method search_​ANSWERED Returns True if the message has been answered.
Method search_​BCC Returns True if the message has a BCC address matching the query.
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 Returns True if the message does not match the query.
Method search_​OLD Undocumented
Method search_​ON Undocumented
Method search_​OR Returns True if the message matches any of the first two query items.
Method search_​RECENT Undocumented
Method search_​SEEN Undocumented
Method search_​SENTBEFORE Returns True if the message date is earlier than the query date.
Method search_​SENTON Returns True if the message date is the same as the query date.
Method search_​SENTSINCE Returns True if the message date is later than the query date.
Method search_​SINCE Undocumented
Method search_​SMALLER Undocumented
Method search_​SUBJECT Undocumented
Method search_​TEXT Undocumented
Method search_​TO Undocumented
Method search_​UID Returns True if the message UID is in the range defined by the search query.
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 send​Bad​Response Undocumented
Method send​Continuation​Request Undocumented
Method send​Negative​Response Undocumented
Method send​Positive​Response Undocumented
Method send​Server​Greeting Undocumented
Method send​Untagged​Response Undocumented
Method spew​_body Undocumented
Method spew​_bodystructure Undocumented
Method spew​_envelope Undocumented
Method spew​_flags Undocumented
Method spew​_internaldate Undocumented
Method spew​_rfc822 Undocumented
Method spew​_rfc822header Undocumented
Method spew​_rfc822size Undocumented
Method spew​_rfc822text Undocumented
Method spew​_uid Undocumented
Method spew​Message Undocumented
Method timeout​Connection Called when the connection times out.
Constant IDENT Undocumented
Constant POSTAUTH​_TIMEOUT Undocumented
Class Variable atomre Undocumented
Class Variable auth_​APPEND Undocumented
Class Variable auth_​CREATE Undocumented
Class Variable auth_​DELETE Undocumented
Class Variable auth_​EXAMINE Undocumented
Class Variable auth_​LIST Undocumented
Class Variable auth_​LSUB Undocumented
Class Variable auth_​NAMESPACE Undocumented
Class Variable auth_​RENAME Undocumented
Class Variable auth_​SELECT Undocumented
Class Variable auth_​STATUS Undocumented
Class Variable auth_​SUBSCRIBE Undocumented
Class Variable auth_​UNSUBSCRIBE Undocumented
Class Variable portal Undocumented
Class Variable select_​CHECK Undocumented
Class Variable select_​CLOSE Undocumented
Class Variable select_​COPY Undocumented
Class Variable select_​EXPUNGE Undocumented
Class Variable select_​FETCH Undocumented
Class Variable select_​IDLE Undocumented
Class Variable select_​SEARCH Undocumented
Class Variable select_​STORE Undocumented
Class Variable select_​UID Undocumented
Class Variable started​TLS Undocumented
Class Variable time​Out Undocumented
Class Variable unauth_​AUTHENTICATE Undocumented
Class Variable unauth_​CAPABILITY Undocumented
Class Variable unauth_​LOGIN Undocumented
Class Variable unauth_​LOGOUT Undocumented
Class Variable unauth_​NOOP Undocumented
Class Variable unauth_​STARTTLS Undocumented
Instance Variable account Undocumented
Instance Variable blocked Undocumented
Instance Variable can​Start​TLS Undocumented
Instance Variable challengers Undocumented
Instance Variable ctx Undocumented
Instance Variable last​State Undocumented
Instance Variable mbox Undocumented
Instance Variable parse​State Undocumented
Instance Variable parse​Tag Undocumented
Instance Variable state Undocumented
Instance Variable tags Undocumented
Method __cb​Append Undocumented
Method __cb​Auth​Chunk Undocumented
Method __cb​Auth​Resp Undocumented
Method __cb​Check Undocumented
Method __cb​Close Undocumented
Method __cb​Copied Undocumented
Method __cb​Copy Undocumented
Method __cb​Dispatch Undocumented
Method __cb​Expunge Undocumented
Method __cb​Fetch Undocumented
Method __cb​Login Undocumented
Method __cb​Manual​Search Apply the search filter to a set of messages. Send the response to the client.
Method __cb​Search Undocumented
Method __cb​Status Undocumented
Method __cb​Store Undocumented
Method __do​Command Undocumented
Method __eb​Append Undocumented
Method __eb​Auth​Chunk Undocumented
Method __eb​Auth​Resp Undocumented
Method __eb​Check Undocumented
Method __eb​Close Undocumented
Method __eb​Copy Undocumented
Method __eb​Dispatch Undocumented
Method __eb​Expunge Undocumented
Method __eb​Fetch Undocumented
Method __eb​Login Undocumented
Method __eb​Search Undocumented
Method __eb​Spew​Message Undocumented
Method __eb​Status Undocumented
Method __eb​Store Undocumented
Method _cb​Append​Got​Mailbox Undocumented
Method _cb​Copy​Selected​Mailbox Undocumented
Method _cb​List​Work Undocumented
Method _cb​Select​Work Undocumented
Method _cb​Status​Got​Mailbox Undocumented
Method _eb​Append​Got​Mailbox Undocumented
Method _eb​Copy​Selected​Mailbox Undocumented
Method _eb​List​Work Undocumented
Method _eb​Select​Work Undocumented
Method _eb​Status​Got​Mailbox Undocumented
Method _file​Literal Undocumented
Method _list​Work Undocumented
Method _respond Undocumented
Method _search​Filter Pop search terms from the beginning of query until there are none left and apply them to the given message.
Method _select​Work Undocumented
Method _setup​Challenge Undocumented
Method _single​Search​Step Pop one search term from the beginning of query (possibly more than one element) and return whether it matches the given message.
Method _string​Literal Undocumented
Method _unblock Undocumented
Class Variable _literal​String​Limit Undocumented
Class Variable _requires​Last​Message​Info Undocumented
Instance Variable _old​Timeout Undocumented
Instance Variable _on​Logout Undocumented
Instance Variable _pending​Literal Undocumented
Instance Variable _queued​Async Undocumented
Instance Variable _scheduler Undocumented

Inherited from LineReceiver:

Method clear​Line​Buffer Clear buffered data.
Method data​Received Protocol.dataReceived. Translates bytes into lines, and calls lineReceived (or rawDataReceived, depending on mode.)
Method line​Length​Exceeded Called when the maximum line length has been reached. Override if it needs to be dealt with in some special way.
Method send​Line Sends a line to the other end of the connection.
Method set​Line​Mode Sets the line-mode of this receiver.
Method set​Raw​Mode Sets the raw mode of this receiver. Further data received will be sent to rawDataReceived rather than lineReceived.
Constant 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.
Class Variable delimiter The line-ending delimiter to use. By default this is b'\r\n'.
Instance Variable line​_mode Undocumented
Instance Variable _buffer Undocumented
Instance Variable _busy​Receiving Undocumented

Inherited from Protocol (via LineReceiver):

Method log​Prefix Return a prefix matching the class name, to identify log messages related to this protocol instance.
Class Variable factory Undocumented

Inherited from BaseProtocol (via LineReceiver, Protocol):

Method make​Connection Make a connection to a transport and a server.
Instance Variable connected Undocumented
Instance Variable transport Undocumented

Inherited from _PauseableMixin (via LineReceiver):

Method pause​Producing Undocumented
Method resume​Producing Undocumented
Method stop​Producing Undocumented
Instance Variable paused Undocumented

Inherited from TimeoutMixin:

Method call​Later Wrapper around reactor.callLater for test purpose.
Method reset​Timeout Reset the timeout count down.
Method set​Timeout Change the timeout period
Method __timed​Out Undocumented
Instance Variable __timeout​Call Undocumented
def __init__(self, chal=None, contextFactory=None, scheduler=None): (source)

Undocumented

def arg_astring(self, line, final=False): (source)
Parse an astring from the line, return (arg, rest), possibly via a deferred (to handle literals)
Parameters
line:bytesA line that contains a string literal.
finalIs this the final argument? @type final bool
Returns
tuple of (bytes, bytes) or a DeferredA 2-tuple containing the parsed argument and any trailing data, or a Deferred that fires with that 2-tuple
def arg_atom(self, line): (source)
Parse an atom from the line
def arg_fetchatt(self, line): (source)
fetch-att
def arg_finalastring(self, line): (source)
Parse an astring from line that represents a command's final argument. This special case exists to enable parsing empty string literals.
Parameters
line:bytesA line that contains a string literal.
Returns
tuple of (bytes, bytes) or a DeferredA 2-tuple containing the parsed argument and any trailing data, or a Deferred that fires with that 2-tuple
See Also
https://twistedmatrix.com/trac/ticket/9207
def arg_flaglist(self, line): (source)
Flag part of store-att-flag
def arg_line(self, line): (source)
Command line of UID command
def arg_literal(self, line): (source)
Parse a literal from the line
def arg_plist(self, line): (source)
Parse a (non-nested) parenthesised list from the line
def arg_searchkeys(self, line): (source)
searchkeys
def arg_seqset(self, line): (source)
sequence-set
def authenticate(self, chal, tag): (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.

Parameters
user:strThe username to lookup
passwd:strThe password to login with
def capabilities(self): (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 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.

Parameters
reason:twisted.python.failure.FailureUndocumented
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 dispatchCommand(self, tag, cmd, rest, uid=None): (source)

Undocumented

def do_APPEND(self, tag, mailbox, flags, date, message): (source)

Undocumented

def do_AUTHENTICATE(self, tag, args): (source)

Undocumented

def do_CAPABILITY(self, tag): (source)

Undocumented

def do_CHECK(self, tag): (source)

Undocumented

def do_CLOSE(self, tag): (source)

Undocumented

def do_COPY(self, tag, messages, mailbox, uid=0): (source)

Undocumented

def do_CREATE(self, tag, name): (source)

Undocumented

def do_DELETE(self, tag, name): (source)

Undocumented

def do_EXPUNGE(self, tag): (source)

Undocumented

def do_FETCH(self, tag, messages, query, uid=0): (source)

Undocumented

def do_IDLE(self, tag): (source)

Undocumented

def do_LOGIN(self, tag, user, passwd): (source)

Undocumented

def do_LOGOUT(self, tag): (source)

Undocumented

def do_NAMESPACE(self, tag): (source)

Undocumented

def do_NOOP(self, tag): (source)

Undocumented

def do_RENAME(self, tag, oldname, newname): (source)

Undocumented

def do_SEARCH(self, tag, charset, query, uid=0): (source)

Undocumented

def do_STARTTLS(self, tag): (source)

Undocumented

def do_STATUS(self, tag, mailbox, names): (source)

Undocumented

def do_STORE(self, tag, messages, mode, flags, uid=0): (source)

Undocumented

def do_SUBSCRIBE(self, tag, name): (source)

Undocumented

def do_UID(self, tag, command, line): (source)

Undocumented

def do_UNSUBSCRIBE(self, tag, name): (source)

Undocumented

def flagsChanged(self, newFlags): (source)
Indicates that the flags of one or more messages have changed.
Parameters
new​Flags:dictA mapping of message identifiers to tuples of flags now set on that message.
def lineReceived(self, line): (source)
Override this for when each line is received.
Parameters
line:bytesThe line which was received with the delimiter removed.
def listCapabilities(self): (source)

Undocumented

def lookupCommand(self, cmd): (source)

Undocumented

def modeChanged(self, writeable): (source)
Indicates that the write status of a mailbox has changed.
Parameters
writeable:boolA true value if write is now allowed, false otherwise.
def newMessages(self, exists, recent): (source)
Indicates that the number of messages in a mailbox has changed.
Parameters
exists:int or NoneThe total number of messages now in this mailbox. If the total number of messages has not changed, this should be None.
recent:intThe number of messages now flagged \Recent. If the number of recent messages has not changed, this should be None.
def opt_charset(self, line): (source)
Optional charset of SEARCH command
def opt_datetime(self, line): (source)
Optional date-time string
def opt_plist(self, line): (source)
Optional parenthesised list
def parse_command(self, line): (source)

Undocumented

def parse_idle(self, *args): (source)

Undocumented

def parse_pending(self, line): (source)

Undocumented

def rawDataReceived(self, data): (source)
Override this for when raw data is received.
def search_ALL(self, query, id, msg): (source)
Returns True if the message matches the ALL search key (always).
Parameters
query:A list of strA list representing the parsed query string.
id:intThe sequence number of the message being checked.
msg:Provider of imap4.IMessageUndocumented
def search_ANSWERED(self, query, id, msg): (source)
Returns True if the message has been answered.
Parameters
query:A list of strA list representing the parsed query string.
id:intThe sequence number of the message being checked.
msg:Provider of imap4.IMessageUndocumented
def search_BCC(self, query, id, msg): (source)
Returns True if the message has a BCC address matching the query.
Parameters
query:A list of strA list whose first element is a BCC str
id:intThe sequence number of the message being checked.
msg:Provider of imap4.IMessageUndocumented
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, lastIDs): (source)
Returns True if the message does not match the query.
Parameters
query:A list of strA list representing the parsed form of the search query.
id:intThe sequence number of the message being checked.
msg:Provider of imap4.IMessageThe message being checked.
last​IDs:tupleA tuple of (last sequence id, last message id). The last sequence id is an int containing the highest sequence number of a message in the mailbox. The last message id is an int containing the highest UID of a message in the mailbox.
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, lastIDs): (source)
Returns True if the message matches any of the first two query items.
Parameters
query:A list of strA list representing the parsed form of the search query.
id:intThe sequence number of the message being checked.
msg:Provider of imap4.IMessageThe message being checked.
last​IDs:tupleA tuple of (last sequence id, last message id). The last sequence id is an int containing the highest sequence number of a message in the mailbox. The last message id is an int containing the highest UID of a message in the mailbox.
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)
Returns True if the message date is earlier than the query date.
Parameters
query:A list of strA list whose first element starts with a stringified date that is a fragment of an imap4.Query(). The date must be in the format 'DD-Mon-YYYY', for example '03-March-2003' or '03-Mar-2003'.
id:intThe sequence number of the message being checked.
msg:Provider of imap4.IMessageUndocumented
def search_SENTON(self, query, id, msg): (source)
Returns True if the message date is the same as the query date.
Parameters
query:A list of strA list whose first element starts with a stringified date that is a fragment of an imap4.Query(). The date must be in the format 'DD-Mon-YYYY', for example '03-March-2003' or '03-Mar-2003'.
idUndocumented
msg:Provider of imap4.IMessageUndocumented
def search_SENTSINCE(self, query, id, msg): (source)
Returns True if the message date is later than the query date.
Parameters
query:A list of strA list whose first element starts with a stringified date that is a fragment of an imap4.Query(). The date must be in the format 'DD-Mon-YYYY', for example '03-March-2003' or '03-Mar-2003'.
idUndocumented
msg:Provider of imap4.IMessageUndocumented
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, lastIDs): (source)
Returns True if the message UID is in the range defined by the search query.
Parameters
query:A list of bytesA list representing the parsed form of the search query. Its first element should be a str that can be interpreted as a sequence range, for example '2:4,5:*'.
id:intThe sequence number of the message being checked.
msg:Provider of imap4.IMessageThe message being checked.
last​IDs:tupleA tuple of (last sequence id, last message id). The last sequence id is an int containing the highest sequence number of a message in the mailbox. The last message id is an int containing the highest UID of a message in the mailbox.
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 sendBadResponse(self, tag=None, message=b''): (source)

Undocumented

def sendContinuationRequest(self, msg=b'Ready for additional command text'): (source)

Undocumented

def sendNegativeResponse(self, tag=None, message=b''): (source)

Undocumented

def sendPositiveResponse(self, tag=None, message=b''): (source)

Undocumented

def sendServerGreeting(self): (source)

Undocumented

def sendUntaggedResponse(self, message, isAsync=None, **kwargs): (source)

Undocumented

def spew_body(self, part, id, msg, _w=None, _f=None): (source)

Undocumented

def spew_bodystructure(self, id, msg, _w=None, _f=None): (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_rfc822(self, id, msg, _w=None, _f=None): (source)

Undocumented

def spew_rfc822header(self, id, msg, _w=None, _f=None): (source)

Undocumented

def spew_rfc822size(self, id, msg, _w=None, _f=None): (source)

Undocumented

def spew_rfc822text(self, id, msg, _w=None, _f=None): (source)

Undocumented

def spew_uid(self, id, msg, _w=None, _f=None): (source)

Undocumented

def spewMessage(self, id, msg, query, uid): (source)

Undocumented

def timeoutConnection(self): (source)

Called when the connection times out.

Override to define behavior other than dropping the connection.

IDENT: bytes = (source)

Undocumented

Value
b'Twisted IMAP4rev1 Ready'
POSTAUTH_TIMEOUT = (source)

Undocumented

Value
60*30
atomre = (source)

Undocumented

auth_APPEND = (source)

Undocumented

auth_CREATE = (source)

Undocumented

auth_DELETE = (source)

Undocumented

auth_EXAMINE = (source)

Undocumented

auth_LIST = (source)

Undocumented

auth_LSUB = (source)

Undocumented

auth_NAMESPACE = (source)

Undocumented

auth_RENAME = (source)

Undocumented

auth_SELECT = (source)

Undocumented

auth_STATUS = (source)

Undocumented

auth_SUBSCRIBE = (source)

Undocumented

auth_UNSUBSCRIBE = (source)

Undocumented

portal = (source)

Undocumented

select_CHECK = (source)

Undocumented

select_CLOSE = (source)

Undocumented

select_COPY = (source)

Undocumented

select_EXPUNGE = (source)

Undocumented

select_FETCH = (source)

Undocumented

select_IDLE = (source)

Undocumented

select_SEARCH = (source)

Undocumented

select_STORE = (source)

Undocumented

select_UID = (source)

Undocumented

startedTLS: bool = (source)

Undocumented

unauth_AUTHENTICATE = (source)

Undocumented

unauth_CAPABILITY = (source)

Undocumented

unauth_LOGIN = (source)

Undocumented

unauth_LOGOUT = (source)

Undocumented

unauth_NOOP = (source)

Undocumented

unauth_STARTTLS = (source)

Undocumented

account = (source)

Undocumented

blocked: list = (source)

Undocumented

canStartTLS = (source)

Undocumented

challengers = (source)

Undocumented

Undocumented

lastState = (source)

Undocumented

mbox = (source)

Undocumented

parseState = (source)

Undocumented

parseTag = (source)

Undocumented

state: str = (source)

Undocumented

Undocumented

def __cbAppend(self, result, tag, mbox): (source)

Undocumented

def __cbAuthChunk(self, result, chal, tag): (source)

Undocumented

def __cbAuthResp(self, result, tag): (source)

Undocumented

def __cbCheck(self, result, tag): (source)

Undocumented

def __cbClose(self, result, tag): (source)

Undocumented

def __cbCopied(self, deferredIds, tag, mbox): (source)

Undocumented

def __cbCopy(self, messages, tag, mbox): (source)

Undocumented

def __cbDispatch(self, result, tag, fn, args, parseargs, uid): (source)

Undocumented

def __cbExpunge(self, result, tag): (source)

Undocumented

def __cbFetch(self, results, tag, query, uid): (source)

Undocumented

def __cbLogin(self, result, tag): (source)

Undocumented

def __cbManualSearch(self, result, tag, mbox, query, uid, searchResults=None): (source)
Apply the search filter to a set of messages. Send the response to the client.
Parameters
result:list of tuple of (int, provider of imap4.IMessage)A list two tuples of messages with their sequence ids, sorted by the ids in descending order.
tag:strA command tag.
mbox:Provider of imap4.IMailboxThe searched mailbox.
query:listA list representing the parsed form of the search query.
uidA flag indicating whether the search is over message sequence numbers or UIDs.
search​Results:listThe search results so far or None if no results yet.
def __cbSearch(self, result, tag, mbox, uid): (source)

Undocumented

def __cbStatus(self, status, tag, box): (source)

Undocumented

def __cbStore(self, result, tag, mbox, uid, silent): (source)

Undocumented

def __doCommand(self, tag, handler, args, parseargs, line, uid): (source)

Undocumented

def __ebAppend(self, failure, tag): (source)

Undocumented

def __ebAuthChunk(self, failure, tag): (source)

Undocumented

def __ebAuthResp(self, failure, tag): (source)

Undocumented

def __ebCheck(self, failure, tag): (source)

Undocumented

def __ebClose(self, failure, tag): (source)

Undocumented

def __ebCopy(self, failure, tag): (source)

Undocumented

def __ebDispatch(self, failure, tag): (source)

Undocumented

def __ebExpunge(self, failure, tag): (source)

Undocumented

def __ebFetch(self, failure, tag): (source)

Undocumented

def __ebLogin(self, failure, tag): (source)

Undocumented

def __ebSearch(self, failure, tag): (source)

Undocumented

def __ebSpewMessage(self, failure): (source)

Undocumented

def __ebStatus(self, failure, tag, box): (source)

Undocumented

def __ebStore(self, failure, tag): (source)

Undocumented

def _cbAppendGotMailbox(self, mbox, tag, flags, date, message): (source)

Undocumented

def _cbCopySelectedMailbox(self, mbox, tag, messages, mailbox, uid): (source)

Undocumented

def _cbListWork(self, mailboxes, tag, sub, cmdName): (source)

Undocumented

def _cbSelectWork(self, mbox, cmdName, tag): (source)

Undocumented

def _cbStatusGotMailbox(self, mbox, tag, mailbox, names): (source)

Undocumented

def _ebAppendGotMailbox(self, failure, tag): (source)

Undocumented

def _ebCopySelectedMailbox(self, failure, tag): (source)

Undocumented

def _ebListWork(self, failure, tag): (source)

Undocumented

def _ebSelectWork(self, failure, cmdName, tag): (source)

Undocumented

def _ebStatusGotMailbox(self, failure, tag): (source)

Undocumented

def _fileLiteral(self, size): (source)

Undocumented

def _listWork(self, tag, ref, mbox, sub, cmdName): (source)

Undocumented

def _respond(self, state, tag, message): (source)

Undocumented

def _searchFilter(self, query, id, msg, lastSequenceId, lastMessageId): (source)
Pop search terms from the beginning of query until there are none left and apply them to the given message.
Parameters
queryA list representing the parsed form of the search query.
idThe sequence number of the message being checked.
msgThe message being checked.
last​Sequence​Id:intThe highest sequence number of any message in the mailbox being searched.
last​Message​Id:intThe highest UID of any message in the mailbox being searched.
Returns
Boolean indicating whether all of the query terms match the message.
def _selectWork(self, tag, name, rw, cmdName): (source)

Undocumented

def _setupChallenge(self, chal, tag): (source)

Undocumented

def _singleSearchStep(self, query, msgId, msg, lastSequenceId, lastMessageId): (source)
Pop one search term from the beginning of query (possibly more than one element) and return whether it matches the given message.
Parameters
queryA list representing the parsed form of the search query.
msg​IdThe sequence number of the message being checked.
msgThe message being checked.
last​Sequence​IdThe highest sequence number of any message in the mailbox being searched.
last​Message​IdThe highest UID of any message in the mailbox being searched.
Returns
Boolean indicating whether the query term matched the message.
def _stringLiteral(self, size): (source)

Undocumented

def _unblock(self): (source)

Undocumented

_literalStringLimit: int = (source)

Undocumented

_requiresLastMessageInfo: set[bytes] = (source)

Undocumented

_oldTimeout = (source)

Undocumented

_onLogout = (source)

Undocumented

_pendingLiteral = (source)

Undocumented

_queuedAsync: list = (source)

Undocumented

_scheduler = (source)

Undocumented