Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`mail`.`maildir`.`AbstractMaildirDomain``

class documentation

`class AbstractMaildirDomain: (source)`

Known subclasses: `twisted.mail.maildir.MaildirDirdbmDomain`

Implements interfaces: `twisted.mail.interfaces.IAliasableDomain`

View In Hierarchy

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)
overridden in `twisted.mail.maildir.MaildirDirdbmDomain`

Parameters
service:`MailService` | An email service.
root:`bytes` | The maildir root directory.

def addUser(self, user, password): (source)
from `twisted.mail.interfaces.IDomain`
overridden in `twisted.mail.maildir.MaildirDirdbmDomain`

Add a user to this domain.

Subclasses should override this method.

Parameters
user:`bytes` | A username.
password:`bytes` | A password.

def exists(self, user, memo=None): (source)
from `twisted.mail.interfaces.IAliasableDomain`

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

Parameters
user:`User` | A user.
memo:`None` or `dict` of `AliasBase` | A 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
`SMTPBadRcpt` | When the given user does not exist in this domain or an alias of it.

def getCredentialsCheckers(self): (source)
from `twisted.mail.interfaces.IDomain`
overridden in `twisted.mail.maildir.MaildirDirdbmDomain`

Return credentials checkers for this domain.

Subclasses should override this method.

Returns
`list` of `ICredentialsChecker` provider | Credentials checkers for this domain.

def setAliasGroup(self, alias): (source)
from `twisted.mail.interfaces.IAliasableDomain`

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:`bytes` | A username.
Returns
`MaildirMessage` | A message receiver for this user.

def userDirectory(self, user): (source)
overridden in `twisted.mail.maildir.MaildirDirdbmDomain`

Return the maildir directory for a user.

Parameters
user:`bytes` | A username.
Returns
`bytes` or `None` | The user's mail directory for a valid user. Otherwise, `None`.

def willRelay(self, user, protocol): (source)

Check whether this domain will relay.

Parameters
user:`Address` | The destination address.
protocol:`SMTP` | The protocol over which the message to be relayed is being received.
Returns
`bool` | An 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.

root = (source)

See `__init__`.