[Spambayes-checkins] spambayes imapfilter.py,1.48,1.49
Tony Meyer
anadelonbrin at users.sourceforge.net
Tue Jun 24 00:16:29 EDT 2003
Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv12942
Modified Files:
imapfilter.py
Log Message:
Implements sf#755095 IMAP Filter: move trained messages
Note that this is deliberately not exposed via the ui, as I'm not sure how confusing it will be. If lots of people ask for it, then it can be exposed.
Index: imapfilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/imapfilter.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** imapfilter.py 23 Jun 2003 03:13:12 -0000 1.48
--- imapfilter.py 24 Jun 2003 06:16:27 -0000 1.49
***************
*** 534,537 ****
--- 534,545 ----
num_trained += 1
msg.RememberTrained(isSpam)
+ if isSpam:
+ move_opt_name = "move_trained_spam_to_folder"
+ else:
+ move_opt_name = "move_trained_ham_to_folder"
+ if options["imap", move_opt_name] != "":
+ msg.MoveTo(IMAPFolder(options["imap",
+ move_opt_name]))
+ msg.Save()
return num_trained
More information about the Spambayes-checkins
mailing list