# ``twisted`.`mail`.`mail`.`BounceDomain``

class documentation

`class BounceDomain: (source)`

Implements interfaces: `twisted.mail.interfaces.IDomain`

View In Hierarchy

A domain with no users.

This can be used to block off a domain.

Method | `addUser` | Ignore attempts to add a user to this domain.
Method | `exists` | Raise an exception to indicate that the user does not exist in this domain.
Method | `getCredentialsCheckers` | Return no credentials checkers for this domain.
Method | `willRelay` | Indicate that this domain will not relay.

def addUser(self, user, password): (source)
from `twisted.mail.interfaces.IDomain`
Ignore attempts to add a user to this domain.

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

def exists(self, user): (source)
from `twisted.mail.interfaces.IDomain`
Raise an exception to indicate that the user does not exist in this domain.

Parameters
user:`User` | A user.
Raises
`SMTPBadRcpt` | When the given user does not exist in this domain.

def getCredentialsCheckers(self): (source)
from `twisted.mail.interfaces.IDomain`
Return no credentials checkers for this domain.

Returns
`list` | The empty list.

def willRelay(self, user, protocol): (source)
Indicate that this domain will not relay.

Parameters
user:`Address` | The destination address.
protocol:`Protocol` | The protocol over which the message to be relayed is being received.
Returns
`bool` | `False`.