smtpd (version Python SMTP proxy version 0.2)
index
/usr/lib/python2.1/smtpd.py

An RFC 821 smtp proxy.
 
Usage: %(program)s [options] localhost:port remotehost:port
 
Options:
 
    --nosetuid
    -n
        This program generally tries to setuid `nobody', unless this flag is
        set.  The setuid call will fail if this program is not run as root (in
        which case, use this flag).
 
    --version
    -V
        Print the version number and exit.
 
    --class classname
    -c classname
        Use `classname' as the concrete SMTP proxy class.  Uses `SMTPProxy' by
        default.
 
    --debug
    -d
        Turn on debugging prints.
 
    --help
    -h
        Print this message and exit.
 
Version: %(__version__)s

 
Modules
            
asynchat
asyncore
errno
getopt
os
socket
sys
time

 
Classes
            
Devnull
Options
asynchat.async_chat(asyncore.dispatcher)
SMTPChannel
asyncore.dispatcher
SMTPServer
DebuggingServer
PureProxy
MailmanProxy

 
class DebuggingServer(SMTPServer)
       
  
__getattr__(self, attr) from asyncore.dispatcher
__init__(self, localaddr, remoteaddr) from SMTPServer
__repr__(self) from asyncore.dispatcher
accept(self) from asyncore.dispatcher
add_channel(self, map=None) from asyncore.dispatcher
bind(self, addr) from asyncore.dispatcher
close(self) from asyncore.dispatcher
connect(self, address) from asyncore.dispatcher
create_socket(self, family, type) from asyncore.dispatcher
del_channel(self, map=None) from asyncore.dispatcher
handle_accept(self) from SMTPServer
handle_close(self) from asyncore.dispatcher
handle_connect(self) from asyncore.dispatcher
handle_error(self) from asyncore.dispatcher
handle_expt(self) from asyncore.dispatcher
handle_expt_event(self) from asyncore.dispatcher
handle_read(self) from asyncore.dispatcher
handle_read_event(self) from asyncore.dispatcher
handle_write(self) from asyncore.dispatcher
handle_write_event(self) from asyncore.dispatcher
listen(self, num) from asyncore.dispatcher
log(self, message) from asyncore.dispatcher
log_info(self, message, type='info') from asyncore.dispatcher
process_message(self, peer, mailfrom, rcpttos, data)
# Do something with the gathered message
readable(self) from asyncore.dispatcher
recv(self, buffer_size) from asyncore.dispatcher
send(self, data) from asyncore.dispatcher
set_reuse_addr(self) from asyncore.dispatcher
set_socket(self, sock, map=None) from asyncore.dispatcher
writable(self) from asyncore.dispatcher

 
class Devnull
       
  
flush(self)
write(self, msg)

 
class MailmanProxy(PureProxy)
       
  
__getattr__(self, attr) from asyncore.dispatcher
__init__(self, localaddr, remoteaddr) from SMTPServer
__repr__(self) from asyncore.dispatcher
_deliver(self, mailfrom, rcpttos, data) from PureProxy
accept(self) from asyncore.dispatcher
add_channel(self, map=None) from asyncore.dispatcher
bind(self, addr) from asyncore.dispatcher
close(self) from asyncore.dispatcher
connect(self, address) from asyncore.dispatcher
create_socket(self, family, type) from asyncore.dispatcher
del_channel(self, map=None) from asyncore.dispatcher
handle_accept(self) from SMTPServer
handle_close(self) from asyncore.dispatcher
handle_connect(self) from asyncore.dispatcher
handle_error(self) from asyncore.dispatcher
handle_expt(self) from asyncore.dispatcher
handle_expt_event(self) from asyncore.dispatcher
handle_read(self) from asyncore.dispatcher
handle_read_event(self) from asyncore.dispatcher
handle_write(self) from asyncore.dispatcher
handle_write_event(self) from asyncore.dispatcher
listen(self, num) from asyncore.dispatcher
log(self, message) from asyncore.dispatcher
log_info(self, message, type='info') from asyncore.dispatcher
process_message(self, peer, mailfrom, rcpttos, data)
readable(self) from asyncore.dispatcher
recv(self, buffer_size) from asyncore.dispatcher
send(self, data) from asyncore.dispatcher
set_reuse_addr(self) from asyncore.dispatcher
set_socket(self, sock, map=None) from asyncore.dispatcher
writable(self) from asyncore.dispatcher

 
class Options
       
  

 
class PureProxy(SMTPServer)
       
  
__getattr__(self, attr) from asyncore.dispatcher
__init__(self, localaddr, remoteaddr) from SMTPServer
__repr__(self) from asyncore.dispatcher
_deliver(self, mailfrom, rcpttos, data)
accept(self) from asyncore.dispatcher
add_channel(self, map=None) from asyncore.dispatcher
bind(self, addr) from asyncore.dispatcher
close(self) from asyncore.dispatcher
connect(self, address) from asyncore.dispatcher
create_socket(self, family, type) from asyncore.dispatcher
del_channel(self, map=None) from asyncore.dispatcher
handle_accept(self) from SMTPServer
handle_close(self) from asyncore.dispatcher
handle_connect(self) from asyncore.dispatcher
handle_error(self) from asyncore.dispatcher
handle_expt(self) from asyncore.dispatcher
handle_expt_event(self) from asyncore.dispatcher
handle_read(self) from asyncore.dispatcher
handle_read_event(self) from asyncore.dispatcher
handle_write(self) from asyncore.dispatcher
handle_write_event(self) from asyncore.dispatcher
listen(self, num) from asyncore.dispatcher
log(self, message) from asyncore.dispatcher
log_info(self, message, type='info') from asyncore.dispatcher
process_message(self, peer, mailfrom, rcpttos, data)
readable(self) from asyncore.dispatcher
recv(self, buffer_size) from asyncore.dispatcher
send(self, data) from asyncore.dispatcher
set_reuse_addr(self) from asyncore.dispatcher
set_socket(self, sock, map=None) from asyncore.dispatcher
writable(self) from asyncore.dispatcher

 
class SMTPChannel(asynchat.async_chat)
       
  
_SMTPChannel__getaddr = __getaddr(self, keyword, arg)
# factored
__getattr__(self, attr) from asyncore.dispatcher
__init__(self, server, conn, addr)
__repr__(self) from asyncore.dispatcher
accept(self) from asyncore.dispatcher
add_channel(self, map=None) from asyncore.dispatcher
bind(self, addr) from asyncore.dispatcher
close(self) from asyncore.dispatcher
close_when_done(self) from asynchat.async_chat
collect_incoming_data(self, data)
# Implementation of base class abstract method
connect(self, address) from asyncore.dispatcher
create_socket(self, family, type) from asyncore.dispatcher
del_channel(self, map=None) from asyncore.dispatcher
discard_buffers(self) from asynchat.async_chat
found_terminator(self)
# Implementation of base class abstract method
get_terminator(self) from asynchat.async_chat
handle_accept(self) from asyncore.dispatcher
handle_close(self) from asynchat.async_chat
handle_connect(self) from asyncore.dispatcher
handle_error(self) from asyncore.dispatcher
handle_expt(self) from asyncore.dispatcher
handle_expt_event(self) from asyncore.dispatcher
handle_read(self) from asynchat.async_chat
handle_read_event(self) from asyncore.dispatcher
handle_write(self) from asynchat.async_chat
handle_write_event(self) from asyncore.dispatcher
initiate_send(self) from asynchat.async_chat
listen(self, num) from asyncore.dispatcher
log(self, message) from asyncore.dispatcher
log_info(self, message, type='info') from asyncore.dispatcher
push(self, msg)
# Overrides base class for convenience
push_with_producer(self, producer) from asynchat.async_chat
readable(self) from asynchat.async_chat
recv(self, buffer_size) from asyncore.dispatcher
refill_buffer(self) from asynchat.async_chat
send(self, data) from asyncore.dispatcher
set_reuse_addr(self) from asyncore.dispatcher
set_socket(self, sock, map=None) from asyncore.dispatcher
set_terminator(self, term) from asynchat.async_chat
smtp_DATA(self, arg)
smtp_HELO(self, arg)
# SMTP and ESMTP commands
smtp_MAIL(self, arg)
smtp_NOOP(self, arg)
smtp_QUIT(self, arg)
smtp_RCPT(self, arg)
smtp_RSET(self, arg)
writable(self) from asynchat.async_chat

 
class SMTPServer(asyncore.dispatcher)
       
  
__getattr__(self, attr) from asyncore.dispatcher
__init__(self, localaddr, remoteaddr)
__repr__(self) from asyncore.dispatcher
accept(self) from asyncore.dispatcher
add_channel(self, map=None) from asyncore.dispatcher
bind(self, addr) from asyncore.dispatcher
close(self) from asyncore.dispatcher
connect(self, address) from asyncore.dispatcher
create_socket(self, family, type) from asyncore.dispatcher
del_channel(self, map=None) from asyncore.dispatcher
handle_accept(self)
handle_close(self) from asyncore.dispatcher
handle_connect(self) from asyncore.dispatcher
handle_error(self) from asyncore.dispatcher
handle_expt(self) from asyncore.dispatcher
handle_expt_event(self) from asyncore.dispatcher
handle_read(self) from asyncore.dispatcher
handle_read_event(self) from asyncore.dispatcher
handle_write(self) from asyncore.dispatcher
handle_write_event(self) from asyncore.dispatcher
listen(self, num) from asyncore.dispatcher
log(self, message) from asyncore.dispatcher
log_info(self, message, type='info') from asyncore.dispatcher
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.
readable(self) from asyncore.dispatcher
recv(self, buffer_size) from asyncore.dispatcher
send(self, data) from asyncore.dispatcher
set_reuse_addr(self) from asyncore.dispatcher
set_socket(self, sock, map=None) from asyncore.dispatcher
writable(self) from asyncore.dispatcher

 
Functions
            
parseargs()
usage(code, msg='')

 
Data
             DEBUGSTREAM = <smtpd.Devnull instance>
EMPTYSTRING = ''
NEWLINE = '\n'
__all__ = ['SMTPServer', 'DebuggingServer', 'PureProxy', 'MailmanProxy']
__file__ = '/usr/lib/python2.1/smtpd.pyc'
__name__ = 'smtpd'
__version__ = 'Python SMTP proxy version 0.2'
program = '/usr/bin/pydoc'