Example #1
0
 def connectionMade(self):

        state.activeIMAPSessions += 1

        state.totalIMAPSessions += 1

        IMAP4Server.connectionMade(self)
Example #2
0
 def connectionLost(self, reason):
     state.activeIMAPSessions -= 1
     IMAP4Server.connectionLost(self, reason)
Example #3
0
 def connectionMade(self):
     state.activeIMAPSessions += 1
     state.totalIMAPSessions += 1
     IMAP4Server.connectionMade(self)
Example #4
0
 def __init__(self, user_account):
     IMAP4Server.__init__(self)
     self.account = user_account
Example #5
0
 def connectionLost(self, reason):
     state.activeIMAPSessions -= 1
     IMAP4Server.connectionLost(self, reason)
Example #6
0
 def __init__(self, user_account):
     IMAP4Server.__init__(self)
     self.account = user_account
Example #7
0
        MemoryAccount.__init__(self, id)

        self.mailboxes = {"SPAM" : spam,
                          "UNSURE" : unsure,
                          "TRAIN_AS_HAM" : ham,
                          "TRAIN_AS_SPAM" : train_spam,
                          "INBOX" : inbox}
 def select(self, name, readwrite=1):

        return MemoryAccount.select(self, name, readwrite)

class  SpambayesIMAPServer (IMAP4Server) :
	IDENT = "Spambayes IMAP Server IMAP4rev1 Ready"
	    def __init__(self, user_account):

        IMAP4Server.__init__(self)

        self.account = user_account
 def authenticateLogin(self, user, passwd):

        """Lookup the account associated with the given parameters."""

        if user == options["imapserver", "username"] and \
           passwd == options["imapserver", "password"]:

            return (IAccount, self.account, None)

        raise cred.error.UnauthorizedLogin()
 def connectionMade(self):

        state.activeIMAPSessions += 1