smtpd.SMTPServer.process_message

SMTPServer.process_message(peer, mailfrom, rcpttos, data)[source]

Override this abstract method to handle messages from the client.

peer is a tuple containing (ipaddr, port) of the client that made the socket connection to our smtp port.

mailfrom is the raw address the client claims the message is coming from.

rcpttos is a list of raw addresses the client wishes to deliver the message to.

data is a string containing the entire full text of the message, headers (if supplied) and all. It has been `de-transparencied’ according to RFC 821, Section 4.5.2. In other words, a line containing a `.’ followed by other text has had the leading dot removed.

This function should return None, for a normal `250 Ok’ response; otherwise it returns the desired response string in RFC 821 format.