def __init__(self, serverName, serverPort, proxyPort, trainer): proxyArgs = (serverName, serverPort, trainer) Dibbler.Listener.__init__(self, proxyPort, BayesSMTPProxy, proxyArgs) print "SMTP Listener on port %s is proxying %s:%d" % (_addressPortStr(proxyPort), serverName, serverPort)
def __init__(self, serverName, serverPort, proxyPort, trainer): proxyArgs = (serverName, serverPort, trainer) Dibbler.Listener.__init__(self, proxyPort, BayesSMTPProxy, proxyArgs) print 'SMTP Listener on port %s is proxying %s:%d' % \ (_addressPortStr(proxyPort), serverName, serverPort)
def __init__(self, serverName, serverPort, proxyPort, spam, unsure): proxyArgs = (serverName, serverPort, spam, unsure) Dibbler.Listener.__init__(self, proxyPort, RedirectingBayesProxy, proxyArgs) print 'Listener on port %s is proxying %s:%d' % \ (_addressPortStr(proxyPort), serverName, serverPort)
return response class RedirectingBayesProxyListener (Dibbler.Listener) : """Listens for incoming email client connections and spins off RedirectingBayesProxy objects to serve them. """ def __init__(self, serverName, serverPort, proxyPort, spam, unsure): proxyArgs = (serverName, serverPort, spam, unsure) Dibbler.Listener.__init__(self, proxyPort, RedirectingBayesProxy, proxyArgs) print('Listener on port %s is proxying %s:%d' % \ (_addressPortStr(proxyPort), serverName, serverPort)) class IMAPState (State) : def __init__(self): State.__init__(self) self.totalIMAPSessions = 0 self.activeIMAPSessions = 0 def createWorkers(self): """There aren't many workers in an IMAP State - most of the work is done elsewhere. We do need to load the classifier, though, and build the status strings."""