Beispiel #1
0
 def __init__(self, id, ham, spam, unsure, train_spam, inbox):
     MemoryAccount.__init__(self, id)
     self.mailboxes = {"SPAM" : spam,
                       "UNSURE" : unsure,
                       "TRAIN_AS_HAM" : ham,
                       "TRAIN_AS_SPAM" : train_spam,
                       "INBOX" : inbox}
Beispiel #2
0
 def __init__(self, id, ham, spam, unsure, train_spam, inbox):
     MemoryAccount.__init__(self, id)
     self.mailboxes = {"SPAM" : spam,
                       "UNSURE" : unsure,
                       "TRAIN_AS_HAM" : ham,
                       "TRAIN_AS_SPAM" : train_spam,
                       "INBOX" : inbox}
Beispiel #3
0
 def select(self, name, readwrite=1):
     # 'INBOX' is a special case-insensitive name meaning the
     # primary mailbox for the user; for our purposes this contains
     # special messages from SpamBayes.
     return MemoryAccount.select(self, name, readwrite)
Beispiel #4
0
 def select(self, name, readwrite=1):
     return MemoryAccount.select(self, name, readwrite)
Beispiel #5
0
 def select(self, name, readwrite=1):
     # 'INBOX' is a special case-insensitive name meaning the
     # primary mailbox for the user; for our purposes this contains
     # special messages from SpamBayes.
     return MemoryAccount.select(self, name, readwrite)
Beispiel #6
0
        pass
 def newMessages(self, exists, recent):

        if exists is not None:

            id = self.mailbox.getUID(exists)

            msg = self.mailbox.storage[str(id)]

            msg.train(state.bayes, self.asSpam)

class  SpambayesAccount (MemoryAccount) :
	"""Account for Spambayes server."""
	    def __init__(self, id, ham, spam, unsure, train_spam, inbox):

        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)