Package twisted :: Package protocols :: Module imap4 :: Class IMAP4Server |
[show private | hide private]
[frames | no frames]

## Class IMAP4Server

    BaseProtocol --+
                   |
            Protocol --+
                       |
            LineReceiver --+
                           |
                          IMAP4Server

    Protocol implementation for an IMAP4rev1 server.

    The server can be in any of four states:
        Non-authenticated
        Authenticated
        Selected
        Logout

Method Summary
| `__init__(self)`
| `auth_APPEND(self, tag, args)`
| `auth_CAPABILITY(self, tag, args)`
| `auth_CREATE(self, tag, args)`
| `auth_DELETE(self, tag, args)`
| `auth_EXAMINE(self, tag, args)`
| `auth_LIST(self, tag, args)`
| `auth_LOGOUT(self, tag, args)`
| `auth_LSUB(self, tag, args)`
| `auth_NOOP(self, tag, args)`
| `auth_RENAME(self, tag, args)`
| `auth_SELECT(self, tag, args)`
| `auth_STATUS(self, tag, args)`
| `auth_SUBSCRIBE(self, tag, args)`
| `auth_UNSUBSCRIBE(self, tag, args)`
`Account` | ``authenticateLogin`(self, user, passwd)` Lookup the account associated with the given parameters
| ``checkpoint`(self)` Called when the client issues a CHECK command.
| ``connectionFailed`(self)` (Deprecated) (inherited from `Protocol`)
| ``connectionLost`(self, reason)` Called when the connection is shut down. (inherited from `Protocol`)
| ``connectionMade`(self)` Called when a connection is made.
| ``dataReceived`(self, data)` Protocol.dataReceived. (inherited from `LineReceiver`)
| `dispatchCommand(self, tag, cmd, rest)`
| `flagsChanged(self, newFlags)`
| ``lineLengthExceeded`(self, line)` Called when the maximum line length has been reached. (inherited from `LineReceiver`)
| ``lineReceived`(self, line)` Override this for when each line is received.
| `listCapabilities(self)`
| `logout_CAPABILITY(self, tag, args)`
| `logout_LOGOUT(self, tag, args)`
| `logout_NOOP(self, tag, args)`
| `lookupCommand(self, cmd)`
| ``makeConnection`(self, transport)` Make a connection to a transport and a server. (inherited from `BaseProtocol`)
Any object which implements `write(string)` and `seek(int, int)` | ``messageFile`(self, octets)` Create a file to which an incoming message may be written.
| `modeChanged(self, writeable)`
| `newMessages(self, exists, recent)`
| ``rawDataReceived`(self, data)` Override this for when raw data is received.
| ``registerChallenger`(self, chal)` Register a new form of authentication
| `select_APPEND(self, tag, args)`
| `select_CAPABILITY(self, tag, args)`
| `select_CHECK(self, tag, args)`
| `select_CLOSE(self, tag, args)`
| `select_COPY(self, tag, args, uid)`
| `select_CREATE(self, tag, args)`
| `select_DELETE(self, tag, args)`
| `select_EXAMINE(self, tag, args)`
| `select_EXPUNGE(self, tag, args)`
| `select_FETCH(self, tag, args, uid)`
| `select_LIST(self, tag, args)`
| `select_LOGOUT(self, tag, args)`
| `select_LSUB(self, tag, args)`
| `select_NOOP(self, tag, args)`
| `select_RENAME(self, tag, args)`
| `select_SEARCH(self, tag, args, uid)`
| `select_SELECT(self, tag, args)`
| `select_STATUS(self, tag, args)`
| `select_STORE(self, tag, args, uid)`
| `select_SUBSCRIBE(self, tag, args)`
| `select_UID(self, tag, args)`
| `select_UNSUBSCRIBE(self, tag, args)`
| `sendBadResponse(self, tag, message)`
| `sendContinuationRequest(self, msg)`
| ``sendLine`(self, line)` Sends a line to the other end of the connection. (inherited from `LineReceiver`)
| `sendNegativeResponse(self, tag, message)`
| `sendPositiveResponse(self, tag, message)`
| `sendServerGreeting(self)`
| `sendUntaggedResponse(self, message)`
| ``setLineMode`(self, extra)` Sets the line-mode of this receiver. (inherited from `LineReceiver`)
| ``setRawMode`(self)` Sets the raw mode of this receiver. (inherited from `LineReceiver`)
| `unauth_AUTHENTICATE(self, tag, args)`
| `unauth_CAPABILITY(self, tag, args)`
| `unauth_LOGIN(self, tag, args)`
| `unauth_LOGOUT(self, tag, args)`
| `unauth_NOOP(self, tag, args)`
| `_IMAP4Server__cbAppend(self, result, tag, mbox)`
| `_IMAP4Server__cbAuthChunk(self, result, auth, savedState, tag)`
| `_IMAP4Server__cbAuthResp(self, result, tag)`
| `_IMAP4Server__cbCheck(self, result, tag)`
| `_IMAP4Server__cbClose(self, result, tag)`
| `_IMAP4Server__cbContinueAppend(self, rest, tag, mbox, flags, date)`
| `_IMAP4Server__cbCopied(self, deferredIds, ids, failures, tag, mbox)`
| `_IMAP4Server__cbCopy(self, messages, tag, mbox)`
| `_IMAP4Server__cbExpunge(self, result, tag)`
| `_IMAP4Server__cbFetch(self, results, tag, uid)`
| `_IMAP4Server__cbLogin(self, account, tag)`
| `_IMAP4Server__cbSearch(self, result, tag, uid)`
| `_IMAP4Server__cbStatus(self, status, tag, box)`
| `_IMAP4Server__cbStore(self, result, tag, silent)`
| `_IMAP4Server__ebAppend(self, failure, tag)`
| `_IMAP4Server__ebAuthChunk(self, failure, tag)`
| `_IMAP4Server__ebAuthResp(self, failure, tag)`
| `_IMAP4Server__ebCheck(self, failure, tag)`
| `_IMAP4Server__ebClose(self, failure, tag)`
| `_IMAP4Server__ebExpunge(self, failure, tag)`
| `_IMAP4Server__ebFetch(self, failure, tag)`
| `_IMAP4Server__ebLogin(self, failure, tag)`
| `_IMAP4Server__ebSearch(self, failure, tag)`
| `_IMAP4Server__ebStatus(self, failure, tag, box)`
| `_IMAP4Server__ebStore(self, failure, tag)`
| `_listWork(self, tag, args, sub, cmdName)`
| `_parseMbox(self, name)`
| `_respond(self, state, tag, message)`
| `_selectWork(self, tag, args, rw, cmdName)`
| `_setupForLiteral(self, octets)`

