class documentation

class VirtualPOP3(pop3.POP3): (source)

View In Hierarchy

A virtual hosting POP3 server.
Method authenticate​User​APOP Perform APOP authentication.
Method authenticate​User​PASS Perform authentication for a username/password login.
Method lookup​Domain Check whether a domain is among the virtual domains supported by the mail service.
Instance Variable domain​Specifier The character to use to split an email address into local-part and domain. The default is '@'.
Instance Variable service The email service that created this server. This must be set by the service.

Inherited from POP3:

Method connection​Lost Clean up when the connection has been lost.
Method connection​Made Send a greeting to the client after the connection has been made.
Method do_​APOP Handle an APOP command.
Method do_​AUTH Handle an AUTH command.
Method do_​CAPA Handle a CAPA command.
Method do_​DELE Handle a DELE command.
Method do_​LAST Handle a LAST command.
Method do_​LIST Handle a LIST command.
Method do_​NOOP Handle a NOOP command.
Method do_​PASS Handle a PASS command.
Method do_​QUIT Handle a QUIT command.
Method do_​RETR Handle a RETR command.
Method do_​RPOP Handle an RPOP command.
Method do_​RSET Handle a RSET command.
Method do_​STAT Handle a STAT command.
Method do_​TOP Handle a TOP command.
Method do_​UIDL Handle a UIDL command.
Method do_​USER Handle a USER command.
Method fail​Response Send a response indicating failure.
Method finished​File​Transfer Send the termination sequence.
Method generate​Magic Generate an APOP challenge.
Method line​Received Pass a received line to a state machine function.
Method list​Capabilities Return a list of server capabilities suitable for use in a CAPA response.
Method process​Command Dispatch a command from the client for handling.
Method state_​AUTH Handle received lines for the AUTH state in which an authentication challenge response from the client is expected.
Method state_​COMMAND Handle received lines for the COMMAND state in which commands from the client are expected.
Method stop​Producing Stop producing data.
Method success​Response Send a response indicating success.
Method transform​Chunk Transform a chunk of a message to POP3 message format.
Constant AUTH​_CMDS Undocumented
Instance Variable blocked A list of blocked commands. While a response to a command is being generated by the server, other commands are blocked. When no command is outstanding, blocked is set to none. Otherwise, it contains a list of information about blocked commands. Each list entry consists of the command and the arguments to the command.
Instance Variable factory A server factory which provides an interface for querying capabilities of the server.
Instance Variable magic An APOP challenge. If not set, an APOP challenge string will be generated when a connection is made.
Instance Variable mbox The mailbox for the authenticated user.
Instance Variable portal A portal for authentication.
Instance Variable schedule A callable that arranges for an iterator to be cooperatively iterated over along with all other iterators which have been passed to it such that runtime is divided between all of them. It returns a deferred which fires when the iterator finishes.
Instance Variable state The state which indicates what type of messages are expected from the client. Valid states are 'COMMAND' and 'AUTH'
Instance Variable time​Out The number of seconds to wait for a command from the client before disconnecting.
Method _cb​Mailbox Complete successful authentication.
Method _coiterate Direct the output of an iterator to the transport and arrange for iteration to take place.
Method _eb​Mailbox Handle an expected authentication failure.
Method _eb​Unexpected Handle an unexpected authentication failure.
Method _get​Message​File Retrieve the size and contents of a message.
Method _long​Operation Stop timeouts and block further command processing while a long operation completes.
Method _send​Message​Content Send the contents of a message.
Method _unblock Process as many blocked commands as possible.
Instance Variable _auth Authorization credentials.
Instance Variable _highest The 1-based index of the highest message retrieved.
Instance Variable _on​Logout The function to be executed when the connection is lost.
Instance Variable _user​Is The username sent with the USER command.

Inherited from LineOnlyReceiver (via POP3):

Method data​Received Translates bytes into lines, and calls lineReceived.
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.
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 _buffer Undocumented

Inherited from Protocol (via POP3, LineOnlyReceiver):

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

Inherited from BaseProtocol (via POP3, LineOnlyReceiver, Protocol):

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

Inherited from TimeoutMixin (via POP3):

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 timeout​Connection Called when the connection times out.
Method __timed​Out Undocumented
Instance Variable __timeout​Call Undocumented
def authenticateUserAPOP(self, user, digest): (source)

Perform APOP authentication.

Override the default lookup scheme to allow virtual domains.

Parameters
user:bytesThe name of the user attempting to log in.
digest:bytesThe challenge response.
Returns
Deferred which successfully results in 3-tuple of (IMailbox, IMailbox provider, no-argument callable)A deferred which fires when authentication is complete. If successful, it returns an IMailbox interface, a mailbox and a logout function. If authentication fails, the deferred fails with an UnauthorizedLogin error.
def authenticateUserPASS(self, user, password): (source)

Perform authentication for a username/password login.

Override the default lookup scheme to allow virtual domains.

Parameters
user:bytesThe name of the user attempting to log in.
password:bytesThe password to authenticate with.
Returns
Deferred which successfully results in 3-tuple of (IMailbox, IMailbox provider, no-argument callable)A deferred which fires when authentication is complete. If successful, it returns an IMailbox interface, a mailbox and a logout function. If authentication fails, the deferred fails with an UnauthorizedLogin error.
def lookupDomain(self, user): (source)
Check whether a domain is among the virtual domains supported by the mail service.
Parameters
user:bytesAn email address.
Returns
2-tuple of (bytes, bytes)The local part and the domain part of the email address if the domain is supported.
Raises
POP3ErrorWhen the domain is not supported by the mail service.
domainSpecifier: bytes = (source)
The character to use to split an email address into local-part and domain. The default is '@'.
The email service that created this server. This must be set by the service.