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