Go to the latest version of this document.

# ``twisted`.`mail`.`interfaces`.`IDomain``

interface documentation

`class IDomain(IRealm): (source)`

Known subclasses: `twisted.mail.interfaces.IAliasableDomain`

Known implementations: `twisted.mail.mail.BounceDomain`

View In Hierarchy

An interface for email domains.

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

Inherited from `IRealm`:

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

def addUser(user, password): (source)

Add a user to this domain.

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

def exists(user): (source)
overridden in `twisted.mail.interfaces.IAliasableDomain`

Check whether a user exists in this domain.

Parameters
user:`User` | A user.

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.

def getCredentialsCheckers(): (source)

Return credentials checkers for this domain.

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