class documentation

An abstract maildir-backed domain.

Method __init__ No summary
Method addUser Add a user to this domain.
Method exists Check whether a user exists in this domain or an alias of it.
Method getCredentialsCheckers Return credentials checkers for this domain.
Method setAliasGroup Set the group of defined aliases for this domain.
Method startMessage Create a maildir message for a user.
Method userDirectory Return the maildir directory for a user.
Method willRelay Check whether this domain will relay.
Instance Variable alias A mapping of username to alias.
Instance Variable root See __init__.
def __init__(self, service, root): (source)
Parameters
service:MailServiceAn email service.
root:bytesThe maildir root directory.
def addUser(self, user, password): (source)

Add a user to this domain.

Subclasses should override this method.

Parameters
user:bytesA username.
password:bytesA password.
def exists(self, user, memo=None): (source)

Check whether a user exists in this domain or an alias of it.

Parameters
user:UserA user.
memo:None or dict of AliasBaseA record of the addresses already considered while resolving aliases. The default value should be used by all external code.
Returns
no-argument callable which returns IMessage provider.A function which takes no arguments and returns a message receiver for the user.
Raises
SMTPBadRcptWhen the given user does not exist in this domain or an alias of it.
def getCredentialsCheckers(self): (source)

Return credentials checkers for this domain.

Subclasses should override this method.

Returns
list of ICredentialsChecker providerCredentials checkers for this domain.
def setAliasGroup(self, alias): (source)

Set the group of defined aliases for this domain.

Parameters
alias:dict mapping bytes to IAlias provider.A mapping of domain name to alias.
def startMessage(self, user): (source)

Create a maildir message for a user.

Parameters
user:bytesA username.
Returns
MaildirMessageA message receiver for this user.
def userDirectory(self, user): (source)

Return the maildir directory for a user.

Parameters
user:bytesA username.
Returns
bytes or NoneThe user's mail directory for a valid user. Otherwise, None.
def willRelay(self, user, protocol): (source)

Check whether this domain will relay.

Parameters
user:AddressThe destination address.
protocol:SMTPThe protocol over which the message to be relayed is being received.
Returns
boolAn indication of whether this domain will relay the message to the destination.
alias: None or dict mapping bytes to AliasBase = (source)

A mapping of username to alias.