Go to the latest version of this document.

# ``twisted`.`mail`.`interfaces`.`IAliasableDomain``

interface documentation

`class IAliasableDomain(IDomain): (source)`

Known implementations: `twisted.mail.maildir.AbstractMaildirDomain`

View In Hierarchy

An interface for email domains which can be aliased to other domains.

Method | `exists` | Check whether a user exists in this domain or an alias of it.
Method | `setAliasGroup` | Set the group of defined aliases for this domain.

Inherited from `IDomain`:

Method | `addUser` | Add a user to this domain.
Method | `getCredentialsCheckers` | Return credentials checkers for this domain.

Inherited from `IRealm` (via `IDomain`):

Method | `requestAvatar` | Return avatar which provides one of the given interfaces.

def exists(user, memo=None): (source)
overrides `twisted.mail.interfaces.IDomain.exists`

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 `IMessageSMTP` 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 setAliasGroup(aliases): (source)

Set the group of defined aliases for this domain.

Parameters
aliases:`dict` of `bytes` -> `IAlias` provider | A mapping of domain name to alias.