class documentation

class twisted.mail.protocols.DomainDeliveryBase: (source)

Known subclasses: twisted.mail.protocols.ESMTPDomainDelivery, twisted.mail.protocols.SMTPDomainDelivery

Implements interfaces: twisted.mail.interfaces.IMessageDelivery

View In Hierarchy

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.
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.
protocolName = (source)
The protocol being used to deliver the mail. Sub-classes should set this appropriately.
(type: bytes)
def __init__(self, service, user, host=smtp.DNSNAME): (source)
ParametersserviceA mail service. (type: MailService)
userThe authenticated SMTP user. (type: bytes or None)
hostThe hostname. (type: bytes)
def receivedHeader(self, helo, origin, recipients): (source)

Generate a received header string for a message.

ParametersheloThe client's identity as sent in the HELO command and its IP address. (type: 2-tuple of (bytes, bytes))
originThe origination address of the message. (type: Address)
recipientsThe destination addresses for the message. (type: list of User)
ReturnsA received header string. (type: bytes)
def validateTo(self, user): (source)

Validate the address for which a message is destined.

ParametersuserThe destination address. (type: User)
ReturnsA 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.)
RaisesSMTPBadRcptWhen messages cannot be accepted for the destination address.
def validateFrom(self, helo, origin): (source)

Validate the address from which a message originates.

ParametersheloThe client's identity as sent in the HELO command and its IP address. (type: 2-tuple of (bytes, bytes))
originThe origination address of the message. (type: Address)
ReturnsThe origination address. (type: Address)
RaisesSMTPBadSenderWhen messages cannot be accepted from the origination address.
API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.