Package circuits :: Package lib :: Module smtp :: Class SMTP

Class SMTP

    object --+            
             |            
  core.Manager --+        
                 |        
core.BaseComponent --+    
                     |    
        core.Component --+
                         |
                        SMTP

SMTP(event) -> new smtp object

Create a new smtp object which implements the SMTP protocol. Note this doesn't actually do anything usefull unless used in conjunction with circuits.parts.sockets.TCPServer.

See: examples/net/smtpd.py

Nested Classes

Inherited from core.Component: __metaclass__

Instance Methods
 
reset(self)
 
processMessage(self, sock, mailfrom, rcpttos, data)
str
getFQDN(I)
Return the fully qualified domain name of this server.
None
onRAW(I, sock, line)
Process a line of text and generate the appropiate event.
 
smtpHELO(self, sock, arg)
 
smtpNOOP(self, sock, arg)
 
smtpQUIT(self, sock, arg)
 
smtpMAIL(self, sock, arg)
 
smtpRCPT(self, sock, arg)
 
smtpRSET(self, sock, arg)
 
smtpDATA(self, sock, arg)
 
onCONNECT(self, sock, host, port)
 
onDISCONNECT(self, sock)
None
onREAD(S, sock, data)
Process any incoming data appending it to an internal buffer.

Inherited from core.BaseComponent: __call__, __init__, __repr__, register, unregister

Inherited from core.Manager: __add__, __iadd__, __isub__, __len__, __sub__, flush, push, run, send, start, stop

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods

Inherited from core.Component: __new__

Class Variables
  COMMAND = 0
  DATA = 1
Instance Variables

Inherited from core.BaseComponent: channel

Inherited from core.Manager: manager

Properties

Inherited from core.Manager: channels, components, running, state, ticks

Inherited from object: __class__

Method Details

onRAW(I, sock, line)

 

Process a line of text and generate the appropiate event. This must not be overridden by sub-classes, if it is, this must be explitetly called by the sub-class. Other Components may however listen to this event and process custom SMTP events.

Returns: None
Decorators:
  • @handler("raw")

onCONNECT(self, sock, host, port)

 
Decorators:
  • @handler("connect")

onDISCONNECT(self, sock)

 
Decorators:
  • @handler("disconnect")

onREAD(S, sock, data)

 

Process any incoming data appending it to an internal buffer. Split the buffer by the standard line delimiters CRLF and create a Raw event per line. Any unfinished lines of text, leave in the buffer.

Returns: None
Decorators:
  • @handler("read")