Known subclasses: twisted.mail.maildir.MaildirDirdbmDomain

Implements interfaces: twisted.mail.interfaces.IAliasableDomain

An abstract maildir-backed domain.

Instance Variable alias A mapping of username to alias. (type: None or dict mapping bytes to AliasBase)
Instance Variable root See __init__.
Method __init__
Method userDirectory Return the maildir directory for a user.
Method setAliasGroup Set the group of defined aliases for this domain.
Method exists Check whether a user exists in this domain or an alias of it.
Method startMessage Create a maildir message for a user.
Method willRelay Check whether this domain will relay.
Method addUser Add a user to this domain.
Method getCredentialsCheckers Return credentials checkers for this domain.
alias =
A mapping of username to alias. (type: None or dict mapping bytes to AliasBase)
root =
See __init__.
def __init__(self, service, root): (source)
ParametersserviceAn email service. (type: MailService)
rootThe maildir root directory. (type: bytes)
def userDirectory(self, user): (source)

Return the maildir directory for a user.

ParametersuserA username. (type: bytes)
ReturnsThe user's mail directory for a valid user. Otherwise, None. (type: bytes or None)
def setAliasGroup(self, alias): (source)

Set the group of defined aliases for this domain.

ParametersaliasA mapping of domain name to alias. (type: dict mapping bytes to IAlias provider.)
def exists(self, user, memo=None): (source)

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

ParametersuserA user. (type: User)
memoA record of the addresses already considered while resolving aliases. The default value should be used by all external code. (type: None or dict of AliasBase)
ReturnsA function which takes no arguments and returns a message receiver for the user. (type: no-argument callable which returns IMessage provider.)
RaisesSMTPBadRcptWhen the given user does not exist in this domain or an alias of it.
def startMessage(self, user): (source)

Create a maildir message for a user.

ParametersuserA username. (type: bytes)
ReturnsA message receiver for this user. (type: MaildirMessage)
def willRelay(self, user, protocol): (source)

Check whether this domain will relay.

ParametersuserThe destination address. (type: Address)
protocolThe protocol over which the message to be relayed is being received. (type: SMTP)
ReturnsAn indication of whether this domain will relay the message to the destination. (type: bool)
def addUser(self, user, password): (source)

Add a user to this domain.

Subclasses should override this method.

ParametersuserA username. (type: bytes)
passwordA password. (type: bytes)
def getCredentialsCheckers(self): (source)

Return credentials checkers for this domain.

Subclasses should override this method.

ReturnsCredentials checkers for this domain. (type: list of ICredentialsChecker provider)
API Documentation for Twisted, generated by pydoctor at 2017-09-23 19:45:03.