t.m.m.MaildirDirdbmDomain(AbstractMaildirDomain) : class documentation

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

Implements interfaces: twisted.cred.portal.IRealm

A Maildir Domain where membership is checked by a dirdbm file.
Method __init__ Initialize.
Method userDirectory Get the directory for a user
Method addUser Add a username/password to this domain.
Method getCredentialsCheckers Return a list of ICredentialsChecker implementors for this domain.
Method requestAvatar Return avatar which provides one of the given interfaces.

Inherited from AbstractMaildirDomain:

Method setAliasGroup Set the group of defined aliases for this domain
Method exists Check for existence of user in the domain.
Method startMessage Save a message for the given user.
Method willRelay Undocumented
def __init__(self, service, root, postmaster=0): (source)
Initialize.

The first argument is where the Domain directory is rooted. The second is whether non-existing addresses are simply forwarded to postmaster instead of outright bounce

The directory structure of a MailddirDirdbmDomain is:

/passwd <-- a dirdbm file /USER/{cur,new,del} <-- each user has these three directories

def userDirectory(self, name): (source)
Get the directory for a user

If the user exists in the dirdbm file, return the directory os.path.join(root, name), creating it if necessary. Otherwise, returns postmaster's mailbox instead if bounces go to postmaster, otherwise return None

def addUser(self, user, password): (source)
Add a username/password to this domain.
def getCredentialsCheckers(self): (source)
Return a list of ICredentialsChecker implementors for this domain.
def requestAvatar(self, avatarId, mind, *interfaces): (source)
Return avatar which provides one of the given interfaces.
ParametersavatarIda string that identifies an avatar, as returned by ICredentialsChecker.requestAvatarId (via a Deferred). Alternatively, it may be twisted.cred.checkers.ANONYMOUS.
mindusually None. See the description of mind in Portal.login.
interfacesthe interface(s) the returned avatar should implement, e.g. IMailAccount. See the description of Portal.login.
Returnsa deferred which will fire a tuple of (interface, avatarAspect, logout), or the tuple itself. The interface will be one of the interfaces passed in the 'interfaces' argument. The 'avatarAspect' will implement that interface. The 'logout' object is a callable which will detach the mind from the avatar.
API Documentation for Twisted, generated by pydoctor at 2013-04-03 11:20:05.