Class Variable Summary
`tuple` | `__implements__`
`NoneType` | `account`
`dict` | `CAPABILITIES`
`NoneType` | `challengers`
`str` | `IDENT`
`NoneType` | `mbox`
`NoneType` | `tags`
`int` | `_memoryFileLimit`
`NoneType` | `_pendingBuffer`
`NoneType` | `_pendingLiteral`
`NoneType` | `_pendingSize`

Method Details

### authenticateLogin(self, user, passwd) Lookup the account associated with the given parameters Override this method to define the desired authentication behavior. Parameters: `user` - The username to lookup (type=`str`) `passwd` - The password to login with (type=`str`) Returns: An appropriate account object, or None (type=`Account`)

### checkpoint(self) 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.

### connectionMade(self) 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. Overrides: `twisted.internet.protocol.BaseProtocol.connectionMade` (inherited documentation)

### lineReceived(self, line) Override this for when each line is received. Overrides: `twisted.protocols.basic.LineReceiver.lineReceived` (inherited documentation)

### messageFile(self, octets) Create a file to which an incoming message may be written. Parameters: `octets` - The number of octets which will be written to the file (type=`int`) Returns: A file-like object (type=Any object which implements `write(string)` and `seek(int, int)`)

### rawDataReceived(self, data) Override this for when raw data is received. Overrides: `twisted.protocols.basic.LineReceiver.rawDataReceived` (inherited documentation)

### registerChallenger(self, chal) Register a new form of authentication Challengers registered here will be listed as available to the client in the CAPABILITY response. Parameters: `chal` - The object to use to perform the client side of this authentication scheme. (type=Implementor of `IServerAuthentication`)

Class Variable Details

    ### __implements__ Type: `tuple` Value:
        (<class 'twisted.protocols.imap4.IMailboxListener'>,)

    ### account Type: `NoneType` Value:
        None

    ### CAPABILITIES Type: `dict` Value:
        {}

    ### challengers Type: `NoneType` Value:
        None

    ### IDENT Type: `str` Value:
        'Twisted IMAP4rev1 Ready'

    ### mbox Type: `NoneType` Value:
        None

    ### tags Type: `NoneType` Value:
        None

    ### _memoryFileLimit Type: `int` Value:
        10485760

    ### _pendingBuffer Type: `NoneType` Value:
        None

    ### _pendingLiteral Type: `NoneType` Value:
        None

    ### _pendingSize Type: `NoneType` Value:
        None

Generated by Epydoc 1.1 on Thu May 8 13:18:48 2003 | http://epydoc.sf.net