class documentation
class DomainDeliveryBase: (source)
Known subclasses: twisted.mail.protocols.ESMTPDomainDelivery, twisted.mail.protocols.SMTPDomainDelivery
Constructor: DomainDeliveryBase(service, user, host)
Implements interfaces: twisted.mail.interfaces.IMessageDelivery
A base class for message delivery using the domains of a mail service.
| Method | __init__ |
No summary |
| Method | received |
Generate a received header string for a message. |
| Method | validate |
Validate the address from which a message originates. |
| Method | validate |
Validate the address for which a message is destined. |
| Instance Variable | host |
See __init__ |
| Instance Variable | protocol |
The protocol being used to deliver the mail. Sub-classes should set this appropriately. |
| Instance Variable | service |
See __init__ |
| Instance Variable | user |
See __init__ |
| Parameters | |
service:MailService | A mail service. |
user:bytes or None | The authenticated SMTP user. |
host:bytes | The hostname. |
Generate a received header string for a message.
| Parameters | |
helo:2-tuple of (bytes, bytes) | The client's identity as sent in the HELO command and its IP address. |
origin:Address | The origination address of the message. |
recipients:list of User | The destination addresses for the message. |
| Returns | |
bytes | A received header string. |
Validate the address from which a message originates.
| Parameters | |
helo:2-tuple of (bytes, bytes) | The client's identity as sent in the HELO command and its IP address. |
origin:Address | The origination address of the message. |
| Returns | |
Address | The origination address. |
| Raises | |
SMTPBadSender | When messages cannot be accepted from the origination address. |
Validate the address for which a message is destined.
| Parameters | |
user:User | The destination address. |
| Returns | |
Deferred which successfully fires with no-argument callable which returns IMessage provider. | A deferred which successfully fires with a no-argument callable which returns a message receiver for the destination. |
| Raises | |
SMTPBadRcpt | When messages cannot be accepted for the destination address. |