dwooqfuuguserssourceforgenet revision 3170 httpspambayessvnsourceforgenetspambayesrev3170viewrev author montanaro date 20080209 122905 0800 sat 09 feb 2008 log message patch dave abrahams sf 1653494 fixes problems imap recent command modified paths trunkspambayesscriptssb_imapfilterpy modified trunkspambayesscriptssb_imapfilterpy trunkspambayesscriptssb_imapfilterpy 20071107 020254 utc rev 3169 trunkspambayesscriptssb_imapfilterpy 20080209 202905 utc rev 3170 73210 73213 response selfimap_serverrecent data selfimap_servercheck_responserecent response data0 none optionsglobals verbose print imapfilter found saved message iteration selfuid break else selfimap_serverprint_log raise badimapresponseerrorrecent find saved message optionsglobals verbose print imapfilter cant find saved message 100 iterations selfuid raise badimapresponseerrorrecent find saved message need update uid changed although dont use uid keep track messages 87214 87517 msgsetidmogroup1 break else msgsetidself_generate_id newid self_generate_id optionsglobals verbose print imapfilter saving new id msguid newid msgsetidnewid unfortunately resave message id stored imap server vast majority messages messageid headers tell rarely less often previous solution anyway msg msgget_full_message msgsave msg msgget_full_message msgsave optionsglobals verbose sysstdoutwrite 9547 96011 countspam 0 countunsure 0 msg self msggetclassification none cls msggetclassification cls none hamfolder none optionsglobals verbose print imapfilter classified scls msguid msg msgget_full_message msgcould_not_retrieve something went wrong couldnt even get 9627 97211 annoyingly well try every time script runs hopefully user notice errors move soon enough optionsglobals verbose print imapfilter could retrieve msguid continue prob clues classifierspamprobmsgtokenize evidencetrue add headers remember classification 97316 98726 cls msggetclassification cls optionsheaders header_ham_string hamfolder optionsglobals verbose print imapfilter moving ham folder msguid msgmovetohamfolder otherwise leave ham alone countham 1 elif cls optionsheaders header_spam_string optionsglobals verbose print imapfilter moving spam folder msguid msgmovetospamfolder countspam 1 else optionsglobals verbose print imapfilter moving unsure folder msguid msgmovetounsurefolder countunsure 1 msgsave else optionsglobals verbose print imapfilter already classified msguid return count 103213 105623 def filterself assert selfimap_server anything without imap server selfspam_folder selfspam_folder imapfolderoptionsimap spam_folder selfimap_server selfstats spam_folder_name optionsimap spam_folder optionsglobals verbose print imapfilter spam folder spam_folder_name selfspam_folder imapfolder spam_folder_name selfimap_server selfstats selfunsure_folder selfunsure_folder imapfolderoptionsimap unsure_folder selfimap_server selfstats unsure_folder_name optionsimap unsure_folder optionsglobals verbose print imapfilter unsure folder unsure_folder_name selfunsure_folder imapfolder unsure_folder_name selfimap_server selfstats ham_folder_name optionsimap ham_folder optionsglobals verbose print imapfilter ham folder ham_folder_name ham_folder_name selfham_folder selfham_folder imapfolderham_folder_name selfimap_server selfstats sent sourceforgenet collaborative development platform worlds largest open source development site _______________________________________________ spambayescheckins mailing list pnperxdpvsarswdlppythonorg httpmailpythonorgmailmanlistinfospambayescheckins tue 05 aug 2008 180657 0800 spambayescheckins sfnet svn spambayes 3170 trunkspambayesscriptssb_imapfilterpy