t.m.m.AbstractMaildirDomain : class documentation

Part of twisted.mail.maildir View Source View In Hierarchy

Known subclasses: twisted.mail.maildir.MaildirDirdbmDomain

An abstract maildir-backed domain.
Instance Variable alias A mapping of username to alias. (type: NoneType 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: NoneType 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 NoneType)
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: NoneType 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 2014-05-12 18:27:00.