Exemple #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}
 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}
Exemple #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)
Exemple #4
0
 def select(self, name, readwrite=1):
     return MemoryAccount.select(self, name, readwrite)
Exemple #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)
Exemple #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)