Module smtpd :: Class SMTPServer
[hide private]
[frames] | no frames]

_ClassType SMTPServer

asyncore.dispatcher --+
                      |
                     SMTPServer
Known Subclasses:

Instance Methods [hide private]
 
__init__(self, localaddr, remoteaddr)
 
handle_accept(self)
 
process_message(self, peer, mailfrom, rcpttos, data)
Override this abstract method to handle messages from the client.

Inherited from asyncore.dispatcher: __getattr__, __repr__, accept, add_channel, bind, close, connect, create_socket, del_channel, handle_close, handle_connect, handle_error, handle_expt, handle_expt_event, handle_read, handle_read_event, handle_write, handle_write_event, listen, log, log_info, readable, recv, send, set_reuse_addr, set_socket, writable

Class Variables [hide private]

Inherited from asyncore.dispatcher: accepting, addr, closing, connected, debug

Method Details [hide private]

__init__(self, localaddr, remoteaddr)
(Constructor)

 
Overrides: asyncore.dispatcher.__init__

handle_accept(self)

 
Overrides: asyncore.dispatcher.handle_accept

process_message(self, peer, mailfrom, rcpttos, data)

 

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.