smtpd.SMTPChannel.seen_greeting

seen_greeting Holds a string containing the greeting sent by the client in its “HELO”.

smtpd.SMTPChannel.smtp_state

smtp_state Holds the current state of the channel. This will be either COMMAND initially and then DATA after the client sends a “DATA” line.

smtpd.SMTPChannel.received_data

received_data Holds a string containing all of the data sent by the client during the DATA state, up to but not including the terminating "\r\n.\r\n".

smtpd.SMTPChannel.smtp_server

smtp_server Holds the SMTPServer that spawned this channel.

smtpd.SMTPChannel.mailfrom

mailfrom Holds a string containing the address identified in the “MAIL FROM:” line from the client.

smtpd.SMTPChannel.peer

peer Holds the name of the client peer as returned by conn.getpeername() where conn is conn.

smtpd.SMTPChannel.rcpttos

rcpttos Holds a list of strings containing the addresses identified in the “RCPT TO:” lines from the client.

smtpd.SMTPChannel.fqdn

fqdn Holds the fully-qualified domain name of the server as returned by socket.getfqdn().

smtpd.SMTPChannel

class smtpd.SMTPChannel(server, conn, addr, data_size_limit=33554432, map=None, enable_SMTPUTF8=False, decode_data=True) Create a new SMTPChannel object which manages the communication between the server and a single SMTP client. conn and addr are as per the instance variables described below. data_size_limit specifies the maximum number of bytes that will be accepted in a DATA command. A value of None or 0 means no limit. enable_SMTPUTF8 determins whether the SMTPUTF8 extension (as defined

smtpd.SMTPChannel.addr

addr Holds the address of the client, the second value returned by socket.accept