def __init__(self, conn, addr, milter_class, tp):
"""A connection handling class to manage communication on this socket.
Args:
conn: The socket connection object.
addr: The address (port/ip) as returned by socket.accept()
milter_class: A class (not an instance) that handles callbacks for
milter commands (e.g. a child of the PpyMilter class).
June 11, 2012, Stephen Nightingale, NIST:
Added chmiltype to differentiate mail sender and receiver processing.
"""
asynchat.async_chat.__init__(self, conn)
self.__conn = conn
self.__addr = addr
self.__milter_dispatcher = kimpf.PpyMilterDispatcher(milter_class, tp)
self.__input = []
self.set_terminator(MILTER_LEN_BYTES)
self.found_terminator = self.read_packetlen
self.chmilt = tp.tup['milType']
self.mildb = tp.tup['milDB']
self.tp = tp
评论列表
文章目录