t.m.p.DomainDeliveryBase : class documentation

Part of twisted.mail.protocols View Source View In Hierarchy

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

Implements interfaces: twisted.mail.smtp.IMessageDelivery

A server that uses twisted.mail service's domains.
Method __init__ Undocumented
Method receivedHeader Generate the Received header for a message
Method validateTo Validate the address for which the message is destined.
Method validateFrom Validate the address from which the message originates.
Method startMessage Undocumented
def __init__(self, service, user, host=smtp.DNSNAME): (source)
Undocumented
def receivedHeader(self, helo, origin, recipients): (source)
Generate the Received header for a message
ParametersheloThe argument to the HELO command and the client's IP address. (type: (str, str))
originThe address the message is from (type: Address)
recipientsA list of the addresses for which this message is bound. (type: list of User)
ReturnsThe full "Received" header string. (type: str)
def validateTo(self, user): (source)
Validate the address for which the message is destined.
ParametersuserThe address to validate. (type: User)
ReturnsA Deferred which becomes, or a callable which takes no arguments and returns an object implementing IMessage. This will be called and the returned object used to deliver the message when it arrives. (type: no-argument callable)
RaisesSMTPBadRcptRaised if messages to the address are not to be accepted.
def validateFrom(self, helo, origin): (source)
Validate the address from which the message originates.
ParametersheloThe argument to the HELO command and the client's IP address. (type: (str, str))
originThe address the message is from (type: Address)
Returnsorigin or a Deferred whose callback will be passed origin. (type: Deferred or Address)
RaisesSMTPBadSenderRaised of messages from this address are not to be accepted.
def startMessage(self, users): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2012-09-01 11:44:56.