From mhammond at users.sourceforge.net Mon Nov 3 04:29:45 2003 From: mhammond at users.sourceforge.net (Mark Hammond) Date: Mon Nov 3 04:29:53 2003 Subject: [Spambayes-checkins] spambayes/Outlook2000/dialogs/resources dialogs.h, 1.20, 1.20.2.1 dialogs.rc, 1.39, 1.39.2.1 Message-ID: Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs/resources In directory sc8-pr-cvs1:/tmp/cvs-serv24152/dialogs/resources Modified Files: Tag: release_1_0 dialogs.h dialogs.rc Log Message: Moving Outlook to the release_1_0 tag in preparation for a release. Created tag outlook-1-0-fork before the merge. Index: dialogs.h =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/resources/dialogs.h,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -C2 -d -r1.20 -r1.20.2.1 *** dialogs.h 5 Sep 2003 06:51:00 -0000 1.20 --- dialogs.h 3 Nov 2003 09:29:43 -0000 1.20.2.1 *************** *** 97,100 **** --- 97,102 ---- #define IDC_WIZ_GRAPHIC 1092 #define IDC_BUT_VIEW_LOG 1093 + #define IDC_EDIT1 1094 + #define IDC_STATISTICS 1095 // Next default values for new objects *************** *** 104,108 **** #define _APS_NEXT_RESOURCE_VALUE 128 #define _APS_NEXT_COMMAND_VALUE 40001 ! #define _APS_NEXT_CONTROL_VALUE 1094 #define _APS_NEXT_SYMED_VALUE 101 #endif --- 106,110 ---- #define _APS_NEXT_RESOURCE_VALUE 128 #define _APS_NEXT_COMMAND_VALUE 40001 ! #define _APS_NEXT_CONTROL_VALUE 1096 #define _APS_NEXT_SYMED_VALUE 101 #endif Index: dialogs.rc =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/resources/dialogs.rc,v retrieving revision 1.39 retrieving revision 1.39.2.1 diff -C2 -d -r1.39 -r1.39.2.1 *** dialogs.rc 17 Sep 2003 00:11:44 -0000 1.39 --- dialogs.rc 3 Nov 2003 09:29:43 -0000 1.39.2.1 *************** *** 48,55 **** IDC_INBOX_TIMER_ONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,100,217,10 ! PUSHBUTTON "Show Data Folder",IDC_SHOW_DATA_FOLDER,16,127,70,14 CONTROL "Enable background filtering",IDC_BUT_TIMER_ENABLED, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,12,162,10 ! PUSHBUTTON "Diagnostics...",IDC_BUT_SHOW_DIAGNOSTICS,163,126,70,14 END --- 48,58 ---- IDC_INBOX_TIMER_ONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,100,217,10 ! PUSHBUTTON "Show Data Folder",IDC_SHOW_DATA_FOLDER,7,190,70,14 CONTROL "Enable background filtering",IDC_BUT_TIMER_ENABLED, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,12,162,10 ! PUSHBUTTON "Diagnostics...",IDC_BUT_SHOW_DIAGNOSTICS,171,190,70,14 ! GROUPBOX "Statistics",IDC_STATIC,7,125,234,58 ! LTEXT "some stats\nand some more\nline 3\nline 4\nline 5", ! IDC_STATISTICS,12,134,223,43,SS_SUNKEN END From mhammond at users.sourceforge.net Mon Nov 3 04:29:45 2003 From: mhammond at users.sourceforge.net (Mark Hammond) Date: Mon Nov 3 04:29:54 2003 Subject: [Spambayes-checkins] spambayes/Outlook2000/dialogs FolderSelector.py, 1.30, 1.30.2.1 dialog_map.py, 1.34, 1.34.2.1 Message-ID: Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs In directory sc8-pr-cvs1:/tmp/cvs-serv24152/dialogs Modified Files: Tag: release_1_0 FolderSelector.py dialog_map.py Log Message: Moving Outlook to the release_1_0 tag in preparation for a release. Created tag outlook-1-0-fork before the merge. Index: FolderSelector.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/FolderSelector.py,v retrieving revision 1.30 retrieving revision 1.30.2.1 diff -C2 -d -r1.30 -r1.30.2.1 *** FolderSelector.py 9 Sep 2003 02:14:28 -0000 1.30 --- FolderSelector.py 3 Nov 2003 09:29:43 -0000 1.30.2.1 *************** *** 153,156 **** --- 153,159 ---- return root + # XXX - Note - the following structure code has been copied into the new + # XXX - win32gui_struct module. One day we can rip this in preference + # XXX - for this new standard win32all module # Helpers for the ugly win32 structure packing/unpacking def _GetMaskAndVal(val, default, mask, flag): *************** *** 253,256 **** --- 256,260 ---- item = UnpackTVItem(buf_item) return hwndFrom, id, code, item + # XXX - end of code copied to win32gui_struct.py ######################################################################### Index: dialog_map.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/dialog_map.py,v retrieving revision 1.34 retrieving revision 1.34.2.1 diff -C2 -d -r1.34 -r1.34.2.1 *** dialog_map.py 16 Sep 2003 23:51:12 -0000 1.34 --- dialog_map.py 3 Nov 2003 09:29:43 -0000 1.34.2.1 *************** *** 16,19 **** --- 16,27 ---- # "dialog specific" processors: + class StatsProcessor(ControlProcessor): + def Init(self): + text = "\n".join(self.window.manager.stats.GetStats()) + win32gui.SendMessage(self.GetControl(), win32con.WM_SETTEXT, 0, text) + + def GetPopupHelpText(self, cid): + return "Displays statistics on mail processed by SpamBayes" + class VersionStringProcessor(ControlProcessor): def Init(self): *************** *** 475,478 **** --- 483,487 ---- (EditNumberProcessor, "IDC_DELAY2_TEXT IDC_DELAY2_SLIDER", "Filter.timer_interval", 0, 10, 20), (BoolButtonProcessor, "IDC_INBOX_TIMER_ONLY", "Filter.timer_only_receive_folders"), + (StatsProcessor, "IDC_STATISTICS"), (CommandButtonProcessor, "IDC_SHOW_DATA_FOLDER", ShowDataFolder, ()), (DialogCommand, "IDC_BUT_SHOW_DIAGNOSTICS", "IDD_DIAGNOSTIC"), From mhammond at users.sourceforge.net Mon Nov 3 04:29:45 2003 From: mhammond at users.sourceforge.net (Mark Hammond) Date: Mon Nov 3 04:29:55 2003 Subject: [Spambayes-checkins] spambayes/Outlook2000 oastats.py, NONE, 1.2.2.1 addin.py, 1.112, 1.112.2.1 config_wizard.py, 1.7, 1.7.2.1 filter.py, 1.33, 1.33.2.1 manager.py, 1.87, 1.87.2.1 msgstore.py, 1.76, 1.76.2.1 Message-ID: Update of /cvsroot/spambayes/spambayes/Outlook2000 In directory sc8-pr-cvs1:/tmp/cvs-serv24152 Modified Files: Tag: release_1_0 addin.py config_wizard.py filter.py manager.py msgstore.py Added Files: Tag: release_1_0 oastats.py Log Message: Moving Outlook to the release_1_0 tag in preparation for a release. Created tag outlook-1-0-fork before the merge. --- NEW FILE: oastats.py --- # oastats.py - Outlook Addin Stats class Stats: def __init__(self, config): self.config = config self.Reset() def Reset(self): self.num_ham = self.num_spam = self.num_unsure = 0 self.num_deleted_spam = self.num_deleted_spam_fn = 0 self.num_recovered_good = self.num_recovered_good_fp = 0 def RecordClassification(self, score): score *= 100 # same units as our config values. if score >= self.config.filter.spam_threshold: self.num_spam += 1 elif score >= self.config.filter.unsure_threshold: self.num_unsure += 1 else: self.num_ham += 1 def RecordManualClassification(self, recover_as_good, score): score *= 100 # same units as our config values. if recover_as_good: self.num_recovered_good += 1 # If we are recovering an item that is in the "spam" threshold, # then record it as a "false positive" if score > self.config.filter.spam_threshold: self.num_recovered_good_fp += 1 else: self.num_deleted_spam += 1 # If we are deleting as Spam an item that was in our "good" range, # then record it as a false neg. if score < self.config.filter.unsure_threshold: self.num_deleted_spam_fn += 1 def GetStats(self): num_seen = self.num_ham + self.num_spam + self.num_unsure if num_seen==0: return ["SpamBayes has processed zero messages"] chunks = [] push = chunks.append perc_ham = 100.0 * self.num_ham / num_seen perc_spam = 100.0 * self.num_spam / num_seen perc_unsure = 100.0 * self.num_unsure / num_seen format_dict = dict(perc_spam=perc_spam, perc_ham=perc_ham, perc_unsure=perc_unsure, num_seen = num_seen) format_dict.update(self.__dict__) push("SpamBayes has processed %(num_seen)d messages - " \ "%(num_ham)d (%(perc_ham).0f%%) good, " \ "%(num_spam)d (%(perc_spam).0f%%) spam " \ "and %(num_unsure)d (%(perc_unsure).0f%%) unsure" % format_dict) if self.num_recovered_good: push("%(num_recovered_good)d message(s) were manually " \ "classified as good (with %(num_recovered_good_fp)d " \ "being false positives)" % format_dict) else: push("No messages were manually classified as good") if self.num_deleted_spam: push("%(num_deleted_spam)d message(s) were manually " \ "classified as spam (with %(num_deleted_spam_fn)d " \ "being false negatives)" % format_dict) else: push("No messages were manually classified as spam") return chunks if __name__=='__main__': class FilterConfig: unsure_threshold = 15 spam_threshold = 85 class Config: filter = FilterConfig() # processed zero s = Stats(Config()) print "\n".join(s.GetStats()) # No recovery s = Stats(Config()) s.RecordClassification(.2) print "\n".join(s.GetStats()) s = Stats(Config()) s.RecordClassification(.2) s.RecordClassification(.1) s.RecordClassification(.4) s.RecordClassification(.9) s.RecordManualClassification(True, 0.1) s.RecordManualClassification(True, 0.9) s.RecordManualClassification(False, 0.1) s.RecordManualClassification(False, 0.9) print "\n".join(s.GetStats()) Index: addin.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/addin.py,v retrieving revision 1.112 retrieving revision 1.112.2.1 diff -C2 -d -r1.112 -r1.112.2.1 *** addin.py 15 Sep 2003 06:26:35 -0000 1.112 --- addin.py 3 Nov 2003 09:29:43 -0000 1.112.2.1 *************** *** 21,25 **** # * Our config files also want a consistent locale, so periods and commas # are the same when they are read as when they are written. ! # So, at a few opportune times, we simple set it back. # We do it here as early as possible, before any imports that may see this # --- 21,25 ---- # * Our config files also want a consistent locale, so periods and commas # are the same when they are read as when they are written. ! # So, at a few opportune times, we simply set it back. # We do it here as early as possible, before any imports that may see this # *************** *** 30,43 **** locale.setlocale(locale.LC_NUMERIC, "C") - if sys.version_info >= (2, 3): - # sick off the new hex() warnings! - # todo - remove this - win32all has removed all these warnings - # (but we will wait some time for people to update) - warnings.filterwarnings("ignore", category=FutureWarning, append=1) - # Binary builds can avoid our pendingdeprecation too - if hasattr(sys, "frozen"): - warnings.filterwarnings("ignore", category=DeprecationWarning, append=1) - - from win32com import universal from win32com.server.exception import COMException --- 30,33 ---- *************** *** 611,615 **** if not self.manager.config.filter.enabled: self.manager.ReportError( ! "You must enable SpamBayes before you can delete as spam") return SetWaitCursor(1) --- 601,606 ---- if not self.manager.config.filter.enabled: self.manager.ReportError( ! "You must configure and enable SpamBayes before you can " \ ! "delete as spam") return SetWaitCursor(1) *************** *** 631,634 **** --- 622,628 ---- new_msg_state = self.manager.config.general.delete_as_spam_message_state for msgstore_message in msgstore_messages: + # Record this recovery in our stats. + self.manager.stats.RecordManualClassification(False, + self.manager.score(msgstore_message)) # Must train before moving, else we lose the message! subject = msgstore_message.GetSubject() *************** *** 666,670 **** if not self.manager.config.filter.enabled: self.manager.ReportError( ! "You must enable SpamBayes before you can recover spam") return SetWaitCursor(1) --- 660,665 ---- if not self.manager.config.filter.enabled: self.manager.ReportError( ! "You must configure and enable SpamBayes before you can " \ ! "recover spam") return SetWaitCursor(1) *************** *** 680,683 **** --- 675,681 ---- # that the source folder == dest folder - restore to # the inbox in this case. + # (But more likely is that the original store may be read-only + # so we were unable to record the initial folder, as we save it + # *before* we do the move (and saving after is hard)) try: subject = msgstore_message.GetSubject() *************** *** 688,691 **** --- 686,692 ---- restore_folder = inbox_folder + # Record this recovery in our stats. + self.manager.stats.RecordManualClassification(True, + self.manager.score(msgstore_message)) # Must train before moving, else we lose the message! print "Recovering to folder '%s' and ham training message '%s' - " % (restore_folder.name, subject), *************** *** 1235,1239 **** def ProcessMissedMessages(self): - # This could possibly spawn threads if it was too slow! from time import clock config = self.manager.config.filter --- 1236,1239 ---- *************** *** 1298,1302 **** if existing is None or existing.__class__ != HandlerClass: folder = msgstore_folder.GetOutlookItem() ! name = msgstore_folder.name try: new_hook = DispatchWithEvents(folder.Items, HandlerClass) --- 1298,1302 ---- if existing is None or existing.__class__ != HandlerClass: folder = msgstore_folder.GetOutlookItem() ! name = msgstore_folder.GetFQName() try: new_hook = DispatchWithEvents(folder.Items, HandlerClass) *************** *** 1319,1323 **** tb = None # dont want it, and nuke circular ref traceback.print_exception(etype, value, tb) ! print "SpamBayes: Watching for new messages in folder ", name else: new_hooks[msgstore_folder.id] = existing --- 1319,1323 ---- tb = None # dont want it, and nuke circular ref traceback.print_exception(etype, value, tb) ! print "SpamBayes: Watching for new messages in folder", name else: new_hooks[msgstore_folder.id] = existing *************** *** 1339,1345 **** # it (ie, the dialog) self.manager.Save() ! stats = self.manager.stats ! print "SpamBayes processed %d messages, finding %d spam and %d unsure" % \ ! (stats.num_seen, stats.num_spam, stats.num_unsure) self.manager.Close() self.manager = None --- 1339,1344 ---- # it (ie, the dialog) self.manager.Save() ! # Report some simple stats. ! print "\r\n".join(self.manager.stats.GetStats()) self.manager.Close() self.manager = None Index: config_wizard.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/config_wizard.py,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** config_wizard.py 29 Aug 2003 00:08:43 -0000 1.7 --- config_wizard.py 3 Nov 2003 09:29:43 -0000 1.7.2.1 *************** *** 44,49 **** for id in ids: # Only get the folders that actually exist. ! if manager.message_store.GetFolder(id) is not None: new_config.filter.watch_folder_ids.append(id) if not new_config.filter.watch_folder_ids: for folder in manager.message_store.YieldReceiveFolders(): --- 44,53 ---- for id in ids: # Only get the folders that actually exist. ! try: ! manager.message_store.GetFolder(id) ! # if we get here, it exists! new_config.filter.watch_folder_ids.append(id) + except manager.message_store.MsgStoreException: + pass if not new_config.filter.watch_folder_ids: for folder in manager.message_store.YieldReceiveFolders(): *************** *** 52,64 **** fc = manager.config.filter if fc.spam_folder_id: ! folder = manager.message_store.GetFolder(fc.spam_folder_id) ! if folder is not None: new_config.filter.spam_folder_id = folder.GetID() wc.spam_folder_name = "" if fc.unsure_folder_id: ! folder = manager.message_store.GetFolder(fc.unsure_folder_id) ! if folder is not None: new_config.filter.unsure_folder_id = folder.GetID() wc.unsure_folder_name = "" tc = manager.config.training if tc.ham_folder_ids: --- 56,72 ---- fc = manager.config.filter if fc.spam_folder_id: ! try: ! folder = manager.message_store.GetFolder(fc.spam_folder_id) new_config.filter.spam_folder_id = folder.GetID() wc.spam_folder_name = "" + except manager.message_store.MsgStoreException: + pass if fc.unsure_folder_id: ! try: ! folder = manager.message_store.GetFolder(fc.unsure_folder_id) new_config.filter.unsure_folder_id = folder.GetID() wc.unsure_folder_name = "" + except manager.message_store.MsgStoreException: + pass tc = manager.config.training if tc.ham_folder_ids: Index: filter.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/filter.py,v retrieving revision 1.33 retrieving revision 1.33.2.1 diff -C2 -d -r1.33 -r1.33.2.1 *** filter.py 19 Sep 2003 04:03:38 -0000 1.33 --- filter.py 3 Nov 2003 09:29:43 -0000 1.33.2.1 *************** *** 13,26 **** config = mgr.config.filter prob = mgr.score(msg) ! mgr.stats.num_seen += 1 prob_perc = prob * 100 if prob_perc >= config.spam_threshold: disposition = "Yes" attr_prefix = "spam" - mgr.stats.num_spam += 1 elif prob_perc >= config.unsure_threshold: disposition = "Unsure" attr_prefix = "unsure" - mgr.stats.num_unsure += 1 else: disposition = "No" --- 13,24 ---- config = mgr.config.filter prob = mgr.score(msg) ! mgr.stats.RecordClassification(prob) prob_perc = prob * 100 if prob_perc >= config.spam_threshold: disposition = "Yes" attr_prefix = "spam" elif prob_perc >= config.unsure_threshold: disposition = "Unsure" attr_prefix = "unsure" else: disposition = "No" *************** *** 61,65 **** msg.SetReadState(True) if action.startswith("un"): # untouched ! pass elif action.startswith("co"): # copied try: --- 59,63 ---- msg.SetReadState(True) if action.startswith("un"): # untouched ! mgr.LogDebug(1, "Not touching message '%s'" % msg.subject) elif action.startswith("co"): # copied try: *************** *** 70,73 **** --- 68,73 ---- else: msg.CopyToReportingError(mgr, dest_folder) + mgr.LogDebug(1, "Copied message '%s' to folder '%s'" \ + % (msg.subject, dest_folder.GetFQName())) elif action.startswith("mo"): # Moved try: *************** *** 78,81 **** --- 78,83 ---- else: msg.MoveToReportingError(mgr, dest_folder) + mgr.LogDebug(1, "Moved message '%s' to folder '%s'" \ + % (msg.subject, dest_folder.GetFQName())) else: raise RuntimeError, "Eeek - bad action '%r'" % (action,) Index: manager.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/manager.py,v retrieving revision 1.87 retrieving revision 1.87.2.1 diff -C2 -d -r1.87 -r1.87.2.1 *** manager.py 10 Sep 2003 07:42:45 -0000 1.87 --- manager.py 3 Nov 2003 09:29:43 -0000 1.87.2.1 *************** *** 15,18 **** --- 15,19 ---- import msgstore + import oastats try: *************** *** 133,139 **** pass - class Stats: - def __init__(self): - self.num_seen = self.num_spam = self.num_unsure = 0 # Function to "safely" save a pickle, only overwriting --- 134,137 ---- *************** *** 323,327 **** self.addin = None self.verbose = verbose - self.stats = Stats() self.outlook = outlook self.dialog_parser = None --- 321,324 ---- *************** *** 386,389 **** --- 383,387 ---- self.classifier_data = ClassifierData(db_manager, self) self.LoadBayes() + self.stats = oastats.Stats(self.config) # "old" bayes functions - new code should use "classifier_data" directly Index: msgstore.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/msgstore.py,v retrieving revision 1.76 retrieving revision 1.76.2.1 diff -C2 -d -r1.76 -r1.76.2.1 *** msgstore.py 15 Sep 2003 06:25:33 -0000 1.76 --- msgstore.py 3 Nov 2003 09:29:43 -0000 1.76.2.1 *************** *** 169,173 **** self.mapi_msg_stores = {} self.default_store_bin_eid = None - self._GetMessageStore(None) os.chdir(cwd) --- 169,172 ---- From anthonybaxter at users.sourceforge.net Tue Nov 4 05:18:51 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Tue Nov 4 05:18:55 2003 Subject: [Spambayes-checkins] spambayes/spambayes __init__.py,1.7,1.7.2.1 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv1263 Modified Files: Tag: release_1_0 __init__.py Log Message: and away we go Index: __init__.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/__init__.py,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** __init__.py 19 Sep 2003 01:04:16 -0000 1.7 --- __init__.py 4 Nov 2003 10:18:48 -0000 1.7.2.1 *************** *** 1,3 **** # package marker. ! __version__ = '1.0a6' --- 1,3 ---- # package marker. ! __version__ = '1.0a7' From anthonybaxter at users.sourceforge.net Tue Nov 4 05:35:16 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Tue Nov 4 05:35:21 2003 Subject: [Spambayes-checkins] spambayes README.txt,1.53.2.3,1.53.2.4 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv4723 Modified Files: Tag: release_1_0 README.txt Log Message: spelling fixups, removing references to Hammie. Index: README.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/README.txt,v retrieving revision 1.53.2.3 retrieving revision 1.53.2.4 diff -C2 -d -r1.53.2.3 -r1.53.2.4 *** README.txt 3 Oct 2003 05:23:02 -0000 1.53.2.3 --- README.txt 4 Nov 2003 10:35:07 -0000 1.53.2.4 *************** *** 26,30 **** If you have any questions that this document does not answer, you should ! definately try the SpamBayes website , and in particular, try reading the list of frequently asked questions: --- 26,30 ---- If you have any questions that this document does not answer, you should ! definitely try the SpamBayes website , and in particular, try reading the list of frequently asked questions: *************** *** 36,40 **** You need to have Python 2.2 or later (2.3 is recommended). You can download Python from . ! Many distributions of unix now ship with Python - try typing 'python' at a shell prompt. --- 36,40 ---- You need to have Python 2.2 or later (2.3 is recommended). You can download Python from . ! Many distributions of UNIX now ship with Python - try typing 'python' at a shell prompt. *************** *** 122,126 **** All you need to do to configure SpamBayes is to open a web page to , click on the "Configuration" link at the top ! right, and fill in the relevant details. Everything should be ok with the defaults, except for the POP3 and SMTP server information at the top, which is required. Note that *nix users may not have permission to bind ports --- 122,126 ---- All you need to do to configure SpamBayes is to open a web page to , click on the "Configuration" link at the top ! right, and fill in the relevant details. Everything should be OK with the defaults, except for the POP3 and SMTP server information at the top, which is required. Note that *nix users may not have permission to bind ports *************** *** 145,149 **** To configure SpamBayes, run the "sb_imapfilter.py" script, and open a web page to , click on the "Configuration" link at the ! top right, and fill in the relevant details. Everything should be ok with the defaults, except for the server information at the top. --- 145,149 ---- To configure SpamBayes, run the "sb_imapfilter.py" script, and open a web page to , click on the "Configuration" link at the ! top right, and fill in the relevant details. Everything should be OK with the defaults, except for the server information at the top. *************** *** 185,189 **** (Replace the latter with the location of the .hammiedb file that ! hammiefilter created in the first step). Once you've trained SpamBayes on your --- 185,189 ---- (Replace the latter with the location of the .hammiedb file that ! sb_filter.py created in the first step). Once you've trained SpamBayes on your *************** *** 197,209 **** Since no command line arguments are given, it relies on the options file specified by the BAYESCUSTOMIZE variable for all parameters. While ! sb_filter.py is runnning, Procmail uses the lock file hamlock to prevent multiple invocations from stepping on each others' toes. (It's not strictly necessary in this case since no files on-disk are modified, but Procmail will still complain if you don't specify a lock file.) ! The result of running hammie.py in filter mode is that Procmail will use the ! output from the run as the mail message for further processing downstream. ! hammie.py inserts an X-SpamBayes-Classification header in the output message ! which looks like: X-SpamBayes-Classification: ham; 0.00; '*H*': 1.00; '*S*': 0.00; 'python': 0.00; --- 197,209 ---- Since no command line arguments are given, it relies on the options file specified by the BAYESCUSTOMIZE variable for all parameters. While ! sb_filter.py is running, Procmail uses the lock file hamlock to prevent multiple invocations from stepping on each others' toes. (It's not strictly necessary in this case since no files on-disk are modified, but Procmail will still complain if you don't specify a lock file.) ! The result of running sb_filter.py in filter mode is that Procmail will ! use the output from the run as the mail message for further processing ! downstream. sb_filter.py inserts an X-SpamBayes-Classification header in ! the output message which looks like: X-SpamBayes-Classification: ham; 0.00; '*H*': 1.00; '*S*': 0.00; 'python': 0.00; *************** *** 222,226 **** unsure ! The first recipe catches all messages which hammie.py classified as spam. The second catches all messages about which it was unsure. The combination allows you to isolate spam from your good mail and tuck away messages it was --- 222,226 ---- unsure ! The first recipe catches all messages which sb_filter.py classified as spam. The second catches all messages about which it was unsure. The combination allows you to isolate spam from your good mail and tuck away messages it was *************** *** 266,273 **** same number of spams as hams. ! You can train it on lots of messages in one go by either using the Hammie ! script as explained in the "Command-line training" section, or by giving ! messages to the web interface via the "Train" form on the Home page. You ! can train on individual messages (which is tedious) or using mbox files. --- 266,274 ---- same number of spams as hams. ! You can train it on lots of messages in one go by either using the ! sb_filter.py script as explained in the "Command-line training" section, ! or by giving messages to the web interface via the "Train" form on the ! Home page. You can train on individual messages (which is tedious) or ! using mbox files. *************** *** 291,295 **** sb_mboxtrain.py -g ~/tmp/newham -s ~/tmp/newspam ! The above command is command-line-centric (eg. unix, or Windows command prompt). You can also use the web interface for training as detailed above. --- 292,296 ---- sb_mboxtrain.py -g ~/tmp/newham -s ~/tmp/newspam ! The above command is command-line-centric (eg. UNIX, or Windows command prompt). You can also use the web interface for training as detailed above. *************** *** 311,318 **** below. By default it lives in a file called "hammie.db". ! o The tokeniser/classifier. This is the core engine of the system. The tokenizer splits emails into tokens (words, roughly speaking), and the classifier looks at those tokens to determine whether the message looks ! like spam or not. You don't use the tokeniser/classifier directly - it powers the other parts of the system. --- 312,319 ---- below. By default it lives in a file called "hammie.db". ! o The tokenizer/classifier. This is the core engine of the system. The tokenizer splits emails into tokens (words, roughly speaking), and the classifier looks at those tokens to determine whether the message looks ! like spam or not. You don't use the tokenizer/classifier directly - it powers the other parts of the system. *************** *** 328,332 **** +-----------------+ +-------------+ ! The POP3 server runs either at your ISP for internet mail, or somewhere on your internal network for corporate mail. The POP3 proxy sits in the middle and adds the classification header as you retrieve your email: --- 329,333 ---- +-----------------+ +-------------+ ! The POP3 server runs either at your ISP for Internet mail, or somewhere on your internal network for corporate mail. The POP3 proxy sits in the middle and adds the classification header as you retrieve your email: *************** *** 359,363 **** +-----------------+ +-------------+ ! The SMTP server runs either at your ISP for internet mail, or somewhere on your internal network for corporate mail. The SMTP proxy sits in the middle and checks for mail to train on as you send your email: --- 360,364 ---- +-----------------+ +-------------+ ! The SMTP server runs either at your ISP for Internet mail, or somewhere on your internal network for corporate mail. The SMTP proxy sits in the middle and checks for mail to train on as you send your email: *************** *** 384,388 **** contain the word Viagra"?), find particular messages, and most importantly, train it on the emails you've received. When you start ! using the system, unless you train it using the Hammie script it will classify most things as Unsure, and often make mistakes. But it keeps copies of all the email's its seen, and through the web interface you --- 385,389 ---- contain the word Viagra"?), find particular messages, and most importantly, train it on the emails you've received. When you start ! using the system, unless you train it using the sb_filter script it will classify most things as Unsure, and often make mistakes. But it keeps copies of all the email's its seen, and through the web interface you *************** *** 401,410 **** easy to file all the suspected spam into its own folder, for instance. ! o The Hammie script. This does three jobs: command-line training, procmail filtering, and XML-RPC. See below for details of how to use ! Hammie for training, and how to use it as procmail filter. Hammie can ! also run as an XML-RPC server, so that a programmer can write code that uses a remote server to classify emails programmatically - see ! hammiesrv.py. o The IMAP filter. This is a cross between the POP3 proxy and the Outlook --- 402,411 ---- easy to file all the suspected spam into its own folder, for instance. ! o The sb_filter.py script. This does three jobs: command-line training, procmail filtering, and XML-RPC. See below for details of how to use ! sb_filter for training, and how to use it as procmail filter. You can ! also run an XML-RPC server, so that a programmer can write code that uses a remote server to classify emails programmatically - see ! sb_xmlrpcserver.py. o The IMAP filter. This is a cross between the POP3 proxy and the Outlook From anthonybaxter at users.sourceforge.net Tue Nov 4 05:35:26 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Tue Nov 4 05:35:31 2003 Subject: [Spambayes-checkins] spambayes WHAT_IS_NEW.txt,1.19.2.1,1.19.2.2 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv4853 Modified Files: Tag: release_1_0 WHAT_IS_NEW.txt Log Message: spelling fixups. Index: WHAT_IS_NEW.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/WHAT_IS_NEW.txt,v retrieving revision 1.19.2.1 retrieving revision 1.19.2.2 diff -C2 -d -r1.19.2.1 -r1.19.2.2 *** WHAT_IS_NEW.txt 30 Oct 2003 04:25:36 -0000 1.19.2.1 --- WHAT_IS_NEW.txt 4 Nov 2003 10:35:23 -0000 1.19.2.2 *************** *** 67,71 **** for you (email spambayes@python.org). o We now try to determine the type of dbm storage used from the ! file, if one already exists. This should make the transistion between formats a little easier. o Fix sb_xmlrpcserver to work with the renamed (since 1.0a5) --- 67,71 ---- for you (email spambayes@python.org). o We now try to determine the type of dbm storage used from the ! file, if one already exists. This should make the transition between formats a little easier. o Fix sb_xmlrpcserver to work with the renamed (since 1.0a5) *************** *** 89,94 **** 809769, 814322, 816400, 810342, 818552 ! A url containing the details of these bugs can be made by appending the ! bug number to this url: http://sourceforge.net/tracker/index.php?func=detail&group_id=61702&atid=498103&aid= --- 89,94 ---- 809769, 814322, 816400, 810342, 818552 ! A URL containing the details of these bugs can be made by appending the ! bug number to this URL: http://sourceforge.net/tracker/index.php?func=detail&group_id=61702&atid=498103&aid= From anthonybaxter at users.sourceforge.net Tue Nov 4 05:39:08 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Tue Nov 4 05:39:12 2003 Subject: [Spambayes-checkins] spambayes README-DEVEL.txt,1.4.2.1,1.4.2.2 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv5389 Modified Files: Tag: release_1_0 README-DEVEL.txt Log Message: speling, note about out of date application names. Index: README-DEVEL.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/README-DEVEL.txt,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** README-DEVEL.txt 30 Oct 2003 00:07:28 -0000 1.4.2.1 --- README-DEVEL.txt 4 Nov 2003 10:39:06 -0000 1.4.2.2 *************** *** 25,29 **** The code in this project requires Python 2.2 (or later). ! You should definately check out the FAQ: http://spambayes.org/faq.html --- 25,29 ---- The code in this project requires Python 2.2 (or later). ! You should definitely check out the FAQ: http://spambayes.org/faq.html *************** *** 72,75 **** --- 72,81 ---- + IMPORTANT NOTE + ============== + + The applications have all been renamed in preparation for 1.0 - the + following section refers to old application names. + Apps ==== *************** *** 79,83 **** hammiefilter.py A simpler hammie front-end that doesn't print anything. Useful for ! procmail filering and scoring from your MUA. mboxtrain.py --- 85,89 ---- hammiefilter.py A simpler hammie front-end that doesn't print anything. Useful for ! procmail filtering and scoring from your MUA. mboxtrain.py *************** *** 92,96 **** pop3proxy.py ! A spam-classifying POP3 proxy. It adds a spam-judgement header to each mail as it's retrieved, so you can use your email client's filters to deal with them without needing to fiddle with your email --- 98,102 ---- pop3proxy.py ! A spam-classifying POP3 proxy. It adds a spam-judgment header to each mail as it's retrieved, so you can use your email client's filters to deal with them without needing to fiddle with your email *************** *** 237,245 **** runtest.sh ! A bourne shell script (for Unix) which will run some test or other. I (Neale) will try to keep this updated to test whatever Tim is currently asking for. The idea is, if you have a standard directory structure (below), you can run this thing, go have some tea while it ! works, then paste the output to the spambayes list for good karma. --- 243,251 ---- runtest.sh ! A Bourne shell script (for Unix) which will run some test or other. I (Neale) will try to keep this updated to test whatever Tim is currently asking for. The idea is, if you have a standard directory structure (below), you can run this thing, go have some tea while it ! works, then paste the output to the SpamBayes list for good karma. *************** *** 314,318 **** arguments to allow using only a random subset of messages in each Set. ! CAUTION: The parititioning of your corpora across directories should be random. If it isn't, bias creeps in to the test results. This is usually screamingly obvious under the NxN grid method (rates vary by a --- 320,324 ---- arguments to allow using only a random subset of messages in each Set. ! CAUTION: The partitioning of your corpora across directories should be random. If it isn't, bias creeps in to the test results. This is usually screamingly obvious under the NxN grid method (rates vary by a From anthonybaxter at users.sourceforge.net Tue Nov 4 05:39:31 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Tue Nov 4 05:39:33 2003 Subject: [Spambayes-checkins] spambayes/spambayes/test README.txt, 1.1, 1.1.2.1 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes/test In directory sc8-pr-cvs1:/tmp/cvs-serv5493/spambayes/test Modified Files: Tag: release_1_0 README.txt Log Message: speling. Index: README.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/test/README.txt,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** README.txt 25 Jul 2003 03:22:04 -0000 1.1 --- README.txt 4 Nov 2003 10:39:29 -0000 1.1.2.1 *************** *** 1,3 **** This is a directory for unit tests of spambayes itself. It is NOT to test the performance of the classification algorithms, ! but tests the semantics of the insfrastructure. --- 1,3 ---- This is a directory for unit tests of spambayes itself. It is NOT to test the performance of the classification algorithms, ! but tests the semantics of the infrastructure. From anthonybaxter at users.sourceforge.net Tue Nov 4 05:39:46 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Tue Nov 4 05:39:49 2003 Subject: [Spambayes-checkins] spambayes MANIFEST.in,1.7.2.1,1.7.2.2 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv5519 Modified Files: Tag: release_1_0 MANIFEST.in Log Message: new additions. Index: MANIFEST.in =================================================================== RCS file: /cvsroot/spambayes/spambayes/MANIFEST.in,v retrieving revision 1.7.2.1 retrieving revision 1.7.2.2 diff -C2 -d -r1.7.2.1 -r1.7.2.2 *** MANIFEST.in 21 Sep 2003 04:21:57 -0000 1.7.2.1 --- MANIFEST.in 4 Nov 2003 10:39:44 -0000 1.7.2.2 *************** *** 1,11 **** recursive-include spambayes/resources *.html *.psp *.gif ! recursive-include spambayes *.py recursive-include pspam *.py *.txt *.ini *.sh recursive-include contrib *.py *.sh *.txt *.el *rc ! recursive-include Outlook2000 *.py *.txt *.ini *.html *.bmp *.rc *.h recursive-include utilities *.py *.txt recursive-include scripts *.py *.txt ! recursive-include testtools *.py *.txt ! recursive-include windows *.py *.txt *.h *.rc *.ico ! include *.txt *.py --- 1,11 ---- recursive-include spambayes/resources *.html *.psp *.gif ! recursive-include spambayes *.py *.txt recursive-include pspam *.py *.txt *.ini *.sh recursive-include contrib *.py *.sh *.txt *.el *rc ! recursive-include Outlook2000 *.py *.txt *.ini *.html *.bmp *.rc *.h *.jpg *.rtf *.spec *.iss recursive-include utilities *.py *.txt recursive-include scripts *.py *.txt ! recursive-include testtools *.py *.txt *.sh ! recursive-include windows *.py *.txt *.h *.rc *.ico *.html *.iss ! include *.txt *.py MANIFEST.in *.sh From anthonybaxter at users.sourceforge.net Tue Nov 4 06:56:20 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Tue Nov 4 06:56:25 2003 Subject: [Spambayes-checkins] spambayes README-DEVEL.txt,1.4.2.2,1.4.2.3 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv16938 Modified Files: Tag: release_1_0 README-DEVEL.txt Log Message: sanity, lovely sanity Index: README-DEVEL.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/README-DEVEL.txt,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.3 diff -C2 -d -r1.4.2.2 -r1.4.2.3 *** README-DEVEL.txt 4 Nov 2003 10:39:06 -0000 1.4.2.2 --- README-DEVEL.txt 4 Nov 2003 11:56:18 -0000 1.4.2.3 *************** *** 339,342 **** --- 339,345 ---- 8-) + Anthony would rather eat live worms than trying to get a sane environment + on Windows, so his approach to building the zip file is at the end. + o If any new file types have been added since last time (eg. 1.0a5 went out without the Windows .rc and .h files) then add them to MANIFEST.in. *************** *** 370,371 **** --- 373,387 ---- Then announce the release on the mailing lists and watch the bug reports roll in. 8-) + + Anthony's Alternate Approach to Building the Zipfile + + o Unpack the tarball somewhere, making a spambayes-1.0a7 directory + (version number will obviously change in future releases) + o Run the following two commands: + + find spambayes-1.0a7 -type f -name '*.txt' | xargs zip -l sb107.zip + find spambayes-1.0a7 -type f \! -name '*.txt' | xargs zip sb107.zip + + o This makes a tarball where the .txt files are mangled, but everything + else is left alone. + From mhammond at users.sourceforge.net Tue Nov 4 17:16:46 2003 From: mhammond at users.sourceforge.net (Mark Hammond) Date: Tue Nov 4 17:16:51 2003 Subject: [Spambayes-checkins] spambayes/windows/py2exe README.txt, 1.1, 1.1.2.1 setup_all.py, 1.7, 1.7.2.1 Message-ID: Update of /cvsroot/spambayes/spambayes/windows/py2exe In directory sc8-pr-cvs1:/tmp/cvs-serv2964/py2exe Modified Files: Tag: release_1_0 README.txt setup_all.py Log Message: Merge the head to the 1.0 release branch for the 'windows' directory. This includes the service, tray and py2exe/installer. Index: README.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/py2exe/README.txt,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** README.txt 29 Aug 2003 14:46:18 -0000 1.1 --- README.txt 4 Nov 2003 22:16:44 -0000 1.1.2.1 *************** *** 6,10 **** Run "setup_all.py" ! You should find a dist directly. pop3proxy*.exe should all work. ! addin.exe/addin.dll are the Outlook addin and do not work ! (and will be renamed) \ No newline at end of file --- 6,8 ---- Run "setup_all.py" ! You should find a dist directory. \ No newline at end of file Index: setup_all.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/py2exe/setup_all.py,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** setup_all.py 19 Sep 2003 05:42:04 -0000 1.7 --- setup_all.py 4 Nov 2003 22:16:44 -0000 1.7.2.1 *************** *** 29,43 **** import py2exe ! class Options: ! def __init__(self, **kw): ! self.__dict__.update(kw) ! ! # py2exe_options is a global name found by py2exe ! py2exe_options = Options( packages = "spambayes.resources,encodings", excludes = "win32ui,pywin,pywin.debugger", # pywin is a package, and still seems to be included. includes = "dialogs.resources.dialogs", # Outlook dynamic dialogs ! dll_excludes = ["dapi.dll", "mapi32.dll"], ! lib_dir = "lib", typelibs = [ ('{00062FFF-0000-0000-C000-000000000046}', 0, 9, 0), --- 29,37 ---- import py2exe ! py2exe_options = dict( packages = "spambayes.resources,encodings", excludes = "win32ui,pywin,pywin.debugger", # pywin is a package, and still seems to be included. includes = "dialogs.resources.dialogs", # Outlook dynamic dialogs ! dll_excludes = "dapi.dll,mapi32.dll", typelibs = [ ('{00062FFF-0000-0000-C000-000000000046}', 0, 9, 0), *************** *** 59,65 **** # These are just objects passed to py2exe ! outlook_addin = Options( modules = ["addin"], ! dest_base = "outlook/spambayes_addin", bitmap_resources = outlook_bmp_resources, create_exe = False, --- 53,59 ---- # These are just objects passed to py2exe ! outlook_addin = dict( modules = ["addin"], ! dest_base = "bin/outlook_addin", bitmap_resources = outlook_bmp_resources, create_exe = False, *************** *** 69,87 **** # bitmap_resources = outlook_bmp_resources, #) ! outlook_dump_props = Options( script = os.path.join(sb_top_dir, r"Outlook2000\sandbox\dump_props.py"), ! dest_base = "outlook/outlook_dump_props", ) ! service = Options( ! dest_base = "proxy/pop3proxy_service", modules = ["pop3proxy_service"] ) ! sb_server = Options( ! dest_base = "proxy/sb_server", script = os.path.join(sb_top_dir, "scripts", "sb_server.py") ) ! pop3proxy_tray = Options( ! dest_base = "proxy/pop3proxy_tray", script = os.path.join(sb_top_dir, "windows", "pop3proxy_tray.py"), icon_resources = [(1000, os.path.join(sb_top_dir, r"windows\resources\sb-started.ico")), --- 63,85 ---- # bitmap_resources = outlook_bmp_resources, #) ! outlook_dump_props = dict( script = os.path.join(sb_top_dir, r"Outlook2000\sandbox\dump_props.py"), ! dest_base = "bin/outlook_dump_props", ) ! service = dict( ! dest_base = "bin/sb_service", modules = ["pop3proxy_service"] ) ! sb_server = dict( ! dest_base = "bin/sb_server", script = os.path.join(sb_top_dir, "scripts", "sb_server.py") ) ! sb_upload = dict( ! dest_base = "bin/sb_upload", ! script = os.path.join(sb_top_dir, "scripts", "sb_upload.py") ! ) ! pop3proxy_tray = dict( ! dest_base = "bin/sb_tray", script = os.path.join(sb_top_dir, "windows", "pop3proxy_tray.py"), icon_resources = [(1000, os.path.join(sb_top_dir, r"windows\resources\sb-started.ico")), *************** *** 90,100 **** outlook_data_files = [ ! ["outlook", [os.path.join(sb_top_dir, r"Outlook2000\about.html")]], ! ["outlook/docs", glob.glob(os.path.join(sb_top_dir, r"Outlook2000\docs\*.html"))], ! ["outlook/docs/images", glob.glob(os.path.join(sb_top_dir, r"Outlook2000\docs\images\*.jpg"))], ! ["outlook", [os.path.join(sb_top_dir, r"Outlook2000\default_bayes_customize.ini")]], ] proxy_data_files = [ ! ["proxy", [os.path.join(sb_top_dir, r"windows\readme_proxy.html")]], ] --- 88,98 ---- outlook_data_files = [ ! ["docs/outlook", [os.path.join(sb_top_dir, r"Outlook2000\about.html")]], ! ["docs/outlook/docs", glob.glob(os.path.join(sb_top_dir, r"Outlook2000\docs\*.html"))], ! ["docs/outlook/docs/images", glob.glob(os.path.join(sb_top_dir, r"Outlook2000\docs\images\*.jpg"))], ! ["docs/outlook", [os.path.join(sb_top_dir, r"Outlook2000\default_bayes_customize.ini")]], ] proxy_data_files = [ ! ["docs/sb_server", [os.path.join(sb_top_dir, r"windows\readme_proxy.html")]], ] *************** *** 111,118 **** service=[service], # console exes for debugging ! console=[sb_server, outlook_dump_props], # The taskbar windows=[pop3proxy_tray], # and the misc data files data_files = outlook_data_files + proxy_data_files, ) --- 109,118 ---- service=[service], # console exes for debugging ! console=[sb_server, sb_upload, outlook_dump_props], # The taskbar windows=[pop3proxy_tray], # and the misc data files data_files = outlook_data_files + proxy_data_files, + options = {"py2exe" : py2exe_options}, + zipfile = "lib/spambayes.zip", ) From mhammond at users.sourceforge.net Tue Nov 4 17:16:46 2003 From: mhammond at users.sourceforge.net (Mark Hammond) Date: Tue Nov 4 17:16:53 2003 Subject: [Spambayes-checkins] spambayes/windows autoconfigure.py, 1.5, 1.5.2.1 pop3proxy_service.py, 1.14, 1.14.2.1 pop3proxy_tray.py, 1.12, 1.12.2.1 spambayes.iss, 1.1, 1.1.2.1 Message-ID: Update of /cvsroot/spambayes/spambayes/windows In directory sc8-pr-cvs1:/tmp/cvs-serv2964 Modified Files: Tag: release_1_0 autoconfigure.py pop3proxy_service.py pop3proxy_tray.py spambayes.iss Log Message: Merge the head to the 1.0 release branch for the 'windows' directory. This includes the service, tray and py2exe/installer. Index: autoconfigure.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/autoconfigure.py,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** autoconfigure.py 9 Sep 2003 08:55:51 -0000 1.5 --- autoconfigure.py 4 Nov 2003 22:16:44 -0000 1.5.2.1 *************** *** 3,10 **** """Automatically set up the user's mail client and SpamBayes. Currently works with: o Eudora (POP3/SMTP only) o Mozilla Mail (POP3/SMTP only) ! o Opera Mail (M2) (POP3/SMTP only) o Outlook Express (POP3/SMTP only) o PocoMail (POP3/SMTP only) --- 3,14 ---- """Automatically set up the user's mail client and SpamBayes. + Example usage: + >>> configure("mailer name") + Where "mailer name" is any of the names below. + Currently works with: o Eudora (POP3/SMTP only) o Mozilla Mail (POP3/SMTP only) ! o M2 (Opera Mail) (POP3/SMTP only) o Outlook Express (POP3/SMTP only) o PocoMail (POP3/SMTP only) *************** *** 21,26 **** only one is necessary. We should check the existing proxies before adding a new one. - o Figure out Outlook Express's pop3uidl.dbx file and how to hook into it - (use the oe_mailbox.py module) o Other mail clients? Other platforms? o This won't work all that well if multiple mail clients are used (they --- 25,28 ---- *************** *** 31,35 **** something does wrong, it's corrupted. We also write into the file, rather than a temporary one and then copy across. This should all be ! fixed. o Suggestions? """ --- 33,42 ---- something does wrong, it's corrupted. We also write into the file, rather than a temporary one and then copy across. This should all be ! fixed. Richie's suggestion is for the script to create a clone of an ! existing account with the new settings. Then people could test the ! cloned account, and if they're happy with it they can either delete ! their old account or delete the new one and run the script again in ! "modify" rather than "clone" mode. This sounds like a good idea, ! although a lot of work... o Suggestions? """ *************** *** 63,67 **** import ConfigParser ! # Allow for those without SpamBayes on the PYTHONPATH sys.path.insert(-1, os.getcwd()) sys.path.insert(-1, os.path.dirname(os.getcwd())) --- 70,74 ---- import ConfigParser ! # Allow for those without SpamBayes on their PYTHONPATH sys.path.insert(-1, os.getcwd()) sys.path.insert(-1, os.path.dirname(os.getcwd())) *************** *** 114,118 **** if c.get(sect, "UsesIMAP") == "0": # Eudora stores the POP3 server name in two places. ! # Why? Who knows? We do the popaccount one # separately, because it also has the username. p = c.get(sect, "popaccount") --- 121,125 ---- if c.get(sect, "UsesIMAP") == "0": # Eudora stores the POP3 server name in two places. ! # Why? Who cares. We do the popaccount one # separately, because it also has the username. p = c.get(sect, "popaccount") *************** *** 158,162 **** # another day, however. filter_filename = "%s%sFilters.pce" % (config_location, os.sep) ! spam_folder_name = "Junk Mail" unsure_folder_name = "Possible Junk" header_name = options["Headers", "classification_header_name"] --- 165,169 ---- # another day, however. filter_filename = "%s%sFilters.pce" % (config_location, os.sep) ! spam_folder_name = "Junk" unsure_folder_name = "Possible Junk" header_name = options["Headers", "classification_header_name"] *************** *** 413,417 **** # here. ! def configure_outlook_express(): """Configure OE to use the SpamBayes POP3 and SMTP proxies, and configure SpamBayes to proxy the servers that OE was connecting to.""" --- 420,424 ---- # here. ! def configure_outlook_express(unused): """Configure OE to use the SpamBayes POP3 and SMTP proxies, and configure SpamBayes to proxy the servers that OE was connecting to.""" *************** *** 546,550 **** rules_file.close() ! def configure_pocomail(): import win32api import win32con --- 553,557 ---- rules_file.close() ! def configure_pocomail(unused): import win32api import win32con *************** *** 657,660 **** --- 664,714 ---- + def find_config_location(mailer): + """Attempt to find the location of the config file for + the given mailer, to pass to the configure_* scripts + above.""" + import win32api + from win32com.shell import shell, shellcon + if mailer in ["Outlook Express", "PocoMail"]: + # Outlook Express and PocoMail can be configured without a + # config location, because it's all in the registry + return "" + windowsUserDirectory = shell.SHGetFolderPath(0,shellcon.CSIDL_APPDATA,0,0) + potential_locations = {"Eudora" : ("Qualcomm%(sep)sEudora",), + "Mozilla" : ("Mozilla%(sep)sProfiles%(sep)s%(user)s", + "Mozilla%(sep)sProfiles%(sep)sdefault",), + "M2" : ("Opera%(sep)sOpera7",), + } + # We try with the username that the user uses [that's a lot of 'use'!] + # for Windows, even though that might not be the same as their profile + # names for mailers. We can get smarter later. + username = win32api.GetUserName() + loc_dict = {"sep" : os.sep, + "user" : username} + for loc in potential_locations[mailer]: + loc = loc % loc_dict + loc = os.path.join(windowsUserDirectory, loc) + if os.path.exists(loc): + return loc + return None + + + def configure(mailer): + """Automatically configure the specified mailer and SpamBayes. + Return True if successful, False otherwise. + """ + loc = find_config_location(mailer) + if loc is None: + return False + funcs = {"Eudora" : configure_eudora, + "Mozilla" : configure_mozilla, + "M2" : configure_m2, + "Outlook Express" : configure_outlook_express, + "PocoMail" : configure_pocomail, + } + funcs[mailer](loc) + return True + + if __name__ == "__main__": pmail_ini_dir = "C:\\Program Files\\PMAIL\\MAIL\\ADMIN" *************** *** 665,667 **** #configure_pocomail() #configure_pegasus_mail(pmail_ini_dir) ! pass --- 719,722 ---- #configure_pocomail() #configure_pegasus_mail(pmail_ini_dir) ! for mailer in ["Eudora", "Mozilla", "M2", "Outlook Express", "PocoMail"]: ! print find_config_location(mailer) Index: pop3proxy_service.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/pop3proxy_service.py,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -C2 -d -r1.14 -r1.14.2.1 *** pop3proxy_service.py 18 Sep 2003 04:15:24 -0000 1.14 --- pop3proxy_service.py 4 Nov 2003 22:16:44 -0000 1.14.2.1 *************** *** 105,110 **** def SvcDoRun(self): # Setup our state etc ! sb_server.prepare(state=sb_server.state) assert not sb_server.state.launchUI, "Service can't launch a UI" --- 105,120 ---- def SvcDoRun(self): + import servicemanager # Setup our state etc ! try: ! sb_server.prepare(state=sb_server.state) ! except sb_server.AlreadyRunningException: ! msg = "The SpamBayes proxy service could not be started, as "\ ! "another SpamBayes server is already running on this machine" ! servicemanager.LogErrorMsg(msg) ! errCode = winerror.ERROR_SERVICE_SPECIFIC_ERROR ! self.ReportServiceStatus(win32service.SERVICE_STOPPED, ! win32ExitCode=errCode, svcExitCode = 1) ! return assert not sb_server.state.launchUI, "Service can't launch a UI" *************** *** 119,123 **** % (win32api.GetUserName(), optionsPathname) - import servicemanager servicemanager.LogMsg( servicemanager.EVENTLOG_INFORMATION_TYPE, --- 129,132 ---- Index: pop3proxy_tray.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/pop3proxy_tray.py,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** pop3proxy_tray.py 19 Sep 2003 22:48:29 -0000 1.12 --- pop3proxy_tray.py 4 Nov 2003 22:16:44 -0000 1.12.2.1 *************** *** 27,30 **** --- 27,31 ---- import traceback + verbose = 0 # This should just be imported from dialogs.dlgutils, but # I'm not sure that we can import from the Outlook2000 *************** *** 40,43 **** --- 41,45 ---- import win32con + import winerror from win32api import * from win32gui import * *************** *** 107,110 **** --- 109,127 ---- serviceName = "pop3proxy" + def IsServerRunningAnywhere(): + import win32event + mutex_name = "SpamBayesServer" + try: + hmutex = win32event.CreateMutex(None, True, mutex_name) + try: + return GetLastError()==winerror.ERROR_ALREADY_EXISTS + finally: + hmutex.Close() + except win32event.error, details: + if details[0] != winerror.ERROR_ACCESS_DENIED: + raise + # Mutex created by some other user - it does exist! + return True + class MainWindow(object): def __init__(self): *************** *** 113,117 **** # that the order is controlled by the id. Any items where the # function is None will appear as separators. ! self.control_functions = {START_STOP_ID : ("Stop SpamBayes", self.StartStop), 1025 : ("-", None), 1026 : ("Review messages ...", self.OpenReview), --- 130,134 ---- # that the order is controlled by the id. Any items where the # function is None will appear as separators. ! self.control_functions = {START_STOP_ID : ("Stop SpamBayes", self.Stop), 1025 : ("-", None), 1026 : ("Review messages ...", self.OpenReview), *************** *** 127,132 **** WM_TASKBAR_NOTIFY : self.OnTaskbarNotify, } ! self.use_service = True ! #self.use_service = False # Create the Window. --- 144,152 ---- WM_TASKBAR_NOTIFY : self.OnTaskbarNotify, } ! self.have_prepared_state = False ! self.last_started_state = None ! # Only bothering to try the service on Windows NT platforms ! self.use_service = \ ! GetVersionEx()[3]==win32con.VER_PLATFORM_WIN32_NT # Create the Window. *************** *** 170,197 **** "SpamBayes") Shell_NotifyIcon(NIM_ADD, nid) ! self.started = False self.tip = None ! ! try: ! if self.use_service and self.IsServiceAvailable(): ! if self.GetServiceStatus() in runningStatus: ! self.started = True ! else: ! print "Service not availible. Using thread." ! self.use_service = False ! self.started = False ! except: ! print "Usage of service failed. Reverting to thread." self.use_service = False ! self.started = False ! # Start up sb_server - # XXX This needs to be finished off. - # XXX This should determine if we are using the service, and if so - # XXX start that, and if not kick sb_server off in a separate thread. - if not self.use_service: - sb_server.prepare(state=sb_server.state) if not self.started: ! self.StartStop() def BuildToolTip(self): --- 190,205 ---- "SpamBayes") Shell_NotifyIcon(NIM_ADD, nid) ! self.started = IsServerRunningAnywhere() self.tip = None ! if self.use_service and not self.IsServiceAvailable(): ! print "Service not availible. Using thread." self.use_service = False ! # Start up sb_server if not self.started: ! self.Start() ! else: ! print "The server is already running externally - not starting " \ ! "a local server" def BuildToolTip(self): *************** *** 211,215 **** def UpdateIcon(self): ! flags = NIF_TIP | NIF_ICON if self.started: hicon = self.hstartedicon --- 219,223 ---- def UpdateIcon(self): ! flags = NIF_TIP | NIF_ICON if self.started: hicon = self.hstartedicon *************** *** 218,230 **** self.tip = self.BuildToolTip() nid = (self.hwnd, 0, flags, WM_TASKBAR_NOTIFY, hicon, self.tip) Shell_NotifyIcon(NIM_MODIFY, nid) def IsServiceAvailable(self): ! schSCManager = OpenSCManager(None, None, SC_MANAGER_CONNECT) ! schService = OpenService(schSCManager, serviceName, ! SERVICE_QUERY_STATUS) ! if schService: ! CloseServiceHandle(schService) ! return schService != None def GetServiceStatus(self): --- 226,250 ---- self.tip = self.BuildToolTip() nid = (self.hwnd, 0, flags, WM_TASKBAR_NOTIFY, hicon, self.tip) + if self.started: + self.control_functions[START_STOP_ID] = ("Stop SpamBayes", + self.Stop) + else: + self.control_functions[START_STOP_ID] = ("Start SpamBayes", + self.Start) Shell_NotifyIcon(NIM_MODIFY, nid) def IsServiceAvailable(self): ! try: ! schSCManager = OpenSCManager(None, None, SC_MANAGER_CONNECT) ! schService = OpenService(schSCManager, serviceName, ! SERVICE_QUERY_STATUS) ! if schService: ! CloseServiceHandle(schService) ! return schService != None ! except win32api_error, details: ! if details[0] != winerror.ERROR_SERVICE_DOES_NOT_EXIST: ! print "Unexpected windows error querying for service" ! print details ! return False def GetServiceStatus(self): *************** *** 322,325 **** --- 342,347 ---- if self.tip != self.BuildToolTip(): self.UpdateIcon() + else: + self.CheckCurrentState() if lparam==win32con.WM_LBUTTONUP: # We ignore left clicks *************** *** 332,335 **** --- 354,360 ---- self.OpenInterface() elif lparam==win32con.WM_RBUTTONUP: + # check our state before creating the menu, so it reflects the + # true "running state", not just what we thought it was last. + self.CheckCurrentState() menu = CreatePopupMenu() ids = self.control_functions.keys() *************** *** 370,403 **** PostQuitMessage(0) ! def StartProxyThread(self): ! args = (sb_server.state,) ! thread.start_new_thread(sb_server.start, args) self.started = True ! def StartStop(self): ! # XXX This needs to be finished off. ! # XXX This should determine if we are using the service, and if so ! # XXX start/stop that, and if not kick sb_server off in a separate ! # XXX thread, or stop the thread that was started. if self.use_service: if self.GetServiceStatus() in stoppedStatus: self.StartService() else: ! self.StopService() else: ! if self.started: sb_server.stop(sb_server.state) ! self.started = False ! else: ! self.StartProxyThread() ! self.UpdateIcon() ! if self.started: ! self.control_functions[START_STOP_ID] = ("Stop SpamBayes", ! self.StartStop) ! else: ! self.control_functions[START_STOP_ID] = ("Start SpamBayes", ! self.StartStop) ! def OpenInterface(self): --- 395,479 ---- PostQuitMessage(0) ! def _ProxyThread(self): self.started = True + try: + sb_server.start(sb_server.state) + finally: + self.started = False + self.have_prepared_state = False ! def StartProxyThread(self): ! thread.start_new_thread(self._ProxyThread, ()) ! ! def Start(self): ! self.CheckCurrentState() ! if self.started: ! print "Ignoring start request - server already running" ! return if self.use_service: + if verbose: print "Doing 'Start' via service" if self.GetServiceStatus() in stoppedStatus: self.StartService() else: ! print "Service was already running - ignoring!" else: ! # Running it internally. ! if verbose: print "Doing 'Start' internally" ! if not self.have_prepared_state: ! try: ! sb_server.prepare(state=sb_server.state) ! self.have_prepared_state = True ! except sb_server.AlreadyRunningException: ! msg = "The proxy is already running on this " \ ! "machine - please\r\n stop the existing " \ ! "proxy, and try again." ! self.ShowMessage(msg) ! return ! self.StartProxyThread() ! self.started = True ! self.UpdateUIState() ! ! def Stop(self): ! self.CheckCurrentState() ! if not self.started: ! print "Ignoring stop request - server doesn't appear to be running" ! return ! try: ! use_service = self.use_service ! if use_service: ! # XXX - watch out - if service status is "stopping", trying ! # to start is likely to fail until it actually gets to ! # "stopped" ! if verbose: print "Doing 'Stop' via service" ! if self.GetServiceStatus() not in stoppedStatus: ! self.StopService() ! else: ! print "Service was already stopped - weird - falling " \ ! "back to a socket based quit" ! use_service = False ! if not use_service: ! if verbose: print "Stopping local server" sb_server.stop(sb_server.state) ! except: ! print "There was an error stopping the server" ! traceback.print_exc() ! # but either way, assume it stopped for the sake of our UI ! self.started = False ! self.UpdateUIState() + def CheckCurrentState(self): + self.started = IsServerRunningAnywhere() + self.UpdateUIState() + + def UpdateUIState(self): + if self.started != self.last_started_state: + self.UpdateIcon() + if self.started: + self.control_functions[START_STOP_ID] = ("Stop SpamBayes", + self.Stop) + else: + self.control_functions[START_STOP_ID] = ("Start SpamBayes", + self.Start) + self.last_started_state = self.started def OpenInterface(self): Index: spambayes.iss =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/spambayes.iss,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** spambayes.iss 19 Sep 2003 05:42:03 -0000 1.1 --- spambayes.iss 4 Nov 2003 22:16:44 -0000 1.1.2.1 *************** *** 4,12 **** [Setup] ! AppName=Spambayes ! AppVerName=Spambayes 1.0a6 ! AppVersion=1.0a6 ! DefaultDirName={pf}\Spambayes ! DefaultGroupName=Spambayes OutputDir=. OutputBaseFilename=SpamBayes-Setup --- 4,12 ---- [Setup] ! AppName=SpamBayes ! AppVerName=SpamBayes 1.1a1 ! AppVersion=1.1a1 ! DefaultDirName={pf}\SpamBayes ! DefaultGroupName=SpamBayes OutputDir=. OutputBaseFilename=SpamBayes-Setup *************** *** 18,28 **** [Files] Source: "py2exe\dist\lib\*.*"; DestDir: "{app}\lib"; Flags: ignoreversion ! Source: "py2exe\dist\outlook\spambayes_addin.dll"; DestDir: "{app}\outlook"; Check: InstallingOutlook; Flags: ignoreversion regserver ! Source: "py2exe\dist\outlook\docs\welcome.html"; DestDir: "{app}\outlook\docs"; Check: InstallingOutlook; Flags: isreadme ! Source: "py2exe\dist\outlook\*.*"; DestDir: "{app}\outlook"; Check: InstallingOutlook; Flags: ignoreversion recursesubdirs ! Source: "py2exe\dist\proxy\*.*"; DestDir: "{app}\proxy"; Check: InstallingProxy; Flags: ignoreversion recursesubdirs ! Source: "py2exe\dist\proxy\readme_proxy.html"; DestDir: "{app}\proxy"; Check: InstallingProxy; Flags: isreadme [Tasks] --- 18,33 ---- [Files] Source: "py2exe\dist\lib\*.*"; DestDir: "{app}\lib"; Flags: ignoreversion + Source: "py2exe\dist\bin\python23.dll"; DestDir: "{app}\bin"; Flags: ignoreversion + Source: "py2exe\dist\bin\pythoncom23.dll"; DestDir: "{app}\bin"; Flags: ignoreversion + Source: "py2exe\dist\bin\PyWinTypes23.dll"; DestDir: "{app}\bin"; Flags: ignoreversion ! Source: "py2exe\dist\bin\outlook_addin.dll"; DestDir: "{app}\bin"; Check: InstallingOutlook; Flags: ignoreversion regserver ! Source: "py2exe\dist\bin\outlook_dump_props.exe"; DestDir: "{app}\bin"; Check: InstallingOutlook; Flags: ignoreversion ! Source: "py2exe\dist\docs\outlook\*.*"; DestDir: "{app}\docs\outlook"; Check: InstallingOutlook; Flags: ignoreversion recursesubdirs ! Source: "py2exe\dist\bin\sb_server.exe"; DestDir: "{app}\bin"; Check: InstallingProxy; Flags: ignoreversion ! Source: "py2exe\dist\bin\sb_tray.exe"; DestDir: "{app}\bin"; Check: InstallingProxy; Flags: ignoreversion ! Source: "py2exe\dist\bin\sb_upload.exe"; DestDir: "{app}\bin"; Check: InstallingProxy; Flags: ignoreversion ! Source: "py2exe\dist\docs\sb_server\readme_proxy.html"; DestDir: "{app}\docs\sb_server"; Check: InstallingProxy; Flags: isreadme [Tasks] *************** *** 31,44 **** [Run] ! FileName:"{app}\proxy\pop3proxy_tray.exe"; Description: "Start the server now"; Flags: postinstall skipifdoesntexist nowait [Icons] ! Name: "{group}\SpamBayes Tray Icon"; Filename: "{app}\proxy\pop3proxy_tray.exe"; Check: InstallingProxy ! Name: "{userdesktop}\SpamBayes Tray Icon"; Filename: "{app}\proxy\pop3proxy_tray.exe"; Check: InstallingProxy; Tasks: desktop ! Name: "{userstartup}\SpamBayes Tray Icon"; Filename: "{app}\proxy\pop3proxy_tray.exe"; Check: InstallingProxy; Tasks: startup ! Name: "{group}\About SpamBayes"; Filename: "{app}\proxy\readme_proxy.html"; Check: InstallingProxy; ! Name: "{group}\SpamBayes Outlook Addin\About SpamBayes"; Filename: "{app}\outlook\about.html"; Check: InstallingOutlook ! Name: "{group}\SpamBayes Outlook Addin\Troubleshooting Guide"; Filename: "{app}\outlook\docs\troubleshooting.html"; Check: InstallingOutlook [UninstallDelete] --- 36,49 ---- [Run] ! FileName:"{app}\bin\sb_tray.exe"; Description: "Start the server now"; Flags: postinstall skipifdoesntexist nowait [Icons] ! Name: "{group}\SpamBayes Tray Icon"; Filename: "{app}\bin\sb_tray.exe"; Check: InstallingProxy ! Name: "{userdesktop}\SpamBayes Tray Icon"; Filename: "{app}\bin\sb_tray.exe"; Check: InstallingProxy; Tasks: desktop ! Name: "{userstartup}\SpamBayes Tray Icon"; Filename: "{app}\bin\sb_tray.exe"; Check: InstallingProxy; Tasks: startup ! Name: "{group}\About SpamBayes"; Filename: "{app}\docs\sb_server\readme_proxy.html"; Check: InstallingProxy; ! Name: "{group}\SpamBayes Outlook Addin\About SpamBayes"; Filename: "{app}\docs\outlook\about.html"; Check: InstallingOutlook ! Name: "{group}\SpamBayes Outlook Addin\Troubleshooting Guide"; Filename: "{app}\docs\outlook\docs\troubleshooting.html"; Check: InstallingOutlook [UninstallDelete] From anthonybaxter at users.sourceforge.net Wed Nov 5 07:05:22 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 07:05:25 2003 Subject: [Spambayes-checkins] website Makefile,1.16,1.17 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1:/tmp/cvs-serv29071 Modified Files: Makefile Log Message: MarkH needs to run ssh shell1.sf.net "chmod -R g+w /home/groups/s/sp/spambayes/htdocs/apps" Until then, make it so I can at least check in the main pages. Index: Makefile =================================================================== RCS file: /cvsroot/spambayes/website/Makefile,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Makefile 28 Oct 2003 04:54:04 -0000 1.16 --- Makefile 5 Nov 2003 12:05:19 -0000 1.17 *************** *** 37,42 **** # 'make install' to recurse *with* 'install' local_install: ! cd apps; $(MAKE) install ! cd download ; $(MAKE) install subdirs: --- 37,42 ---- # 'make install' to recurse *with* 'install' local_install: ! -cd apps; $(MAKE) install ! -cd download ; $(MAKE) install subdirs: From anthonybaxter at users.sourceforge.net Wed Nov 5 07:11:06 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 07:11:09 2003 Subject: [Spambayes-checkins] website applications.ht, 1.23, 1.24 download.ht, 1.19, 1.20 faq.txt, 1.50, 1.51 index.ht, 1.27, 1.28 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1:/tmp/cvs-serv29875 Modified Files: applications.ht download.ht faq.txt index.ht Log Message: updates for 1.0a7. Index: applications.ht =================================================================== RCS file: /cvsroot/spambayes/website/applications.ht,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** applications.ht 19 Sep 2003 23:12:52 -0000 1.23 --- applications.ht 5 Nov 2003 12:11:03 -0000 1.24 *************** *** 29,33 ****

Mark has packaged together an installer for the plugin. Go to the Windows page for more.

!

Download the alpha6 release.

Alternatively, you can use CVS to get the code - go to the CVS page on the project's sourceforge site for more.

--- 29,33 ----

Mark has packaged together an installer for the plugin. Go to the Windows page for more.

!

Download the alpha7 release.

Alternatively, you can use CVS to get the code - go to the CVS page on the project's sourceforge site for more.

*************** *** 44,48 ****

Availability

!

Download the alpha6 release.

Alternatively, use CVS to get the code - go to the CVS page on the project's sourceforge site for more.

--- 44,48 ----

Availability

!

Download the alpha7 release.

Alternatively, use CVS to get the code - go to the CVS page on the project's sourceforge site for more.

*************** *** 59,63 ****

Availability

!

Download the alpha6 release.

Alternatively, use CVS to get the code - go to the CVS page on the project's sourceforge site for more.

--- 59,63 ----

Availability

!

Download the alpha7 release.

Alternatively, use CVS to get the code - go to the CVS page on the project's sourceforge site for more.

*************** *** 74,78 ****

Availability

!

Download the alpha6 release.

Alternatively, use CVS to get the code - go to the CVS page on the project's sourceforge site for more.

--- 74,78 ----

Availability

!

Download the alpha7 release.

Alternatively, use CVS to get the code - go to the CVS page on the project's sourceforge site for more.

*************** *** 90,94 ****

Availability

!

Download the alpha6 release.

Alternatively, use CVS to get the code - go to the CVS page on the project's sourceforge site for more.

--- 90,94 ----

Availability

!

Download the alpha7 release.

Alternatively, use CVS to get the code - go to the CVS page on the project's sourceforge site for more.

*************** *** 108,111 ****

Availability

!

Download the alpha6 release.

Alternatively, use CVS to get the code - go to the CVS page on the project's sourceforge site for more.

--- 108,111 ----

Availability

!

Download the alpha7 release.

Alternatively, use CVS to get the code - go to the CVS page on the project's sourceforge site for more.

Index: download.ht =================================================================== RCS file: /cvsroot/spambayes/website/download.ht,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** download.ht 19 Sep 2003 23:12:52 -0000 1.19 --- download.ht 5 Nov 2003 12:11:04 -0000 1.20 *************** *** 4,13 ****

Source Releases

!

The sixth (and final alpha) pre-release of version 1.0 of the SpamBayes project is available. ! Download version 1.0a6 from the sourceforge Files page as either a gzipped tarball or a zip file of the source files.

!

The primary goal of this pre-release is to shake out any packaging, installation, or integration issues that might be lurking. ! In particular, the script names were changed for this release, and the options code was cleaned up a lot. Version 1.0 is now in 'feature freeze', so, while we will continue to resolve any bugs, no new features will be added. This means that a beta, and then final, release for version 1.0 is not too far off. New features will be added to the 1.1a1 release. --- 4,13 ----

Source Releases

!

The seventh alpha pre-release of version 1.0 of the SpamBayes project is available. ! Download version 1.0a7 from the sourceforge Files page as either a gzipped tarball or a zip file of the source files.

!

This release is primarily to shake out a few bugs on the way to a 1.0 ! release. Version 1.0 is now in 'feature freeze', so, while we will continue to resolve any bugs, no new features will be added. This means that a beta, and then final, release for version 1.0 is not too far off. New features will be added to the 1.1a1 release. Index: faq.txt =================================================================== RCS file: /cvsroot/spambayes/website/faq.txt,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** faq.txt 16 Oct 2003 21:21:00 -0000 1.50 --- faq.txt 5 Nov 2003 12:11:04 -0000 1.51 *************** *** 1083,1091 **** This is a mistake in either the readme or setup.py in the 1.0a6 release. ! It's fixed for the next release, so that pop3proxy_service.py and pop3proxy_tray.py will also be installed to the Python scripts directory (if you are running Windows). - For the moment, you just have to copy those files manually, or just not - delete them, and run them from the expanded archive location. --- 1083,1089 ---- This is a mistake in either the readme or setup.py in the 1.0a6 release. ! It's fixed in the 1.0a7 release, so that pop3proxy_service.py and pop3proxy_tray.py will also be installed to the Python scripts directory (if you are running Windows). *************** *** 1093,1101 **** --------------------------------------------- ! There is a known problem with the 1.0a6 release, which is fixed in CVS, ! and so fixed for the next release. Basically you can't use the database ! after making any changes via the web interface configuration pages. To work around this, either restart SpamBayes after using the configuration ! pages, or use 1.0a5 until the next release comes out. The '500' error you receive will end with "Object does not support item --- 1091,1101 ---- --------------------------------------------- ! There is a known problem with the 1.0a6 release, which is fixed in 1.0a7. ! Download the newer release from the download page. ! ! To workaround the problem if you're stuck on 1.0a6: you can't use the ! database after making any changes via the web interface configuration pages. To work around this, either restart SpamBayes after using the configuration ! pages, or upgrade to 1.0a7. The '500' error you receive will end with "Object does not support item *************** *** 1123,1127 **** - that is, very specialized tokenizer behavior usually produces worse results than a more general approach that just generates tokens and throws ! them at the classifier. --- 1123,1128 ---- - that is, very specialized tokenizer behavior usually produces worse results than a more general approach that just generates tokens and throws ! them at the classifier. See also the file NEWTRICKS.txt in the source ! distribution - we're filing neat ideas here. Index: index.ht =================================================================== RCS file: /cvsroot/spambayes/website/index.ht,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** index.ht 19 Sep 2003 23:12:52 -0000 1.27 --- index.ht 5 Nov 2003 12:11:04 -0000 1.28 *************** *** 5,10 ****

News

Outlook plugin release 008 is available. See the Windows page for more. Note that the Outlook plugin is now available from Sourceforge, on this project's Files page.

-

Sixth (and final alpha) pre-release of spambayes available. See the download page for more.

You may also like to see what other people have been saying about us in the press and elsewhere.

--- 5,10 ----

News

+

Seventh alpha pre-release of spambayes available. See the download page for more.

Outlook plugin release 008 is available. See the Windows page for more. Note that the Outlook plugin is now available from Sourceforge, on this project's Files page.

You may also like to see what other people have been saying about us in the press and elsewhere.

From anthonybaxter at users.sourceforge.net Wed Nov 5 07:15:43 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 07:15:47 2003 Subject: [Spambayes-checkins] website index.ht, 1.28, 1.29 download.ht, 1.20, 1.21 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1:/tmp/cvs-serv30518 Modified Files: index.ht download.ht Log Message: "alpha pre-release" is redundant Index: index.ht =================================================================== RCS file: /cvsroot/spambayes/website/index.ht,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** index.ht 5 Nov 2003 12:11:04 -0000 1.28 --- index.ht 5 Nov 2003 12:15:41 -0000 1.29 *************** *** 5,9 ****

News

!

Seventh alpha pre-release of spambayes available. See the download page for more.

Outlook plugin release 008 is available. See the Windows page for more. Note that the Outlook plugin is now available from Sourceforge, on this project's Files page.

You may also like to see what other people have been saying about us in the press and elsewhere.

--- 5,10 ----

News

!

Seventh alpha release of spambayes available. See the ! download page for more.

Outlook plugin release 008 is available. See the Windows page for more. Note that the Outlook plugin is now available from Sourceforge, on this project's Files page.

You may also like to see what other people have been saying about us in the press and elsewhere.

Index: download.ht =================================================================== RCS file: /cvsroot/spambayes/website/download.ht,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** download.ht 5 Nov 2003 12:11:04 -0000 1.20 --- download.ht 5 Nov 2003 12:15:41 -0000 1.21 *************** *** 4,8 ****

Source Releases

!

The seventh alpha pre-release of version 1.0 of the SpamBayes project is available. Download version 1.0a7 from the sourceforge Files page as either a gzipped tarball or a zip file of the source files.

--- 4,9 ----

Source Releases

!

The seventh alpha release of version 1.0 of the SpamBayes project is ! available. Download version 1.0a7 from the sourceforge Files page as either a gzipped tarball or a zip file of the source files.

From anthonybaxter at users.sourceforge.net Wed Nov 5 07:31:48 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 07:31:53 2003 Subject: [Spambayes-checkins] website reply.txt,1.9,1.10 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1:/tmp/cvs-serv613 Modified Files: reply.txt Log Message: update. someone push the mailman magic button please. Index: reply.txt =================================================================== RCS file: /cvsroot/spambayes/website/reply.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** reply.txt 20 Sep 2003 23:23:12 -0000 1.9 --- reply.txt 5 Nov 2003 12:31:46 -0000 1.10 *************** *** 38,43 **** ----------------------------------------------- ! Please ensure that you have the latest version. As of 2003-09-20, this is ! 008.1 for the Outlook plug-in, and 1.0a6 for everything else. If you are still having trouble, try looking at the bug reports that are currently open: --- 38,43 ---- ----------------------------------------------- ! Please ensure that you have the latest version. As of 2003-11-05, this is ! 008.1 for the Outlook plug-in, and 1.0a7 for everything else. If you are still having trouble, try looking at the bug reports that are currently open: From anthonybaxter at users.sourceforge.net Wed Nov 5 07:31:57 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 07:32:03 2003 Subject: [Spambayes-checkins] website index.ht,1.29,1.30 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1:/tmp/cvs-serv638 Modified Files: index.ht Log Message: missed one Index: index.ht =================================================================== RCS file: /cvsroot/spambayes/website/index.ht,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** index.ht 5 Nov 2003 12:15:41 -0000 1.29 --- index.ht 5 Nov 2003 12:31:55 -0000 1.30 *************** *** 138,142 ****

The code is currently available from a variety of methods from the downloads page. The current release is ! 1.0 alpha 4.

--- 138,142 ----

The code is currently available from a variety of methods from the downloads page. The current release is ! 1.0alpha7.

From anthonybaxter at users.sourceforge.net Wed Nov 5 07:44:55 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 07:45:08 2003 Subject: [Spambayes-checkins] spambayes NEWTRICKS.txt,1.3,1.3.2.1 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv2621 Modified Files: Tag: release_1_0 NEWTRICKS.txt Log Message: merge from trunk Index: NEWTRICKS.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/NEWTRICKS.txt,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** NEWTRICKS.txt 15 Sep 2003 22:41:31 -0000 1.3 --- NEWTRICKS.txt 5 Nov 2003 12:44:52 -0000 1.3.2.1 *************** *** 20,21 **** --- 20,38 ---- level. Also a token indicating the ratio of message length to the number of tokens, and a token indicating the number of tokens. + Also, [817813] add a "not in database" token (I'm not sure about this + one, but I can't articulate why). + + - A token indicating the ratio of hapax legomena to previously seen + tokens in the message. + + - Punctuation sometimes gets inserted in otherwise spammy words or phrases, + e.g.: "Ch-eck ou=t ou-r sel)ection _of grea)t R_X -emgffj". It might be + helpful to try stripping punctuation. (Idea from Paul Sorenson) + + - Similarly, some letters get replaced by numbers, e.g.: "V1agra" instead of + "Viagra". Mapping numbers to suitable letters might help in some + situations. + + - [817813] Add a spelling checker and reasonable sized dictionary and generate + a "not in dictionary" token. + From anthonybaxter at users.sourceforge.net Wed Nov 5 07:45:26 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 07:45:36 2003 Subject: [Spambayes-checkins] spambayes MANIFEST.in,1.8,1.9 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv2719 Modified Files: MANIFEST.in Log Message: merge from branch Index: MANIFEST.in =================================================================== RCS file: /cvsroot/spambayes/spambayes/MANIFEST.in,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MANIFEST.in 21 Sep 2003 04:22:19 -0000 1.8 --- MANIFEST.in 5 Nov 2003 12:45:23 -0000 1.9 *************** *** 1,11 **** recursive-include spambayes/resources *.html *.psp *.gif ! recursive-include spambayes *.py recursive-include pspam *.py *.txt *.ini *.sh recursive-include contrib *.py *.sh *.txt *.el *rc ! recursive-include Outlook2000 *.py *.txt *.ini *.html *.bmp *.rc *.h recursive-include utilities *.py *.txt recursive-include scripts *.py *.txt ! recursive-include testtools *.py *.txt ! recursive-include windows *.py *.txt *.h *.rc *.ico ! include *.txt *.py --- 1,11 ---- recursive-include spambayes/resources *.html *.psp *.gif ! recursive-include spambayes *.py *.txt recursive-include pspam *.py *.txt *.ini *.sh recursive-include contrib *.py *.sh *.txt *.el *rc ! recursive-include Outlook2000 *.py *.txt *.ini *.html *.bmp *.rc *.h *.jpg *.rtf *.spec *.iss recursive-include utilities *.py *.txt recursive-include scripts *.py *.txt ! recursive-include testtools *.py *.txt *.sh ! recursive-include windows *.py *.txt *.h *.rc *.ico *.html *.iss ! include *.txt *.py MANIFEST.in *.sh From anthonybaxter at users.sourceforge.net Wed Nov 5 07:50:15 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 07:50:22 2003 Subject: [Spambayes-checkins] spambayes README-DEVEL.txt, 1.9, 1.10 README.txt, 1.57, 1.58 WHAT_IS_NEW.txt, 1.19, 1.20 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv3171 Modified Files: README-DEVEL.txt README.txt WHAT_IS_NEW.txt Log Message: ported changes from branch to trunk - mostly speling fixes. Index: README-DEVEL.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/README-DEVEL.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** README-DEVEL.txt 30 Oct 2003 00:07:04 -0000 1.9 --- README-DEVEL.txt 5 Nov 2003 12:50:13 -0000 1.10 *************** *** 25,29 **** The code in this project requires Python 2.2 (or later). ! You should definately check out the FAQ: http://spambayes.org/faq.html --- 25,29 ---- The code in this project requires Python 2.2 (or later). ! You should definitely check out the FAQ: http://spambayes.org/faq.html *************** *** 71,74 **** --- 71,79 ---- A collection of statistics functions. + IMPORTANT NOTE + ============== + + The applications have all been renamed in preparation for 1.0 - the + following section refers to old application names. Apps *************** *** 79,83 **** hammiefilter.py A simpler hammie front-end that doesn't print anything. Useful for ! procmail filering and scoring from your MUA. mboxtrain.py --- 84,88 ---- hammiefilter.py A simpler hammie front-end that doesn't print anything. Useful for ! procmail filtering and scoring from your MUA. mboxtrain.py *************** *** 92,96 **** pop3proxy.py ! A spam-classifying POP3 proxy. It adds a spam-judgement header to each mail as it's retrieved, so you can use your email client's filters to deal with them without needing to fiddle with your email --- 97,101 ---- pop3proxy.py ! A spam-classifying POP3 proxy. It adds a spam-judgment header to each mail as it's retrieved, so you can use your email client's filters to deal with them without needing to fiddle with your email *************** *** 237,241 **** runtest.sh ! A bourne shell script (for Unix) which will run some test or other. I (Neale) will try to keep this updated to test whatever Tim is currently asking for. The idea is, if you have a standard directory --- 242,246 ---- runtest.sh ! A Bourne shell script (for Unix) which will run some test or other. I (Neale) will try to keep this updated to test whatever Tim is currently asking for. The idea is, if you have a standard directory *************** *** 314,318 **** arguments to allow using only a random subset of messages in each Set. ! CAUTION: The parititioning of your corpora across directories should be random. If it isn't, bias creeps in to the test results. This is usually screamingly obvious under the NxN grid method (rates vary by a --- 319,323 ---- arguments to allow using only a random subset of messages in each Set. ! CAUTION: The partitioning of your corpora across directories should be random. If it isn't, bias creeps in to the test results. This is usually screamingly obvious under the NxN grid method (rates vary by a *************** *** 462,465 **** --- 467,473 ---- 8-) + Anthony would rather eat live worms than trying to get a sane environment + on Windows, so his approach to building the zip file is at the end. + o If any new file types have been added since last time (eg. 1.0a5 went out without the Windows .rc and .h files) then add them to MANIFEST.in. *************** *** 480,484 **** (a Debian VMWare box in my case). o If you can, rename these with "rc" at the end, and make them available ! to the spambayes-dev crowd as release candidates. If all is ok, then fix the names (or redo this) and keep going. o Dance the SourceForge release dance: --- 488,492 ---- (a Debian VMWare box in my case). o If you can, rename these with "rc" at the end, and make them available ! to the spambayes-dev crowd as release candidates. If all is OK, then fix the names (or redo this) and keep going. o Dance the SourceForge release dance: *************** *** 496,497 **** --- 504,518 ---- Then announce the release on the mailing lists and watch the bug reports roll in. 8-) + + Anthony's Alternate Approach to Building the Zipfile + + o Unpack the tarball somewhere, making a spambayes-1.0a7 directory + (version number will obviously change in future releases) + o Run the following two commands: + + find spambayes-1.0a7 -type f -name '*.txt' | xargs zip -l sb107.zip + find spambayes-1.0a7 -type f \! -name '*.txt' | xargs zip sb107.zip + + o This makes a tarball where the .txt files are mangled, but everything + else is left alone. + Index: README.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/README.txt,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** README.txt 3 Oct 2003 05:23:15 -0000 1.57 --- README.txt 5 Nov 2003 12:50:13 -0000 1.58 *************** *** 26,30 **** If you have any questions that this document does not answer, you should ! definately try the SpamBayes website , and in particular, try reading the list of frequently asked questions: --- 26,30 ---- If you have any questions that this document does not answer, you should ! definitely try the SpamBayes website , and in particular, try reading the list of frequently asked questions: *************** *** 36,40 **** You need to have Python 2.2 or later (2.3 is recommended). You can download Python from . ! Many distributions of unix now ship with Python - try typing 'python' at a shell prompt. --- 36,40 ---- You need to have Python 2.2 or later (2.3 is recommended). You can download Python from . ! Many distributions of UNIX now ship with Python - try typing 'python' at a shell prompt. *************** *** 198,202 **** Since no command line arguments are given, it relies on the options file specified by the BAYESCUSTOMIZE variable for all parameters. While ! sb_filter.py is runnning, Procmail uses the lock file hamlock to prevent multiple invocations from stepping on each others' toes. (It's not strictly necessary in this case since no files on-disk are modified, but Procmail --- 198,202 ---- Since no command line arguments are given, it relies on the options file specified by the BAYESCUSTOMIZE variable for all parameters. While ! sb_filter.py is running, Procmail uses the lock file hamlock to prevent multiple invocations from stepping on each others' toes. (It's not strictly necessary in this case since no files on-disk are modified, but Procmail *************** *** 292,296 **** sb_mboxtrain.py -g ~/tmp/newham -s ~/tmp/newspam ! The above command is command-line-centric (eg. unix, or Windows command prompt). You can also use the web interface for training as detailed above. --- 292,296 ---- sb_mboxtrain.py -g ~/tmp/newham -s ~/tmp/newspam ! The above command is command-line-centric (eg. UNIX, or Windows command prompt). You can also use the web interface for training as detailed above. *************** *** 312,319 **** below. By default it lives in a file called "hammie.db". ! o The tokeniser/classifier. This is the core engine of the system. The tokenizer splits emails into tokens (words, roughly speaking), and the classifier looks at those tokens to determine whether the message looks ! like spam or not. You don't use the tokeniser/classifier directly - it powers the other parts of the system. --- 312,319 ---- below. By default it lives in a file called "hammie.db". ! o The tokenizer/classifier. This is the core engine of the system. The tokenizer splits emails into tokens (words, roughly speaking), and the classifier looks at those tokens to determine whether the message looks ! like spam or not. You don't use the tokenizer/classifier directly - it powers the other parts of the system. *************** *** 329,333 **** +-----------------+ +-------------+ ! The POP3 server runs either at your ISP for internet mail, or somewhere on your internal network for corporate mail. The POP3 proxy sits in the middle and adds the classification header as you retrieve your email: --- 329,333 ---- +-----------------+ +-------------+ ! The POP3 server runs either at your ISP for Internet mail, or somewhere on your internal network for corporate mail. The POP3 proxy sits in the middle and adds the classification header as you retrieve your email: *************** *** 360,364 **** +-----------------+ +-------------+ ! The SMTP server runs either at your ISP for internet mail, or somewhere on your internal network for corporate mail. The SMTP proxy sits in the middle and checks for mail to train on as you send your email: --- 360,364 ---- +-----------------+ +-------------+ ! The SMTP server runs either at your ISP for Internet mail, or somewhere on your internal network for corporate mail. The SMTP proxy sits in the middle and checks for mail to train on as you send your email: Index: WHAT_IS_NEW.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/WHAT_IS_NEW.txt,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** WHAT_IS_NEW.txt 19 Sep 2003 03:45:10 -0000 1.19 --- WHAT_IS_NEW.txt 5 Nov 2003 12:50:13 -0000 1.20 *************** *** 24,28 **** ones for you, which we recommend. In the archive, the scripts are all in a 'scripts' directory, and all the scripts start with the "sb_" ! prefix, to avoid clashing with similiarly named scripts from other packages. Some name changes go further - "pop3proxy" is now named "sb_server", "hammiefilter" is now named "sb_filter", "hammiecli" is now --- 24,28 ---- ones for you, which we recommend. In the archive, the scripts are all in a 'scripts' directory, and all the scripts start with the "sb_" ! prefix, to avoid clashing with similarly named scripts from other packages. Some name changes go further - "pop3proxy" is now named "sb_server", "hammiefilter" is now named "sb_filter", "hammiecli" is now *************** *** 59,63 **** Note that pop3proxy (sb_server) and imapfilter users can simply use the web interface to check their options and correct any that are wrong. All ! incorrectlly named options in the configuration file will be removed. Outlook Plugin --- 59,63 ---- Note that pop3proxy (sb_server) and imapfilter users can simply use the web interface to check their options and correct any that are wrong. All ! incorrectly named options in the configuration file will be removed. Outlook Plugin *************** *** 111,115 **** last folder. o Handle a folder name as a literal when presenting a list to choose from. ! o Handle imap servers that do not pass a blank result line for an empty search. o Fix IMAP over SSL. --- 111,115 ---- last folder. o Handle a folder name as a literal when presenting a list to choose from. ! o Handle IMAP servers that do not pass a blank result line for an empty search. o Fix IMAP over SSL. *************** *** 147,152 **** 805351 ! A url containing the details of these bugs can be made by appending the ! bug number to this url: http://sourceforge.net/tracker/index.php?func=detail&group_id=61702&atid=498103&aid= --- 147,152 ---- 805351 ! A URL containing the details of these bugs can be made by appending the ! bug number to this URL: http://sourceforge.net/tracker/index.php?func=detail&group_id=61702&atid=498103&aid= From anthonybaxter at users.sourceforge.net Wed Nov 5 08:01:46 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 08:01:54 2003 Subject: [Spambayes-checkins] spambayes/spambayes/test README.txt,1.1,1.2 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes/test In directory sc8-pr-cvs1:/tmp/cvs-serv4915/spambayes/test Modified Files: README.txt Log Message: thank you mr aspell Index: README.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/test/README.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README.txt 25 Jul 2003 03:22:04 -0000 1.1 --- README.txt 5 Nov 2003 13:01:44 -0000 1.2 *************** *** 1,3 **** This is a directory for unit tests of spambayes itself. It is NOT to test the performance of the classification algorithms, ! but tests the semantics of the insfrastructure. --- 1,3 ---- This is a directory for unit tests of spambayes itself. It is NOT to test the performance of the classification algorithms, ! but tests the semantics of the infrastructure. From anthonybaxter at users.sourceforge.net Wed Nov 5 08:01:46 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 08:01:57 2003 Subject: [Spambayes-checkins] spambayes/testtools incremental.HOWTO.txt, 1.3, 1.4 Message-ID: Update of /cvsroot/spambayes/spambayes/testtools In directory sc8-pr-cvs1:/tmp/cvs-serv4915/testtools Modified Files: incremental.HOWTO.txt Log Message: thank you mr aspell Index: incremental.HOWTO.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/testtools/incremental.HOWTO.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** incremental.HOWTO.txt 26 May 2003 00:00:54 -0000 1.3 --- incremental.HOWTO.txt 5 Nov 2003 13:01:44 -0000 1.4 *************** *** 11,15 **** and single source, because that makes it much easier to sequence and group them. The corpora need to be in the ! good old familiar Data/{Ham,Spam}/{reservior,Set*} tree. For my purposes, I wrote the es2hs.py tool to grab stuff out of my real MH mail archive folders; other people may --- 11,15 ---- and single source, because that makes it much easier to sequence and group them. The corpora need to be in the ! good old familiar Data/{Ham,Spam}/{reservoir,Set*} tree. For my purposes, I wrote the es2hs.py tool to grab stuff out of my real MH mail archive folders; other people may From anthonybaxter at users.sourceforge.net Wed Nov 5 08:01:46 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 08:01:58 2003 Subject: [Spambayes-checkins] spambayes CHANGELOG.txt, 1.26, 1.27 POP3PROXY.txt, 1.4, 1.5 TESTING.txt, 1.1, 1.2 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv4915 Modified Files: CHANGELOG.txt POP3PROXY.txt TESTING.txt Log Message: thank you mr aspell Index: CHANGELOG.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/CHANGELOG.txt,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** CHANGELOG.txt 30 Oct 2003 00:07:55 -0000 1.26 --- CHANGELOG.txt 5 Nov 2003 13:01:44 -0000 1.27 *************** *** 27,31 **** Mark Hammond 29/09/2003 Outlook: Add slightly better stats, and a better framework to extend. Skip Montanaro 26/09/2003 Dump TRAINED_HDR global. Reference options[...] instead. ! Mark Hammond 25/09/2003 Add patch [ 809008 ] safe start/stop and exlusive execution on windows Tony Meyer 24/09/2003 sb_filter.py: If the -n switch was before the -d/-p switch, then the name wouldn't be used. This is rather unintuitive, so fix this so that the -d/-p name is used wherever the -n switch is. Adam Walker 24/09/2003 pop3proxy_tray: Check if the web interface port can be bound as a simple test of if the proxy is running. --- 27,31 ---- Mark Hammond 29/09/2003 Outlook: Add slightly better stats, and a better framework to extend. Skip Montanaro 26/09/2003 Dump TRAINED_HDR global. Reference options[...] instead. ! Mark Hammond 25/09/2003 Add patch [ 809008 ] safe start/stop and exclusive execution on windows Tony Meyer 24/09/2003 sb_filter.py: If the -n switch was before the -d/-p switch, then the name wouldn't be used. This is rather unintuitive, so fix this so that the -d/-p name is used wherever the -n switch is. Adam Walker 24/09/2003 pop3proxy_tray: Check if the web interface port can be bound as a simple test of if the proxy is running. *************** *** 47,58 **** Tony Meyer 08/10/2003 Ensure that we store the messageinfo database when changes are made. Tony Meyer 07/10/2003 Fix [ 818552 ] Exchange 2000 IMAPserver & imaplib.error: APPEND command er ! Tony Meyer 06/10/2003 Trivial fix for imap over ssl being offered when it is available. Tony Meyer 03/10/2003 Fix [ 810342 ] sb_smtpproxy does not work with smtplib.SMTP.sendmail() Tony Meyer 03/10/2003 Fix [ spambayes-Bugs-816400 ] Crash because of bad date. Sjoerd Mullender 02/10/2003 imapfilter: if problems occur parsing the date, just use the current date/time. Tony Meyer 30/09/2003 Fix [ 814322 ] AttributeError: hdrtxt ! Tony Meyer 29/09/2003 smtpproxy: If we successfully trained a message from the pop3proxy cache or imap server, we still said that we couldn't find it. Fix. Tony Meyer 29/09/2003 smtpproxy: Fix a minor printing error that would cause a traceback. ! Tony Meyer 29/09/2003 imapfilter: Fix trying to view imap folders before restarting and after entering in details. Tony Meyer 28/09/2003 Don't use 'pragma: no_cache' to try and stop browsers caching the web interface pages. Skip Montanaro 26/09/2003 Correct sense of include_trained test in mbox_train. --- 47,58 ---- Tony Meyer 08/10/2003 Ensure that we store the messageinfo database when changes are made. Tony Meyer 07/10/2003 Fix [ 818552 ] Exchange 2000 IMAPserver & imaplib.error: APPEND command er ! Tony Meyer 06/10/2003 Trivial fix for IMAP over SSL being offered when it is available. Tony Meyer 03/10/2003 Fix [ 810342 ] sb_smtpproxy does not work with smtplib.SMTP.sendmail() Tony Meyer 03/10/2003 Fix [ spambayes-Bugs-816400 ] Crash because of bad date. Sjoerd Mullender 02/10/2003 imapfilter: if problems occur parsing the date, just use the current date/time. Tony Meyer 30/09/2003 Fix [ 814322 ] AttributeError: hdrtxt ! Tony Meyer 29/09/2003 smtpproxy: If we successfully trained a message from the pop3proxy cache or IMAP server, we still said that we couldn't find it. Fix. Tony Meyer 29/09/2003 smtpproxy: Fix a minor printing error that would cause a traceback. ! Tony Meyer 29/09/2003 imapfilter: Fix trying to view IMAP folders before restarting and after entering in details. Tony Meyer 28/09/2003 Don't use 'pragma: no_cache' to try and stop browsers caching the web interface pages. Skip Montanaro 26/09/2003 Correct sense of include_trained test in mbox_train. *************** *** 65,69 **** Skip Montanaro 19/09/2003 Worm around a possible email pkg bug. Skip Montanaro 19/09/2003 hammiebulk & mboxtrain: Minor performance boost when training on lots of mail. ! Skip Montanaro 19/09/2003 Place a threshold on the number of items displayed per section in the review page of the ui. Tony Meyer 18/09/2003 Change the Outlook plug-in to use the general default (currently False) for the experimental_ham_spam_imbalance adjustment. Tony Meyer 18/09/2003 Change the default for address_headers to include to, cc, reply-to, and sender as per Tim's suggestion. --- 65,69 ---- Skip Montanaro 19/09/2003 Worm around a possible email pkg bug. Skip Montanaro 19/09/2003 hammiebulk & mboxtrain: Minor performance boost when training on lots of mail. ! Skip Montanaro 19/09/2003 Place a threshold on the number of items displayed per section in the review page of the UI. Tony Meyer 18/09/2003 Change the Outlook plug-in to use the general default (currently False) for the experimental_ham_spam_imbalance adjustment. Tony Meyer 18/09/2003 Change the default for address_headers to include to, cc, reply-to, and sender as per Tim's suggestion. *************** *** 71,75 **** Tony Meyer 18/09/2003 If we can't find a config file anywhere but the windows app data directory, then load it. Tony Meyer 18/09/2003 Use urllib not urllib2 to shut down the proxy. ! Tony Meyer 18/09/2003 Create the server strings for the ui *after* reading in the command line parameters. Tony Meyer 18/09/2003 Move notate_to and notate_subject options to the "Headers" section. Tony Meyer 18/09/2003 Move all the storage options in the "pop3proxy" section to the "Storage" section. --- 71,75 ---- Tony Meyer 18/09/2003 If we can't find a config file anywhere but the windows app data directory, then load it. Tony Meyer 18/09/2003 Use urllib not urllib2 to shut down the proxy. ! Tony Meyer 18/09/2003 Create the server strings for the UI *after* reading in the command line parameters. Tony Meyer 18/09/2003 Move notate_to and notate_subject options to the "Headers" section. Tony Meyer 18/09/2003 Move all the storage options in the "pop3proxy" section to the "Storage" section. *************** *** 98,106 **** Mark Hammond 10/09/2003 Outlook: use the classifier's (new) store method rather than an Outlook specific one. Tony Meyer 10/09/2003 Re-fix storage.py so that hammie works with a pickle or dbm. ! Tony Meyer 09/09/2003 Fix for [ 802545 ] crash when loggin off imapfilter UI Tony Meyer 09/09/2003 Fix for [ 802347 ] multiline options saved incorrectly Tony Meyer 09/09/2003 Implement half of [ 801699 ] migration from hammie to sb_* scripts (although in a different way) Tony Meyer 09/09/2003 sb_server should store and close the db before reopening it. gdbm fails if we do not do this. Fix this. ! Tony Meyer 09/09/2003 imapfilter: correctly handle imap servers that (wrongly) fail to put folder names in quotation marks Mark Hammond 09/09/2003 Add a close method to the various storage classes. Sjoerd Mullender 08/09/2003 Fix for [ 801952 ] Imapfilter appending headers --- 98,106 ---- Mark Hammond 10/09/2003 Outlook: use the classifier's (new) store method rather than an Outlook specific one. Tony Meyer 10/09/2003 Re-fix storage.py so that hammie works with a pickle or dbm. ! Tony Meyer 09/09/2003 Fix for [ 802545 ] crash when logging off imapfilter UI Tony Meyer 09/09/2003 Fix for [ 802347 ] multiline options saved incorrectly Tony Meyer 09/09/2003 Implement half of [ 801699 ] migration from hammie to sb_* scripts (although in a different way) Tony Meyer 09/09/2003 sb_server should store and close the db before reopening it. gdbm fails if we do not do this. Fix this. ! Tony Meyer 09/09/2003 imapfilter: correctly handle IMAP servers that (wrongly) fail to put folder names in quotation marks Mark Hammond 09/09/2003 Add a close method to the various storage classes. Sjoerd Mullender 08/09/2003 Fix for [ 801952 ] Imapfilter appending headers *************** *** 108,112 **** Sjoerd Mullender 08/09/2003 Trivial fix for IMAP over SSL. Tony Meyer 08/09/2003 imapfilter: handle a folder name as a literal when presenting a list to choose from ! Tony Meyer 08/09/2003 imapfilter: handle imap servers that don't pass a blank result line for an empty search Mark Hammond 08/09/2003 Outlook: When we fail to add the 'Spam' field to a read-only store (eg, hotmail), complain less loudly. Mark Hammond 08/09/2003 Fix [ 798362 ] Toolbar becomes unresponsive and must be recreated --- 108,112 ---- Sjoerd Mullender 08/09/2003 Trivial fix for IMAP over SSL. Tony Meyer 08/09/2003 imapfilter: handle a folder name as a literal when presenting a list to choose from ! Tony Meyer 08/09/2003 imapfilter: handle IMAP servers that don't pass a blank result line for an empty search Mark Hammond 08/09/2003 Outlook: When we fail to add the 'Spam' field to a read-only store (eg, hotmail), complain less loudly. Mark Hammond 08/09/2003 Fix [ 798362 ] Toolbar becomes unresponsive and must be recreated *************** *** 122,133 **** Tony Meyer 02/09/2003 Add a rough autoconfigure script, which will set up both spambayes and a mail client to use pop3proxy Richie Hindle 01/09/2003 Fix [ 797890 ] "assert hamcount <= nham" problem. ! Tony Meyer 01/09/2003 Fix [ spambayes-Bugs-796996 ] smtp server not started until restart. Richie Hindle 01/09/2003 Integrated [ 791393 ] HTTP Authentication, which closes #791319. Tony Meyer 01/09/2003 Added [ 796832 ] Word query should show all words starting with certain text ! Tony Meyer 01/09/2003 Fix for [ 797316 ] Extra CRLF to smtp server causes garbage error. Richie Hindle 31/08/2003 The web UI's Shutdown command, and stopping the pop3proxy_service, now wait for any open proxy connections to finish before exiting the process. Richie Hindle 31/08/2003 X-Spambayes-Exception headers now contain a traceback as well as the exception. Richie Hindle 29/08/2003 Fix the yellow colour of the header boxes in the web interface in strict browers (i.e. not IE ;) ! Tony Meyer 28/08/2003 smtproxy: try a bit harder to proxy the exact command if we aren't going anything with it, and try to match it more closely even if we are. Mark Hammond 27/08/2003 Outlook: all menu sub-items are now temporary. Mark Hammond 27/08/2003 Fix [ 776808 ] Expanding toolbar crashes outlook --- 122,133 ---- Tony Meyer 02/09/2003 Add a rough autoconfigure script, which will set up both spambayes and a mail client to use pop3proxy Richie Hindle 01/09/2003 Fix [ 797890 ] "assert hamcount <= nham" problem. ! Tony Meyer 01/09/2003 Fix [ spambayes-Bugs-796996 ] SMTP server not started until restart. Richie Hindle 01/09/2003 Integrated [ 791393 ] HTTP Authentication, which closes #791319. Tony Meyer 01/09/2003 Added [ 796832 ] Word query should show all words starting with certain text ! Tony Meyer 01/09/2003 Fix for [ 797316 ] Extra CRLF to SMTP server causes garbage error. Richie Hindle 31/08/2003 The web UI's Shutdown command, and stopping the pop3proxy_service, now wait for any open proxy connections to finish before exiting the process. Richie Hindle 31/08/2003 X-Spambayes-Exception headers now contain a traceback as well as the exception. Richie Hindle 29/08/2003 Fix the yellow colour of the header boxes in the web interface in strict browers (i.e. not IE ;) ! Tony Meyer 28/08/2003 smtpproxy: try a bit harder to proxy the exact command if we aren't going anything with it, and try to match it more closely even if we are. Mark Hammond 27/08/2003 Outlook: all menu sub-items are now temporary. Mark Hammond 27/08/2003 Fix [ 776808 ] Expanding toolbar crashes outlook *************** *** 146,150 **** Mark Hammond 26/08/2003 Outlook: the experimental 'timers' options got upgraded to the 'filter' section. Adam Walker 26/08/2003 Outlook: added button on advanced tab to display the spambayes data folder. ! Adam Walker 26/08/2003 Outlook: move Filter Now to a seperate dialog invoked by the drop down menu on the toolbar. Tony Meyer 25/08/2003 Fix some old option names. Tony Meyer 25/08/2003 Change the notate_to and notate_subject options to notate for spam, unsure, ham, or any combination (including none) thereof. --- 146,150 ---- Mark Hammond 26/08/2003 Outlook: the experimental 'timers' options got upgraded to the 'filter' section. Adam Walker 26/08/2003 Outlook: added button on advanced tab to display the spambayes data folder. ! Adam Walker 26/08/2003 Outlook: move Filter Now to a separate dialog invoked by the drop down menu on the toolbar. Tony Meyer 25/08/2003 Fix some old option names. Tony Meyer 25/08/2003 Change the notate_to and notate_subject options to notate for spam, unsure, ham, or any combination (including none) thereof. *************** *** 159,163 **** Mark Hammond 25/08/2003 Outlook: remove last win32ui dialog. Mark Hammond 25/08/2003 Outlook: change default filter action to "move" ! Mark Hammond 25/08/2003 Outlook: don't score if the training was cancelled. Mark Hammond 25/08/2003 Outlook: present the wizard when required. Mark Hammond 25/08/2003 Outlook: allow filtering to be enabled, even if no training information! --- 159,163 ---- Mark Hammond 25/08/2003 Outlook: remove last win32ui dialog. Mark Hammond 25/08/2003 Outlook: change default filter action to "move" ! Mark Hammond 25/08/2003 Outlook: don't score if the training was canceled. Mark Hammond 25/08/2003 Outlook: present the wizard when required. Mark Hammond 25/08/2003 Outlook: allow filtering to be enabled, even if no training information! *************** *** 177,182 **** Tony Meyer 18/08/2003 Add version information to the web interface, as requested in [ spambayes-Bugs-790051 ] Can't review messages if probability header is turned on Tony Meyer 16/08/2003 which_database.py: Make the script a little smarter about checking if bsddb[3] is available. ! Tony Meyer 14/08/2003 Fix [ spambayes-Bugs-788008 ] smtpproxy.py assumes toogood format for addresses ! Tony Meyer 14/08/2003 Implement patches from [ 788001 ] mboxtrain.py maildir bugfix and feature Tony Meyer 14/08/2003 Fix [ 787296 ] Local installation problem: hammiefilter_persistent_storage Tony Meyer 14/08/2003 Fix [ 788002 ] hammiebulk.py uses wrong option name --- 177,182 ---- Tony Meyer 18/08/2003 Add version information to the web interface, as requested in [ spambayes-Bugs-790051 ] Can't review messages if probability header is turned on Tony Meyer 16/08/2003 which_database.py: Make the script a little smarter about checking if bsddb[3] is available. ! Tony Meyer 14/08/2003 Fix [ spambayes-Bugs-788008 ] smtpproxy.py assumes too good format for addresses ! Tony Meyer 14/08/2003 Implement patches from [ 788001 ] mboxtrain.py Maildir bugfix and feature Tony Meyer 14/08/2003 Fix [ 787296 ] Local installation problem: hammiefilter_persistent_storage Tony Meyer 14/08/2003 Fix [ 788002 ] hammiebulk.py uses wrong option name *************** *** 189,193 **** Adam Walker 09/08/2003 Use the Tahoma font in the Outlook dialogs. Mark Hammond 09/08/2003 Fix [ 780612 ] Outlook incorrectly trains on moves messages. ! Mark Hammond 08/08/2003 Fix bug [ 784323 ] Plug-in will not intialize/watch in offline mode Tony Meyer 07/08/2003 Add a mySQLClassifier class Skip Montanaro 07/08/2003 Add a postgreSQL classifier class, and a base SQLClassifier class --- 189,193 ---- Adam Walker 09/08/2003 Use the Tahoma font in the Outlook dialogs. Mark Hammond 09/08/2003 Fix [ 780612 ] Outlook incorrectly trains on moves messages. ! Mark Hammond 08/08/2003 Fix bug [ 784323 ] Plug-in will not initialize/watch in offline mode Tony Meyer 07/08/2003 Add a mySQLClassifier class Skip Montanaro 07/08/2003 Add a postgreSQL classifier class, and a base SQLClassifier class *************** *** 250,254 **** Alpha Release 4 =============== ! Tony Meyer 04/07/2003 Fix SF#761677 ("mboxtrain.py's -n optionhas no effect") Richie Hindle 03/07/2003 Put the current date and time into the footer of the web interface, rather than always displaying "Mon Dec 30 14:04:32 2002". Richie Hindle 03/07/2003 Fix a bug in pop3proxy where long attachments would be broken. --- 250,254 ---- Alpha Release 4 =============== ! Tony Meyer 04/07/2003 Fix SF#761677 ("mboxtrain.py's -n option has no effect") Richie Hindle 03/07/2003 Put the current date and time into the footer of the web interface, rather than always displaying "Mon Dec 30 14:04:32 2002". Richie Hindle 03/07/2003 Fix a bug in pop3proxy where long attachments would be broken. *************** *** 265,269 **** Tim Peters 27/06/2003 In storage.py store(): Use iteritems() instead of items() to materialize the changed_words guts. Tim Peters 27/06/2003 In storage.py, check WORD_CHANGED and WORD_DELETED with is not ==. ! Tim Peters 27/06/2003 Remove a superstituous check for None in storage.py (_wordinfoset()). Tim Peters 27/06/2003 Fix a bug in storage.py (_wordinfoget()) which could cause incorrect token counts. Tony Meyer 23/06/2003 In imapfilter, try to append without flags if appending fails. --- 265,269 ---- Tim Peters 27/06/2003 In storage.py store(): Use iteritems() instead of items() to materialize the changed_words guts. Tim Peters 27/06/2003 In storage.py, check WORD_CHANGED and WORD_DELETED with is not ==. ! Tim Peters 27/06/2003 Remove a superstitious check for None in storage.py (_wordinfoset()). Tim Peters 27/06/2003 Fix a bug in storage.py (_wordinfoget()) which could cause incorrect token counts. Tony Meyer 23/06/2003 In imapfilter, try to append without flags if appending fails. *************** *** 310,314 **** Mark Hammond 3/06/2003 "In Outlook plugin, save config when dialog closes and not at shutdown." Mark Hammond 3/06/2003 Clean up toolbar images. ! Tony Meyer 30/05/2003 Added url slurper. Mark Hammond 29/05/2003 "DB classifier keeps a list of ""changed words"" to prevent saves from updating *all* words." Mark Hammond 29/05/2003 DB classifier doesn't cache hapaxes. --- 310,314 ---- Mark Hammond 3/06/2003 "In Outlook plugin, save config when dialog closes and not at shutdown." Mark Hammond 3/06/2003 Clean up toolbar images. ! Tony Meyer 30/05/2003 Added URL slurper. Mark Hammond 29/05/2003 "DB classifier keeps a list of ""changed words"" to prevent saves from updating *all* words." Mark Hammond 29/05/2003 DB classifier doesn't cache hapaxes. *************** *** 323,327 **** Tim Peters 19/05/2003 Improve tokenisation for messages that have text that looks like Wrinkle Reduction Tim Peters 19/05/2003 Decode numeric character entities in html. ! Tim Peters 19/05/2003 Replace

and
tages with single blanks. Mark Hammond 15/05/2003 The training dialog now shows a correct progress bar for the *complete* operation - training *and* scoring Mark Hammond 15/05/2003 Fix SF#706170 ('Execute test suite fails in Outlook'). --- 323,327 ---- Tim Peters 19/05/2003 Improve tokenisation for messages that have text that looks like Wrinkle Reduction Tim Peters 19/05/2003 Decode numeric character entities in html. ! Tim Peters 19/05/2003 Replace

and
tags with single blanks. Mark Hammond 15/05/2003 The training dialog now shows a correct progress bar for the *complete* operation - training *and* scoring Mark Hammond 15/05/2003 Fix SF#706170 ('Execute test suite fails in Outlook'). *************** *** 348,352 **** Mark Hammond 3/05/2003 Correct usage doc with respect to default directory. Mark Hammond 3/05/2003 Fix SF#715248 ('Pickle classifier should save to a temp file first'). ! Mark Hammond 3/05/2003 Formalised error reporting in Outlook plugin. Mark Hammond 3/05/2003 "Created special handling for ""startup errors"" in Outlook plugin" Mark Hammond 3/05/2003 Allow test suite to work with bsddb3 or bsddb. --- 348,352 ---- Mark Hammond 3/05/2003 Correct usage doc with respect to default directory. Mark Hammond 3/05/2003 Fix SF#715248 ('Pickle classifier should save to a temp file first'). ! Mark Hammond 3/05/2003 Formalized error reporting in Outlook plugin. Mark Hammond 3/05/2003 "Created special handling for ""startup errors"" in Outlook plugin" Mark Hammond 3/05/2003 Allow test suite to work with bsddb3 or bsddb. *************** *** 358,367 **** Mark Hammond 1/05/2003 Ignore the pywin.dialogs package in the Outlook plugin install. Mark Hammond 1/05/2003 Save the database after an explicit train. ! Mark Hammond 1/05/2003 Fix globals statements in url slurper. ! Mark Hammond 1/05/2003 Fix testtools import in url slurper. ! Mark Hammond 1/05/2003 Print url slurper status to stderr. ! Mark Hammond 1/05/2003 Added socket.error catching in url slurper. Mark Hammond 1/05/2003 Avoid slurping non html content. ! Tony Meyer 1/05/2003 Fix bug where url cache would not be in the current working directory by default. Tony Meyer 28/04/2003 Stop using IMAP uids as our ids. Tony Meyer 28/04/2003 Fix SelectFolder bug in IMAP Filter. --- 358,367 ---- Mark Hammond 1/05/2003 Ignore the pywin.dialogs package in the Outlook plugin install. Mark Hammond 1/05/2003 Save the database after an explicit train. ! Mark Hammond 1/05/2003 Fix globals statements in URL slurper. ! Mark Hammond 1/05/2003 Fix testtools import in URL slurper. ! Mark Hammond 1/05/2003 Print URL slurper status to stderr. ! Mark Hammond 1/05/2003 Added socket.error catching in URL slurper. Mark Hammond 1/05/2003 Avoid slurping non html content. ! Tony Meyer 1/05/2003 Fix bug where URL cache would not be in the current working directory by default. Tony Meyer 28/04/2003 Stop using IMAP uids as our ids. Tony Meyer 28/04/2003 Fix SelectFolder bug in IMAP Filter. *************** *** 370,374 **** Tony Meyer 28/04/2003 Fix for incorrect is_boolean code in Options.py Tony Meyer 28/04/2003 "IMAP Filter now only retrieves RFC822 headers when iterating, not whole message." ! Tim Stone 28/04/2003 Moved crlf replacement from IMAP to generic message class. Tony Meyer 27/04/2003 Minor bug fixes to Options.py Tony Meyer 27/04/2003 Fixed configuration file reading bug forcing single space separators instead of any whitespace. --- 370,374 ---- Tony Meyer 28/04/2003 Fix for incorrect is_boolean code in Options.py Tony Meyer 28/04/2003 "IMAP Filter now only retrieves RFC822 headers when iterating, not whole message." ! Tim Stone 28/04/2003 Moved CRLF replacement from IMAP to generic message class. Tony Meyer 27/04/2003 Minor bug fixes to Options.py Tony Meyer 27/04/2003 Fixed configuration file reading bug forcing single space separators instead of any whitespace. *************** *** 380,386 **** Tony Meyer 24/04/2003 Fix SF#725466 ('Include a proper locale fix in Options.py'). Tony Meyer 24/04/2003 Fix SF#726255 ('Problem if bayescustomize.ini not there'). ! Tony Meyer 24/04/2003 Moved the crlf fixing from generic message class to IMAP filter. Tony Meyer 24/04/2003 Major rewrite of Options.py ! Tony Meyer 24/04/2003 Changed options with muliple values to tuples. Tony Meyer 24/04/2003 Fixed bug where the IMAP user interface would try to display a folder before logging in. Tony Meyer 24/04/2003 Added convert_config_file script. --- 380,386 ---- Tony Meyer 24/04/2003 Fix SF#725466 ('Include a proper locale fix in Options.py'). Tony Meyer 24/04/2003 Fix SF#726255 ('Problem if bayescustomize.ini not there'). ! Tony Meyer 24/04/2003 Moved the CRLF fixing from generic message class to IMAP filter. Tony Meyer 24/04/2003 Major rewrite of Options.py ! Tony Meyer 24/04/2003 Changed options with multiple values to tuples. Tony Meyer 24/04/2003 Fixed bug where the IMAP user interface would try to display a folder before logging in. Tony Meyer 24/04/2003 Added convert_config_file script. *************** *** 398,402 **** Tony Meyer 22/04/2003 Improved processing of fetch response in IMAP filter. Tim Stone 21/04/2003 Cosmetic changes to the web configuration page. ! Skip Montanaro 21/04/2003 Fix crlf regex in message.py Tony Meyer 21/04/2003 Fix SF#725307 ('Outlook plugin won't load (anymore)'). Tim Stone 21/04/2003 Rewrote is_valid method in Options.py --- 398,402 ---- Tony Meyer 22/04/2003 Improved processing of fetch response in IMAP filter. Tim Stone 21/04/2003 Cosmetic changes to the web configuration page. ! Skip Montanaro 21/04/2003 Fix CRLF regex in message.py Tony Meyer 21/04/2003 Fix SF#725307 ('Outlook plugin won't load (anymore)'). Tim Stone 21/04/2003 Rewrote is_valid method in Options.py *************** *** 417,421 **** Tony Meyer 19/04/2003 Use IMAP date instead of the local one. Tony Meyer 19/04/2003 Added utility functions to Options.py to assist people to figure out what is available. ! Tony Meyer 18/04/2003 "Remove support for pop3proxy_port, pop3proxy_server_name and pop3proxy_server_port otpions (long deprecated)." Tony Meyer 18/04/2003 Remove option to launch smtpproxy and always do this from pop3proxy (if servers are specified). Tony Meyer 18/04/2003 Fix smtpproxy bug that would prevent mail sent in the same session as training mail being delivered. --- 417,421 ---- Tony Meyer 19/04/2003 Use IMAP date instead of the local one. Tony Meyer 19/04/2003 Added utility functions to Options.py to assist people to figure out what is available. ! Tony Meyer 18/04/2003 "Remove support for pop3proxy_port, pop3proxy_server_name and pop3proxy_server_port options (long deprecated)." Tony Meyer 18/04/2003 Remove option to launch smtpproxy and always do this from pop3proxy (if servers are specified). Tony Meyer 18/04/2003 Fix smtpproxy bug that would prevent mail sent in the same session as training mail being delivered. *************** *** 433,437 **** Tim Stone 17/04/2003 Added -p option for password prompt in imapfilter. Tim Stone 17/04/2003 Corrected imapfilter training error which would result in no training being done. ! Tim Stone 17/04/2003 Corrected an error in the timed loop that unnecessarily kept imap sessions open. Tim Stone 17/04/2003 Moved the header repaid regex into the message class. Tony Meyer 17/04/2003 Added ConfigParser from Python 2.3 which solves many problems in the 2.2 version. --- 433,437 ---- Tim Stone 17/04/2003 Added -p option for password prompt in imapfilter. Tim Stone 17/04/2003 Corrected imapfilter training error which would result in no training being done. ! Tim Stone 17/04/2003 Corrected an error in the timed loop that unnecessarily kept IMAP sessions open. Tim Stone 17/04/2003 Moved the header repaid regex into the message class. Tony Meyer 17/04/2003 Added ConfigParser from Python 2.3 which solves many problems in the 2.2 version. *************** *** 491,495 **** Mark Hammond 7/03/2003 Handle MAPI exceptions better in Outlook plugin. Mark Hammond 7/03/2003 "Centralise detection of ""not found"" exceptions in Outlook plugin." ! Mark Hammond 7/03/2003 Supress errors in outlook plugin when hotmail connector can't save the message. T. Alexander Popiel 7/03/2003 Added another regime to regimes.py. Tim Stone 6/03/2003 Added SF#690928 ('turn off saving messages in popproxy'). --- 491,495 ---- Mark Hammond 7/03/2003 Handle MAPI exceptions better in Outlook plugin. Mark Hammond 7/03/2003 "Centralise detection of ""not found"" exceptions in Outlook plugin." ! Mark Hammond 7/03/2003 Suppress errors in outlook plugin when hotmail connector can't save the message. T. Alexander Popiel 7/03/2003 Added another regime to regimes.py. Tim Stone 6/03/2003 Added SF#690928 ('turn off saving messages in popproxy'). *************** *** 514,518 **** Tony Meyer 1/03/2003 Expose options for adding an id to incoming mail in pop3proxy. Tony Meyer 1/03/2003 Expose options for using smtpproxy. ! T. Alexander Popiel 28/02/2003 Put all regimes into regmies.py. Define fpfnunsure and fnunsure regimes. T. Alexander Popiel 28/02/2003 Fix name conflict between regimes list and regimes source file in incremental.py T. Alexander Popiel 28/02/2003 Reduce the amount of progress output in incremental.py --- 514,518 ---- Tony Meyer 1/03/2003 Expose options for adding an id to incoming mail in pop3proxy. Tony Meyer 1/03/2003 Expose options for using smtpproxy. ! T. Alexander Popiel 28/02/2003 Put all regimes into regimes.py. Define fpfnunsure and fnunsure regimes. T. Alexander Popiel 28/02/2003 Fix name conflict between regimes list and regimes source file in incremental.py T. Alexander Popiel 28/02/2003 Reduce the amount of progress output in incremental.py *************** *** 533,537 **** Mark Hammond 12/02/2003 Check for correct exception when removing file in Outlook addin. Mark Hammond 12/02/2003 Check for bsddb3 before bsddb (previously bsddb3 would never be found). ! Tim Stone 10/02/2003 Changed BAYESCUSTOMIZE environment varaible parsing from a split to a regex to fix filenames with embedded spaces. Tim Stone 8/02/2003 Ensure that nham and nspam are instances of integer in dbExpImp.py Tim Stone 8/02/2003 Ensure that nham and nspam becoming strings doesn't break classification. --- 533,537 ---- Mark Hammond 12/02/2003 Check for correct exception when removing file in Outlook addin. Mark Hammond 12/02/2003 Check for bsddb3 before bsddb (previously bsddb3 would never be found). ! Tim Stone 10/02/2003 Changed BAYESCUSTOMIZE environment variable parsing from a split to a regex to fix filenames with embedded spaces. Tim Stone 8/02/2003 Ensure that nham and nspam are instances of integer in dbExpImp.py Tim Stone 8/02/2003 Ensure that nham and nspam becoming strings doesn't break classification. *************** *** 542,544 **** Mark Hammond 3/02/2003 If a new bsddb or bsddb3 module is available use this instead of a pickle in the Outlook plugin. Mark Hammond 3/02/2003 Add tick-marks to the filter dialog. ! Mark Hammond 3/02/2003 Fix SF#677804 ('Untouched fitler command error'). --- 542,544 ---- Mark Hammond 3/02/2003 If a new bsddb or bsddb3 module is available use this instead of a pickle in the Outlook plugin. Mark Hammond 3/02/2003 Add tick-marks to the filter dialog. ! Mark Hammond 3/02/2003 Fix SF#677804 ('Untouched filter command error'). Index: POP3PROXY.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/POP3PROXY.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** POP3PROXY.txt 29 Jul 2003 08:12:10 -0000 1.4 --- POP3PROXY.txt 5 Nov 2003 13:01:44 -0000 1.5 *************** *** 4,8 **** Setting Eudora to use different ports under Windows --------------------------------------------------- ! Eudora can be configured to support multiple pop and smtp servers on different localhost ports - at least on Windows. You just can't do it from the Tools->Options menu. Eudora reads an ini file, --- 4,8 ---- Setting Eudora to use different ports under Windows --------------------------------------------------- ! Eudora can be configured to support multiple pop and SMTP servers on different localhost ports - at least on Windows. You just can't do it from the Tools->Options menu. Eudora reads an ini file, *************** *** 31,37 **** In eudora.new (or whatever you called it) find the section starting with [Settings]. This contains settings for the dominant personality. ! Find the line beggining POPAccount. The last part of the account name starting with '@' is the server. Change it to @localhost. ! Find the lines beggining SMTPServer and POPServer. They will have the server names defined for your dominant personality. Change both server names to localhost --- 31,37 ---- In eudora.new (or whatever you called it) find the section starting with [Settings]. This contains settings for the dominant personality. ! Find the line beginning POPAccount. The last part of the account name starting with '@' is the server. Change it to @localhost. ! Find the lines beginning SMTPServer and POPServer. They will have the server names defined for your dominant personality. Change both server names to localhost *************** *** 66,70 **** looks like this. The end of the first line must be the same as the start of the second line. ! When this file is created, go to the "TCP/IP" control panl. Set the user level to 'Administrator'. Click on "Use a host file" and select this file. Save your changes. --- 66,70 ---- looks like this. The end of the first line must be the same as the start of the second line. ! When this file is created, go to the "TCP/IP" control panel. Set the user level to 'Administrator'. Click on "Use a host file" and select this file. Save your changes. Index: TESTING.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/TESTING.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TESTING.txt 5 Sep 2002 20:55:02 -0000 1.1 --- TESTING.txt 5 Nov 2003 13:01:44 -0000 1.2 *************** *** 256,258 **** only a few specific msgs zooms (of course sometimes that's intentional! I haven't been shy about adding changes specifically geared toward ! squahsing very narrow classes of false positives). --- 256,258 ---- only a few specific msgs zooms (of course sometimes that's intentional! I haven't been shy about adding changes specifically geared toward ! squashing very narrow classes of false positives). From anthonybaxter at users.sourceforge.net Wed Nov 5 08:05:16 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 08:05:21 2003 Subject: [Spambayes-checkins] spambayes/Outlook2000 about.html,1.24,1.25 Message-ID: Update of /cvsroot/spambayes/spambayes/Outlook2000 In directory sc8-pr-cvs1:/tmp/cvs-serv5453/Outlook2000 Modified Files: about.html Log Message: more spelink Index: about.html =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/about.html,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** about.html 18 Sep 2003 05:36:39 -0000 1.24 --- about.html 5 Nov 2003 13:05:14 -0000 1.25 *************** *** 47,56 **** messages, via the SpamBayes Manager's Advanced tab.

!

Toobars stop working: Many people report that occasionally the toolbars will stop working.  See the troubleshooting guide for more details on how to fix this.

Toolbars remain after uninstall: ! If you uninstall SpamBayes, the toobar items will remain when you next start Outlook.  You can delete the toolbar by right-clicking on it, then selecting Customize.  Our Advanced tab.

!

Toolbars stop working: Many people report that occasionally the toolbars will stop working.  See the troubleshooting guide for more details on how to fix this.

Toolbars remain after uninstall: ! If you uninstall SpamBayes, the toolbar items will remain when you next start Outlook.  You can delete the toolbar by right-clicking on it, then selecting Customize.  Our Update of /cvsroot/spambayes/spambayes/Outlook2000/docs In directory sc8-pr-cvs1:/tmp/cvs-serv5453/Outlook2000/docs Modified Files: troubleshooting.html welcome.html Log Message: more spelink Index: troubleshooting.html =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/docs/troubleshooting.html,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** troubleshooting.html 7 Sep 2003 23:38:01 -0000 1.15 --- troubleshooting.html 5 Nov 2003 13:05:14 -0000 1.16 *************** *** 29,33 ****


Toolbar items appear, but fail to work

! If the toolbar items fail to work, we are faciing one of two problems.
  • The addin has failed to load.  In this case, along with the --- 29,33 ----

    Toolbar items appear, but fail to work

    ! If the toolbar items fail to work, we are facing one of two problems.
    • The addin has failed to load.  In this case, along with the *************** *** 91,95 **** style="font-style: italic;">Options to display the main Options dialog.
    • !
    • Select the tab labelled Other, then click on the Advanced button.
    • --- 91,95 ---- style="font-style: italic;">Options to display the main Options dialog. !
    • Select the tab labeled Other, then click on the Advanced button.
    • *************** *** 206,210 ****

      Determine your installation type.

      If you are running from Python source code, and installed Python, plus ! SpamBayes as seperate components, then you are running the source code version.  If you downloaded an installer .EXE file, then you are running the Determine your installation type. If you are running from Python source code, and installed Python, plus ! SpamBayes as separate components, then you are running the source code version.  If you downloaded an installer .EXE file, then you are running the if it is in your File menu) !
    • Send youself a test message, and wait for it to arrive.
    • Exit Outlook.
    --- 263,267 ---- Sign off if it is in your File menu)
  • !
  • Send yourself a test message, and wait for it to arrive.
  • Exit Outlook.
Index: welcome.html =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/docs/welcome.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** welcome.html 19 Sep 2003 08:24:10 -0000 1.6 --- welcome.html 5 Nov 2003 13:05:15 -0000 1.7 *************** *** 133,137 **** Spam folder or have the Delete as Spam ! toobar button (shown above) clicked. In all cases, the system will automatically --- 133,137 ---- Spam folder or have the Delete as Spam ! toolbar button (shown above) clicked. In all cases, the system will automatically From anthonybaxter at users.sourceforge.net Wed Nov 5 08:05:17 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 08:05:24 2003 Subject: [Spambayes-checkins] spambayes/spambayes/resources ui.html, 1.27, 1.28 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes/resources In directory sc8-pr-cvs1:/tmp/cvs-serv5453/spambayes/resources Modified Files: ui.html Log Message: more spelink Index: ui.html =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/resources/ui.html,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ui.html 3 Oct 2003 18:52:08 -0000 1.27 --- ui.html 5 Nov 2003 13:05:15 -0000 1.28 *************** *** 57,61 ****

This file, ui.html, defines the look-and-feel of the user interface of the Spambayes Server. The various ! pieces of HTML defined here are extracted and maniplulated at runtime to dynamically produce the HTML that the Spambayes Server serves up - this file acts as a palette of HTML --- 57,61 ----

This file, ui.html, defines the look-and-feel of the user interface of the Spambayes Server. The various ! pieces of HTML defined here are extracted and manipulated at runtime to dynamically produce the HTML that the Spambayes Server serves up - this file acts as a palette of HTML From anthonybaxter at users.sourceforge.net Wed Nov 5 08:06:59 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 08:07:12 2003 Subject: [Spambayes-checkins] spambayes CHANGELOG.txt,1.27,1.28 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv5703 Modified Files: CHANGELOG.txt Log Message: CHANGELOG.txt Index: CHANGELOG.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/CHANGELOG.txt,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** CHANGELOG.txt 5 Nov 2003 13:01:44 -0000 1.27 --- CHANGELOG.txt 5 Nov 2003 13:06:56 -0000 1.28 *************** *** 3,6 **** --- 3,7 ---- Release 1.1a1 ============= + Anthony Baxter 05/11/2003 Spell-checked all the HTML and txt files Tony Meyer 30/10/2003 Implement [ 827138 ] Can't display clues/tokens/source for a trained message Richie Hindle 15/10/2003 Increased the auth-digest login timeout from one minute to twenty. *************** *** 128,132 **** Richie Hindle 31/08/2003 The web UI's Shutdown command, and stopping the pop3proxy_service, now wait for any open proxy connections to finish before exiting the process. Richie Hindle 31/08/2003 X-Spambayes-Exception headers now contain a traceback as well as the exception. ! Richie Hindle 29/08/2003 Fix the yellow colour of the header boxes in the web interface in strict browers (i.e. not IE ;) Tony Meyer 28/08/2003 smtpproxy: try a bit harder to proxy the exact command if we aren't going anything with it, and try to match it more closely even if we are. Mark Hammond 27/08/2003 Outlook: all menu sub-items are now temporary. --- 129,133 ---- Richie Hindle 31/08/2003 The web UI's Shutdown command, and stopping the pop3proxy_service, now wait for any open proxy connections to finish before exiting the process. Richie Hindle 31/08/2003 X-Spambayes-Exception headers now contain a traceback as well as the exception. ! Richie Hindle 29/08/2003 Fix the yellow colour of the header boxes in the web interface in strict browsers (i.e. not IE ;) Tony Meyer 28/08/2003 smtpproxy: try a bit harder to proxy the exact command if we aren't going anything with it, and try to match it more closely even if we are. Mark Hammond 27/08/2003 Outlook: all menu sub-items are now temporary. From anthonybaxter at users.sourceforge.net Wed Nov 5 08:21:40 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Wed Nov 5 08:21:45 2003 Subject: [Spambayes-checkins] website applications.ht,1.24,1.25 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1:/tmp/cvs-serv8269 Modified Files: applications.ht Log Message: last spellign fix for tonight. promise . Index: applications.ht =================================================================== RCS file: /cvsroot/spambayes/website/applications.ht,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** applications.ht 5 Nov 2003 12:11:03 -0000 1.24 --- applications.ht 5 Nov 2003 13:21:38 -0000 1.25 *************** *** 35,39 ****

sb_filter is a command line tool for marking mail as ham or spam. Skip Montanaro has started a guide to integrating hammie with your mailer (Unix-only instructions at the moment - additions welcome!). ! Currently it focusses on running sb_filter via procmail.

Requirements

--- 35,39 ----

sb_filter is a command line tool for marking mail as ham or spam. Skip Montanaro has started a guide to integrating hammie with your mailer (Unix-only instructions at the moment - additions welcome!). ! Currently it focuses on running sb_filter via procmail.

Requirements

From montanaro at users.sourceforge.net Thu Nov 6 17:01:26 2003 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Thu Nov 6 17:01:29 2003 Subject: [Spambayes-checkins] spambayes/spambayes OptionsClass.py,1.13,1.14 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv18668 Modified Files: OptionsClass.py Log Message: error messages go to sys.stderr... Index: OptionsClass.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/OptionsClass.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** OptionsClass.py 9 Sep 2003 07:53:56 -0000 1.13 --- OptionsClass.py 6 Nov 2003 22:01:23 -0000 1.14 *************** *** 185,189 **** r = re.compile(self.allowed_values) except: ! print self.allowed_values raise s = str(value) --- 185,189 ---- r = re.compile(self.allowed_values) except: ! print >> sys.stderr, self.allowed_values raise s = str(value) *************** *** 383,387 **** # be added to it if self.verbose: ! print "Creating new configuration file", filename f = file(filename, "w") f.close() --- 383,388 ---- # be added to it if self.verbose: ! print >> sys.stderr, "Creating new configuration file", ! print >> sys.stderr, filename f = file(filename, "w") f.close() *************** *** 504,509 **** option = opt if not self._options.has_key((section, option)): ! print "Invalid option %s in section %s in file %s" % \ ! (opt, sect, filename) else: if self.multiple_values_allowed(section, option): --- 505,511 ---- option = opt if not self._options.has_key((section, option)): ! print >> sys.stderr, ("Invalid option %s in" ! " section %s in file %s" % ! (opt, sect, filename)) else: if self.multiple_values_allowed(section, option): *************** *** 569,575 **** self._options[sect, opt].set(val) else: ! print "Attempted to set [%s] %s with invalid value %s (%s)" % \ ! (sect, opt, val, type(val)) ! def __setitem__(self, key, value): self.set(key[0], key[1], value) --- 571,578 ---- self._options[sect, opt].set(val) else: ! print >> sys.stderr, ("Attempted to set [%s] %s with invalid" ! " value %s (%s)" % ! (sect, opt, val, type(val))) ! def __setitem__(self, key, value): self.set(key[0], key[1], value) From richiehindle at users.sourceforge.net Thu Nov 6 18:45:01 2003 From: richiehindle at users.sourceforge.net (Richie Hindle) Date: Thu Nov 6 18:45:06 2003 Subject: [Spambayes-checkins] spambayes/spambayes Dibbler.py,1.8,1.9 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv6310 Modified Files: Dibbler.py Log Message: Fixed an infinite loop when you break the browser connection to sb_server when sb_server is busy training. Recalled the hunter-killer drones because of all those poor guys that have to pull tractors around Central Illinois. Bugfix candidate. Index: Dibbler.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/Dibbler.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Dibbler.py 15 Oct 2003 06:57:19 -0000 1.8 --- Dibbler.py 6 Nov 2003 23:44:59 -0000 1.9 *************** *** 190,193 **** --- 190,194 ---- asynchat.async_chat.__init__(self, conn) self._map = map + self._closed = False def handle_connect(self): *************** *** 198,204 **** """Let SystemExit cause an exit.""" type, v, t = sys.exc_info() ! if type == socket.error and v[0] == 9: # Why? Who knows... ! pass ! elif type == SystemExit: raise else: --- 199,203 ---- """Let SystemExit cause an exit.""" type, v, t = sys.exc_info() ! if type == SystemExit: raise else: *************** *** 207,215 **** def flush(self): """Flush everything in the output buffer.""" ! while self.producer_fifo or self.ac_out_buffer: self.initiate_send() def close(self): """Remove this object from the correct socket map.""" self.del_channel(self._map) self.socket.close() --- 206,219 ---- def flush(self): """Flush everything in the output buffer.""" ! # We check self._closed here because of the case where ! # self.initiate_send() raises an exception, causing self.close() ! # to be called. If we didn't check, we could end up in an infinite ! # loop. ! while (self.producer_fifo or self.ac_out_buffer) and not self._closed: self.initiate_send() def close(self): """Remove this object from the correct socket map.""" + self._closed = True self.del_channel(self._map) self.socket.close() From richiehindle at users.sourceforge.net Mon Nov 10 15:21:54 2003 From: richiehindle at users.sourceforge.net (Richie Hindle) Date: Mon Nov 10 15:22:00 2003 Subject: [Spambayes-checkins] spambayes/scripts sb_notesfilter.py,1.3,1.4 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv6062 Modified Files: sb_notesfilter.py Log Message: The header_x_string options now live in the Headers section, not the Hammie section. I'm not able to test this edit, but it ought to be a no- brainer and it can't make it any less broken. 8-) Bugfix candidate. Index: sb_notesfilter.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_notesfilter.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sb_notesfilter.py 21 Oct 2003 21:46:31 -0000 1.3 --- sb_notesfilter.py 10 Nov 2003 20:21:52 -0000 1.4 *************** *** 202,213 **** if prob < options["Categorization", "ham_cutoff"]: ! disposition = options["Hammie", "header_ham_string"] numham += 1 elif prob > options["Categorization", "spam_cutoff"]: ! disposition = options["Hammie", "header_spam_string"] docstomove += [doc] numspam += 1 else: ! disposition = options["Hammie", "header_unsure_string"] numuns += 1 --- 202,213 ---- if prob < options["Categorization", "ham_cutoff"]: ! disposition = options["Headers", "header_ham_string"] numham += 1 elif prob > options["Categorization", "spam_cutoff"]: ! disposition = options["Headers", "header_spam_string"] docstomove += [doc] numspam += 1 else: ! disposition = options["Headers", "header_unsure_string"] numuns += 1 *************** *** 235,241 **** if is_spam: ! str = options["Hammie", "header_spam_string"] else: ! str = options["Hammie", "header_ham_string"] print "Training %s" % (str) --- 235,241 ---- if is_spam: ! str = options["Headers", "header_spam_string"] else: ! str = options["Headers", "header_ham_string"] print "Training %s" % (str) *************** *** 262,270 **** if notesindex.has_key(nid): trainedas = notesindex[nid] ! if trainedas == options["Hammie", "header_spam_string"] and \ not is_spam: # msg is trained as spam, is to be retrained as ham bayes.unlearn(tokens, True) ! elif trainedas == options["Hammie", "header_ham_string"] and \ is_spam: # msg is trained as ham, is to be retrained as spam --- 262,270 ---- if notesindex.has_key(nid): trainedas = notesindex[nid] ! if trainedas == options["Headers", "header_spam_string"] and \ not is_spam: # msg is trained as spam, is to be retrained as ham bayes.unlearn(tokens, True) ! elif trainedas == options["Headers", "header_ham_string"] and \ is_spam: # msg is trained as ham, is to be retrained as spam From mhammond at users.sourceforge.net Tue Nov 11 17:17:53 2003 From: mhammond at users.sourceforge.net (Mark Hammond) Date: Tue Nov 11 17:18:54 2003 Subject: [Spambayes-checkins] website/scripts/ht2html LinkFixer.py,1.2,1.3 Message-ID: Update of /cvsroot/spambayes/website/scripts/ht2html In directory sc8-pr-cvs1:/tmp/cvs-serv15893 Modified Files: LinkFixer.py Log Message: Richie Hindle found out why posixpath wasn't good enough! Index: LinkFixer.py =================================================================== RCS file: /cvsroot/spambayes/website/scripts/ht2html/LinkFixer.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LinkFixer.py 28 Oct 2003 04:37:08 -0000 1.2 --- LinkFixer.py 11 Nov 2003 22:17:51 -0000 1.3 *************** *** 9,12 **** --- 9,14 ---- import sys + import urlparse + import posixpath # use posix semantics for urls from types import StringType *************** *** 38,48 **** elif url[-1] == '/': url = url + 'index.html' ! absurl = SLASH.join([self.__rootdir, self.__relthis, url]) # normalize the path, kind of the way os.path.normpath() does. ! # urlparse ought to have something like this... ! # hrm - MarkH thinks this is broken, so it has been replaced ! # with normpath - what is the problem with normpath? ! import posixpath # use posix semantics for urls ! absurl = posixpath.normpath(absurl) self.msg('absurl= %s', absurl) return absurl --- 40,50 ---- elif url[-1] == '/': url = url + 'index.html' ! # normalize the path, kind of the way os.path.normpath() does. ! # urlparse ought to have something like this built in... ! scheme, addr, path, params, query, frag = urlparse.urlparse(url) ! abspath = SLASH.join([self.__rootdir, self.__relthis, path]) ! path = posixpath.normpath(abspath) ! absurl = urlparse.urlunparse((scheme, addr, path, params, query, frag)) self.msg('absurl= %s', absurl) return absurl From montanaro at users.sourceforge.net Wed Nov 12 09:34:52 2003 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Wed Nov 12 09:34:58 2003 Subject: [Spambayes-checkins] spambayes/scripts sb_filter.py,1.4,1.5 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv17926 Modified Files: sb_filter.py Log Message: Allow multiple types of mailboxes to be processed using mboxutils.getmbox. If any mailbox files are given on the command line, the output is always a Unix-style mailbox containing From_ lines. Index: sb_filter.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_filter.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sb_filter.py 15 Oct 2003 05:02:08 -0000 1.4 --- sb_filter.py 12 Nov 2003 14:34:50 -0000 1.5 *************** *** 15,21 **** ## ! """Usage: %(program)s [OPTION]... ! [OPTION] is one of: -h show usage and exit --- 15,21 ---- ## ! """Usage: %(program)s [options] [filenames] ! Options can one or more of: -h show usage and exit *************** *** 46,49 **** --- 46,73 ---- All options marked with '*' operate on stdin. Only those processing options marked with '+' send a modified message to stdout. + + If no filenames are given on the command line, standard input will be + processed as a single message. If one or more filenames are given on the + command line, each will be processed according to the following rules: + + * If the filename is '-', standard input will be processed as a single + message (may only be usefully given once). + + * If the filename starts with '+' it will be processed as an MH folder. + + * If the filename is a directory and it contains a subdirectory named + 'cur', it will be processed as a Maildir. + + * If the filename is a directory and it contains a subdirectory named + 'Mail', it will be processed as an MH Mailbox. + + * If the filename is a directory and not a Maildir nor an MH Mailbox, it + will be processed as a Mailbox directory consisting of just .txt and + .lorien files. + + * Otherwise, the filename is treated as a Unix-style mailbox (messages + begin on a line starting with 'From '). + + Output is always to standard output as a Unix-style mailbox. """ *************** *** 195,202 **** actions = [h.filter] ! msg = mboxutils.get_message(sys.stdin) ! for action in actions: ! action(msg) ! sys.stdout.write(msg.as_string(unixfrom=(msg.get_unixfrom() is not None))) if __name__ == "__main__": --- 219,234 ---- actions = [h.filter] ! if not args: ! args = ["-"] ! for fname in args: ! mbox = mboxutils.getmbox(fname) ! for msg in mbox: ! for action in actions: ! action(msg) ! if args == ["-"]: ! unixfrom = msg.get_unixfrom() is not None ! else: ! unixfrom = True ! sys.stdout.write(msg.as_string(unixfrom=unixfrom)) if __name__ == "__main__": From montanaro at users.sourceforge.net Wed Nov 12 17:01:41 2003 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Wed Nov 12 17:01:48 2003 Subject: [Spambayes-checkins] spambayes/spambayes OptionsClass.py,1.14,1.15 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv18827 Modified Files: OptionsClass.py Log Message: Add set_from_cmdline(). See sb_filter.py for simple usage example. Index: OptionsClass.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/OptionsClass.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** OptionsClass.py 6 Nov 2003 22:01:23 -0000 1.14 --- OptionsClass.py 12 Nov 2003 22:01:39 -0000 1.15 *************** *** 575,578 **** --- 575,618 ---- (sect, opt, val, type(val))) + def set_from_cmdline(self, arg, stream=None): + """Set option from colon-separated sect:opt:val string. + + If optional stream arg is not None, error messages will be displayed + on stream, otherwise KeyErrors will be propagated up the call chain. + """ + sect, opt, val = arg.split(':', 2) + try: + val = self.convert(sect, opt, val) + except (KeyError, TypeError), msg: + if stream is not None: + self._report_option_error(sect, opt, val, stream, msg) + else: + raise + else: + self.set(sect, opt, val) + + def _report_option_error(self, sect, opt, val, stream, msg): + import textwrap + if sect in self.sections(): + vopts = self.options(True) + vopts = [v.split(']', 1)[1] for v in vopts + if v.startswith('[%s]'%sect)] + if opt not in vopts: + print >> stream, "Invalid option:", opt + print >> stream, "Valid options for", sect, "are:" + vopts = ', '.join(vopts) + vopts = textwrap.wrap(vopts) + for line in vopts: + print >> stream, ' ', line + else: + print >> stream, "Invalid value:", msg + else: + print >> stream, "Invalid section:", sect + print >> stream, "Valid sections are:" + vsects = ', '.join(self.sections()) + vsects = textwrap.wrap(vsects) + for line in vsects: + print >> stream, ' ', line + def __setitem__(self, key, value): self.set(key[0], key[1], value) From montanaro at users.sourceforge.net Wed Nov 12 17:02:58 2003 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Wed Nov 12 17:03:06 2003 Subject: [Spambayes-checkins] spambayes/scripts sb_filter.py,1.5,1.6 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv19095 Modified Files: sb_filter.py Log Message: add -o/--option command line arg that allows user to set any options database value from the command line Index: sb_filter.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_filter.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sb_filter.py 12 Nov 2003 14:34:50 -0000 1.5 --- sb_filter.py 12 Nov 2003 22:02:55 -0000 1.6 *************** *** 44,47 **** --- 44,50 ---- this message) + -o section:option:value + set [section, option] in the options database to value + All options marked with '*' operate on stdin. Only those processing options marked with '+' send a modified message to stdout. *************** *** 183,188 **** h = HammieFilter() actions = [] ! opts, args = getopt.getopt(sys.argv[1:], 'hxd:D:nfgstGS', ! ['help', 'examples']) create_newdb = False for opt, arg in opts: --- 186,191 ---- h = HammieFilter() actions = [] ! opts, args = getopt.getopt(sys.argv[1:], 'hxd:D:nfgstGSo:', ! ['help', 'examples', 'option=']) create_newdb = False for opt, arg in opts: *************** *** 191,194 **** --- 194,199 ---- elif opt in ('-x', '--examples'): examples() + elif opt in ('-o', '--option'): + Options.options.set_from_cmdline(arg, sys.stderr) elif opt == '-d': h.usedb = True From richiehindle at users.sourceforge.net Sat Nov 15 10:59:02 2003 From: richiehindle at users.sourceforge.net (Richie Hindle) Date: Sat Nov 15 10:59:06 2003 Subject: [Spambayes-checkins] spambayes README.txt,1.58,1.59 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv19629 Modified Files: README.txt Log Message: Correct installation instructions from "setup.py install" to "python setup.py install" to accommodate Win9x users and Unix users without execute permission on setup.py. Patch 842464 - thanks to Jeff Bauer. Bugfix candidate. Index: README.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/README.txt,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** README.txt 5 Nov 2003 12:50:13 -0000 1.58 --- README.txt 15 Nov 2003 15:59:00 -0000 1.59 *************** *** 76,83 **** ============ ! The first thing you need to do is run "setup.py install" in the directory ! that you expanded the SpamBayes archive into. This will install all the ! files that you need into the correct locations. After this, you can ! delete that directory; it is no longer required. Before you begin --- 76,83 ---- ============ ! The first thing you need to do is run "python setup.py install" in the ! directory that you expanded the SpamBayes archive into. This will install ! all the files that you need into the correct locations. After this, you ! can delete that directory; it is no longer required. Before you begin From anthonybaxter at users.sourceforge.net Sun Nov 16 07:01:34 2003 From: anthonybaxter at users.sourceforge.net (Anthony Baxter) Date: Sun Nov 16 07:01:38 2003 Subject: [Spambayes-checkins] website windows.ht,1.28,1.29 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1:/tmp/cvs-serv2500 Modified Files: windows.ht Log Message: note that windows works for OL2003 Index: windows.ht =================================================================== RCS file: /cvsroot/spambayes/website/windows.ht,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** windows.ht 9 Sep 2003 03:08:42 -0000 1.28 --- windows.ht 16 Nov 2003 12:01:30 -0000 1.29 *************** *** 8,12 **** and for all other mail clients !

Outlook 2000/Outlook XP

Latest Release

--- 8,12 ---- and for all other mail clients !

Outlook 2003/2000/XP

Latest Release

From npickett at users.sourceforge.net Mon Nov 17 16:47:49 2003 From: npickett at users.sourceforge.net (Neale Pickett) Date: Mon Nov 17 16:47:54 2003 Subject: [Spambayes-checkins] spambayes/scripts sb_filter.py, 1.6, 1.7 sb_mboxtrain.py, 1.6, 1.7 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv15297/scripts Modified Files: sb_filter.py sb_mboxtrain.py Log Message: * s/hammie/sb_filter/ * Contrib file cleanup (more bomb-proof) * sb_filter options cleanup * sb_mboxtrain bombproofing (won't try to write out messages if it can't parse them) Index: sb_filter.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_filter.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sb_filter.py 12 Nov 2003 22:02:55 -0000 1.6 --- sb_filter.py 17 Nov 2003 21:47:47 -0000 1.7 *************** *** 28,40 **** -n create a new database ! *+ -f filter (default if no processing options are given) ! *+ -t ! [EXPERIMENTAL] filter and train based on the result (you must ! make sure to untrain all mistakes later) ! *+ -g [EXPERIMENTAL] (re)train as a good (ham) message ! *+ -s [EXPERIMENTAL] (re)train as a bad (spam) message * -G [EXPERIMENTAL] untrain ham (only use if you've already trained --- 28,40 ---- -n create a new database ! * -f filter (default if no processing options are given) ! * -g [EXPERIMENTAL] (re)train as a good (ham) message ! * -s [EXPERIMENTAL] (re)train as a bad (spam) message + * -t + [EXPERIMENTAL] filter and train based on the result -- you must + make sure to untrain all mistakes later. Not recommended. * -G [EXPERIMENTAL] untrain ham (only use if you've already trained *************** *** 47,52 **** set [section, option] in the options database to value ! All options marked with '*' operate on stdin. Only those processing options ! marked with '+' send a modified message to stdout. If no filenames are given on the command line, standard input will be --- 47,52 ---- set [section, option] in the options database to value ! All options marked with '*' operate on stdin, and write the resultant ! message to stdout. If no filenames are given on the command line, standard input will be Index: sb_mboxtrain.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_mboxtrain.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sb_mboxtrain.py 26 Sep 2003 18:17:44 -0000 1.6 --- sb_mboxtrain.py 17 Nov 2003 21:47:47 -0000 1.7 *************** *** 33,37 **** -q quiet mode; no output ! -n train mail residing in "new" directory, in addition to "cur" directory, which is always trained (Maildir only) --- 33,37 ---- -q quiet mode; no output ! -n train mail residing in "new" directory, in addition to "cur" directory, which is always trained (Maildir only) *************** *** 46,51 **** True, False = 1, 0 ! import sys, os, getopt ! from spambayes import hammie, mboxutils from spambayes.Options import options --- 46,51 ---- True, False = 1, 0 ! import sys, os, getopt, email ! from spambayes import hammie from spambayes.Options import options *************** *** 53,56 **** --- 53,76 ---- loud = True + def get_message(obj): + """Return an email Message object. + + This works like mboxutis.get_message, except it doesn't junk the + headers if there's an error. Doing so would cause a headerless + message to be written back out! + + """ + + if isinstance(obj, email.Message.Message): + return obj + # Create an email Message object. + if hasattr(obj, "read"): + obj = obj.read() + try: + msg = email.message_from_string(obj) + except email.Errors.MessageParseError: + msg = None + return msg + def msg_train(h, msg, is_spam, force): """Train bayes with a single message.""" *************** *** 110,115 **** sys.stdout.flush() f = file(cfn, "rb") ! msg = mboxutils.get_message(f) f.close() if not msg_train(h, msg, is_spam, force): continue --- 130,138 ---- sys.stdout.flush() f = file(cfn, "rb") ! msg = get_message(f) f.close() + if not msg: + print "Malformed message: %s. Skipping..." % cfn + continue if not msg_train(h, msg, is_spam, force): continue *************** *** 143,147 **** f = file(path, "r+b") fcntl.flock(f, fcntl.LOCK_EX) ! mbox = mailbox.PortableUnixMailbox(f, mboxutils.get_message) outf = os.tmpfile() --- 166,170 ---- f = file(path, "r+b") fcntl.flock(f, fcntl.LOCK_EX) ! mbox = mailbox.PortableUnixMailbox(f, get_message) outf = os.tmpfile() *************** *** 150,153 **** --- 173,179 ---- for msg in mbox: + if not msg: + print "Malformed message number %d. I can't train on this mbox, sorry." % counter + return counter += 1 if loud and counter % 10 == 0: *************** *** 204,209 **** sys.stdout.flush() f = file(fn, "rb") ! msg = mboxutils.get_message(f) f.close() msg_train(h, msg, is_spam, force) trained += 1 --- 230,238 ---- sys.stdout.flush() f = file(fn, "rb") ! msg = get_message(f) f.close() + if not msg: + print "Malformed message: %s. Skipping..." % cfn + continue msg_train(h, msg, is_spam, force) trained += 1 From npickett at users.sourceforge.net Mon Nov 17 16:47:49 2003 From: npickett at users.sourceforge.net (Neale Pickett) Date: Mon Nov 17 16:47:56 2003 Subject: [Spambayes-checkins] spambayes README.txt,1.59,1.60 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv15297 Modified Files: README.txt Log Message: * s/hammie/sb_filter/ * Contrib file cleanup (more bomb-proof) * sb_filter options cleanup * sb_mboxtrain bombproofing (won't try to write out messages if it can't parse them) Index: README.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/README.txt,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** README.txt 15 Nov 2003 15:59:00 -0000 1.59 --- README.txt 17 Nov 2003 21:47:47 -0000 1.60 *************** *** 186,190 **** (Replace the latter with the location of the .hammiedb file that ! hammiefilter created in the first step). Once you've trained SpamBayes on your --- 186,190 ---- (Replace the latter with the location of the .hammiedb file that ! sb_filter created in the first step). Once you've trained SpamBayes on your *************** *** 203,209 **** will still complain if you don't specify a lock file.) ! The result of running hammie.py in filter mode is that Procmail will use the output from the run as the mail message for further processing downstream. ! hammie.py inserts an X-SpamBayes-Classification header in the output message which looks like: --- 203,209 ---- will still complain if you don't specify a lock file.) ! The result of running sb_filter.py in filter mode is that Procmail will use the output from the run as the mail message for further processing downstream. ! sb_filter.py inserts an X-SpamBayes-Classification header in the output message which looks like: *************** *** 223,227 **** unsure ! The first recipe catches all messages which hammie.py classified as spam. The second catches all messages about which it was unsure. The combination allows you to isolate spam from your good mail and tuck away messages it was --- 223,227 ---- unsure ! The first recipe catches all messages which sb_filter.py classified as spam. The second catches all messages about which it was unsure. The combination allows you to isolate spam from your good mail and tuck away messages it was From npickett at users.sourceforge.net Mon Nov 17 16:47:49 2003 From: npickett at users.sourceforge.net (Neale Pickett) Date: Mon Nov 17 16:47:58 2003 Subject: [Spambayes-checkins] spambayes/contrib muttrc, 1.4, 1.5 spambayes.el, 1.5, 1.6 Message-ID: Update of /cvsroot/spambayes/spambayes/contrib In directory sc8-pr-cvs1:/tmp/cvs-serv15297/contrib Modified Files: muttrc spambayes.el Log Message: * s/hammie/sb_filter/ * Contrib file cleanup (more bomb-proof) * sb_filter options cleanup * sb_mboxtrain bombproofing (won't try to write out messages if it can't parse them) Index: muttrc =================================================================== RCS file: /cvsroot/spambayes/spambayes/contrib/muttrc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** muttrc 15 Oct 2003 05:02:08 -0000 1.4 --- muttrc 17 Nov 2003 21:47:47 -0000 1.5 *************** *** 21,28 **** ## helping out with the muttisms. ## ! macro index S "|sb_filter.py -s | procmail\n" ! macro pager S "|sb_filter.py -s | procmail\n" ! macro index H "|sb_filter.py -g | procmail\n" ! macro pager H "|sb_filter.py -g | procmail\n" color index red black "~h 'X-Spambayes-Disposition: spam' ~F" --- 21,28 ---- ## helping out with the muttisms. ## ! macro index S "|sb_filter.py -s -f | procmail\n" ! macro pager S "|sb_filter.py -s -f | procmail\n" ! macro index H "|sb_filter.py -g -f | procmail\n" ! macro pager H "|sb_filter.py -g -f | procmail\n" color index red black "~h 'X-Spambayes-Disposition: spam' ~F" *************** *** 33,38 **** ## forever. ## ! #macro index S "|sb_filter.py -s | procmail\n" ! #macro pager S "|sb_filter.py -s | procmail\n" ! #macro index H "|sb_filter.py -g | procmail\n" ! #macro pager H "|sb_filter.py -g | procmail\n" --- 33,38 ---- ## forever. ## ! #macro index S "|sb_filter.py -s -f | procmail\n" ! #macro pager S "|sb_filter.py -s -f | procmail\n" ! #macro index H "|sb_filter.py -g -f | procmail\n" ! #macro pager H "|sb_filter.py -g -f | procmail\n" Index: spambayes.el =================================================================== RCS file: /cvsroot/spambayes/spambayes/contrib/spambayes.el,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** spambayes.el 15 Oct 2003 05:02:08 -0000 1.5 --- spambayes.el 17 Nov 2003 21:47:47 -0000 1.6 *************** *** 1,5 **** ;; spambayes.el -- integrate spambayes into Gnus and VM ;; Copyright (C) 2003 Neale Pickett ! ;; Time-stamp: <2003-10-14 21:59:11 neale> ;; This is free software; you can redistribute it and/or modify it under --- 1,5 ---- ;; spambayes.el -- integrate spambayes into Gnus and VM ;; Copyright (C) 2003 Neale Pickett ! ;; Time-stamp: <2003-11-17 11:49:29 neale> ;; This is free software; you can redistribute it and/or modify it under *************** *** 32,37 **** ;; (define-key gnus-summary-mode-map [(B) (h)] 'spambayes-gnus-refile-as-ham))) ;; ! ;; In summary mode, "B h" will refile a message as ham, and "B s", ! ;; appropriately enough, will refile a message as spam. ;; ;; --- 32,39 ---- ;; (define-key gnus-summary-mode-map [(B) (h)] 'spambayes-gnus-refile-as-ham))) ;; ! ;; In summary mode, "B h" will train a message as ham and refile, and "B ! ;; s", appropriately enough, will train a message as spam and refile. ! ;; If you misfile something, simply locate it again and refile ! ;; it--sb_filter will know that you're retraining the message. ;; ;; *************** *** 118,132 **** (with-temp-buffer (gnus-request-article-this-buffer n group) ! (shell-command-on-region ! (point-min) ! (point-max) ! (concat ! spambayes-filter-program ! (if is-spam " -s" " -g") ! " -f") ! (current-buffer) ! t) ! (gnus-request-replace-article n group (current-buffer))) ! (message "Retrained article."))) (let ((group gnus-newsgroup-name) (list gnus-newsgroup-processable)) --- 120,137 ---- (with-temp-buffer (gnus-request-article-this-buffer n group) ! (cond ! ((zerop (shell-command-on-region ! (point-min) ! (point-max) ! (concat ! spambayes-filter-program ! (if is-spam " -s" " -g") ! " -f") ! (current-buffer) ! t)) ! (gnus-request-replace-article n group (current-buffer)) ! (message "Retrained article.")) ! (t ! (message "Unable to parse article--leaving it alone.")))))) (let ((group gnus-newsgroup-name) (list gnus-newsgroup-processable)) From montanaro at users.sourceforge.net Wed Nov 19 21:45:22 2003 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Wed Nov 19 21:45:27 2003 Subject: [Spambayes-checkins] spambayes/contrib README,NONE,1.1 Message-ID: Update of /cvsroot/spambayes/spambayes/contrib In directory sc8-pr-cvs1:/tmp/cvs-serv12078 Added Files: README Log Message: describe contents --- NEW FILE: README --- Directory Contents ------------------ nway.py - demonstration script which can be used to perform n-way classification. nway-train.py - training script to use with nway.py. SmarterHTTPServer.py - ??? bulkgraph.py, bulktrain.sh, procmailrc - see BULK.txt. spambayes.el - Emacs Lisp code to integrate SpamBayes into the Gnus and VM mail readers. muttrc - Mutt key bindings for SpamBayes. mod_spambayes.py - Plugin for Amit Patel's proxy3 web proxy. mkzip.py - ??? spamcounts.py - print spam and ham counts and spam probability for a messages for for select tokens From montanaro at users.sourceforge.net Wed Nov 19 21:46:21 2003 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Wed Nov 19 21:46:25 2003 Subject: [Spambayes-checkins] spambayes/contrib spamcounts.py,NONE,1.1 Message-ID: Update of /cvsroot/spambayes/spambayes/contrib In directory sc8-pr-cvs1:/tmp/cvs-serv12305 Added Files: spamcounts.py Log Message: print spam counts for select tokens or a message --- NEW FILE: spamcounts.py --- #!/usr/bin/env python """ Check spamcounts for various tokens or patterns usage %(prog)s [ -h ] [ -r ] [ -d db ] [ -p ] [ -t ] [ -z ] ... -h - print this documentation and exit. -r - treat tokens as regular expressions - may not be used with -t -d db - use db instead of the default found in the options file -p - db is actually a pickle -t - read message from stdin, tokenize it, then display their counts may not be used with -r """ from __future__ import division import sys import getopt import re import sets import os import shelve import pickle import csv from spambayes.Options import options from spambayes.tokenizer import tokenize prog = sys.argv[0] def usage(msg=None): if msg is not None: print >> sys.stderr, msg print >> sys.stderr, __doc__.strip() % globals() # From msgs on spambayes mailing list, spam prob is calculated thusly: ## hc = ham token count ## nh = total number of ham messages ## sc = spam token count ## ns = total number of spam messages ## hr = ham ratio = hc / nh ## sr = spam ratio = sc / ns ## p = base spam probability = sr / (sr + hr) ## S = unknown word strength (static factor = 0.45 by default) ## x = unknown word probability (static factor = 0.5 by default) ## n = total number of messages the token appeared in = hc + sc ## sp = final spam probability = ((S * x) + (n * p)) / (S + n) def print_spamcounts(tokens, db, use_re): if use_re: s = sets.Set() keys = db.keys() for pat in tokens: for k in keys: if re.search(pat, k) is not None: s.add(k) tokens = list(s) S = options["Classifier", "unknown_word_strength"] x = options["Classifier", "unknown_word_prob"] _, ns, nh = db["saved state"] writer = csv.writer(sys.stdout) writer.writerow(("token", "nspam", "nham", "spam prob")) seen = sets.Set() for t in tokens: if t in seen: continue seen.add(t) sc, hc = db.get(t, (0, 0)) if sc == hc == 0: continue hr = hc / nh sr = sc / ns p = sr / (sr + hr) n = hc + sc sp = ((S * x) + (n * p)) / (S + n) writer.writerow((t, sc, hc, sp)) def main(args): try: opts, args = getopt.getopt(args, "hrd:t", ["help", "re", "database=", "pickle", "tokenize"]) except getopt.GetoptError, msg: usage(msg) return 1 usere = False dbname = options["Storage", "persistent_storage_file"] ispickle = False tokenizestdin = False for opt, arg in opts: if opt in ("-h", "--help"): usage() return 0 elif opt in ("-d", "--database"): dbname = arg elif opt in ("-r", "--re"): usere = True elif opt in ("-p", "--pickle"): ispickle = True elif opt in ("-t", "--tokenize"): tokenizestdin = True if usere and tokenizestdin: usage("-r and -t may not be used at the same time") return 1 dbname = os.path.expanduser(dbname) print >> sys.stderr, "db:", dbname if ispickle: db = pickle.load(file(dbname)) else: db = shelve.open(dbname, flag='r') if tokenizestdin: args = tokenize(sys.stdin) if args: print_spamcounts(args, db, usere) return 0 else: usage("need tokens on cmd line or -t w/ msg on stdin") return 1 if __name__ == "__main__": sys.exit(main(sys.argv[1:])) From montanaro at users.sourceforge.net Wed Nov 19 21:50:05 2003 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Wed Nov 19 21:50:08 2003 Subject: [Spambayes-checkins] spambayes/contrib spamcounts.py,1.1,1.2 Message-ID: Update of /cvsroot/spambayes/spambayes/contrib In directory sc8-pr-cvs1:/tmp/cvs-serv12869 Modified Files: spamcounts.py Log Message: oops - no -z flag Index: spamcounts.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/contrib/spamcounts.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** spamcounts.py 20 Nov 2003 02:46:19 -0000 1.1 --- spamcounts.py 20 Nov 2003 02:50:03 -0000 1.2 *************** *** 4,8 **** Check spamcounts for various tokens or patterns ! usage %(prog)s [ -h ] [ -r ] [ -d db ] [ -p ] [ -t ] [ -z ] ... -h - print this documentation and exit. --- 4,8 ---- Check spamcounts for various tokens or patterns ! usage %(prog)s [ -h ] [ -r ] [ -d db ] [ -p ] [ -t ] ... -h - print this documentation and exit. From montanaro at users.sourceforge.net Mon Nov 24 20:29:55 2003 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Mon Nov 24 20:29:59 2003 Subject: [Spambayes-checkins] spambayes/testtools Makefile,NONE,1.1 Message-ID: Update of /cvsroot/spambayes/spambayes/testtools In directory sc8-pr-cvs1:/tmp/cvs-serv4658 Added Files: Makefile Log Message: A makefile (requires GNU make) that makes it easier to run timcv to compare the effect of different configurations. The comment at the top describes typical usage and assumptions embodied in the file. --- NEW FILE: Makefile --- # # GNU Makefile to make it easy to run timcv. # # To use, create a pair of SpamBayes config files, e.g., std.ini and # trial.ini, then execute # # make BASE=std TRIAL=trial # # The final output will be in std-trial.txt. # # Since the default value for BASE and TRIAL are "std" and "trial", # respectively, the above can be abbreviated to # # make # # If you want to compare multiple trial configurations against a single # standard configuration, execute (for example): # # make TRIAL=trial1 # make TRIAL=trial2 # # (assuming your baseline configuration is in std.ini). The Makefile will # avoid running timcv.py against the standard configuration unnecessarily, # speeding things up a bit. # # This Makefile assumes the availability of GNU make. It uses both the # $(shell ...) and $(wildcard ...) constructs. It also assumes your # SpamBayes source tree is rooted at ~/src/spambayes. # SBDIR=$(HOME)/src/spambayes TIMCV=$(SBDIR)/testtools/timcv.py RATE=$(SBDIR)/testtools/rates.py CMP=$(SBDIR)/testtools/cmp.py NDIR=$(shell ls -d Data/Ham/Set* | wc -l) BASE=std TRIAL=trial DATA=$(wildcard Data/Ham/* Data/Spam/*) all : $(BASE)-$(TRIAL).txt $(BASE)-$(TRIAL).txt : $(BASE)s.txt $(TRIAL)s.txt python $(CMP) $(BASE)s.txt $(TRIAL)s.txt > $(BASE)-$(TRIAL).txt $(BASE)s.txt : $(BASE).txt python $(RATE) $(BASE) $(TRIAL)s.txt : $(TRIAL).txt python $(RATE) $(TRIAL) $(BASE).txt : $(BASE).ini $(DATA) BAYESCUSTOMIZE=$(BASE).ini python $(TIMCV) -n $(NDIR) -s 12345 > $(BASE).txt $(TRIAL).txt : $(TRIAL).ini $(DATA) BAYESCUSTOMIZE=$(TRIAL).ini python $(TIMCV) -n $(NDIR) -s 12345 > $(TRIAL).txt clean : FORCE rm -f $(BASE)-$(TRIAL).txt $(BASE)*.txt $(TRIAL)*.txt FORCE : From bwarsaw at users.sourceforge.net Mon Nov 24 22:55:58 2003 From: bwarsaw at users.sourceforge.net (Barry A. Warsaw) Date: Tue Nov 25 01:29:40 2003 Subject: [Spambayes-checkins] spambayes setup.py,1.27,1.28 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv28524 Modified Files: setup.py Log Message: Added scripts/sb_evoscore.py. Index: setup.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/setup.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** setup.py 26 Sep 2003 06:12:13 -0000 1.27 --- setup.py 25 Nov 2003 03:55:56 -0000 1.28 *************** *** 76,79 **** --- 76,80 ---- scripts=['scripts/sb_client.py', 'scripts/sb_dbexpimp.py', + 'scripts/sb_evoscore.py', 'scripts/sb_filter.py', 'scripts/sb_imapfilter.py', From montanaro at users.sourceforge.net Mon Nov 24 21:03:05 2003 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Tue Nov 25 01:29:42 2003 Subject: [Spambayes-checkins] spambayes/testtools Makefile,1.1,1.2 Message-ID: Update of /cvsroot/spambayes/spambayes/testtools In directory sc8-pr-cvs1:/tmp/cvs-serv10112 Modified Files: Makefile Log Message: A bit more parameterization. The timcv seed (SEED) and the python executable (PYTHON) are malleable on the command line. Index: Makefile =================================================================== RCS file: /cvsroot/spambayes/spambayes/testtools/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 25 Nov 2003 01:29:52 -0000 1.1 --- Makefile 25 Nov 2003 02:03:03 -0000 1.2 *************** *** 30,41 **** # ! SBDIR=$(HOME)/src/spambayes ! TIMCV=$(SBDIR)/testtools/timcv.py ! RATE=$(SBDIR)/testtools/rates.py ! CMP=$(SBDIR)/testtools/cmp.py ! NDIR=$(shell ls -d Data/Ham/Set* | wc -l) ! BASE=std ! TRIAL=trial DATA=$(wildcard Data/Ham/* Data/Spam/*) --- 30,45 ---- # ! SBDIR = $(HOME)/src/spambayes ! PYTHON = python ! TIMCV = $(PYTHON) $(SBDIR)/testtools/timcv.py ! RATE = $(PYTHON) $(SBDIR)/testtools/rates.py ! CMP = $(PYTHON) $(SBDIR)/testtools/cmp.py ! NDIR = $(shell ls -d Data/Ham/Set* | wc -l) ! ! SEED = 12345 ! ! BASE = std ! TRIAL = trial DATA=$(wildcard Data/Ham/* Data/Spam/*) *************** *** 44,60 **** $(BASE)-$(TRIAL).txt : $(BASE)s.txt $(TRIAL)s.txt ! python $(CMP) $(BASE)s.txt $(TRIAL)s.txt > $(BASE)-$(TRIAL).txt $(BASE)s.txt : $(BASE).txt ! python $(RATE) $(BASE) $(TRIAL)s.txt : $(TRIAL).txt ! python $(RATE) $(TRIAL) $(BASE).txt : $(BASE).ini $(DATA) ! BAYESCUSTOMIZE=$(BASE).ini python $(TIMCV) -n $(NDIR) -s 12345 > $(BASE).txt $(TRIAL).txt : $(TRIAL).ini $(DATA) ! BAYESCUSTOMIZE=$(TRIAL).ini python $(TIMCV) -n $(NDIR) -s 12345 > $(TRIAL).txt clean : FORCE --- 48,64 ---- $(BASE)-$(TRIAL).txt : $(BASE)s.txt $(TRIAL)s.txt ! $(CMP) $(BASE)s.txt $(TRIAL)s.txt > $(BASE)-$(TRIAL).txt $(BASE)s.txt : $(BASE).txt ! $(RATE) $(BASE) $(TRIAL)s.txt : $(TRIAL).txt ! $(RATE) $(TRIAL) $(BASE).txt : $(BASE).ini $(DATA) ! BAYESCUSTOMIZE=$(BASE).ini $(TIMCV) -n $(NDIR) -s $(SEED) > $(BASE).txt $(TRIAL).txt : $(TRIAL).ini $(DATA) ! BAYESCUSTOMIZE=$(TRIAL).ini $(TIMCV) -n $(NDIR) -s $(SEED) > $(TRIAL).txt clean : FORCE From bwarsaw at users.sourceforge.net Mon Nov 24 22:52:25 2003 From: bwarsaw at users.sourceforge.net (Barry A. Warsaw) Date: Tue Nov 25 01:29:45 2003 Subject: [Spambayes-checkins] spambayes/scripts sb_evoscore.py,NONE,1.1 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv27975 Added Files: sb_evoscore.py Log Message: A shim script between sb_xmlrpcserver.py and Ximian Evolution. The docstring is way longer than the code. ;) --- NEW FILE: sb_evoscore.py --- #! /usr/bin/env python # Copyright (C) 2003 Python Software Foundation; All Rights Reserved # # Licensed under the Python Software Foundation License, which you should have # received as part of the Spambayes distribution. # # Author: Barry Warsaw """A shim for integrating Spambayes and Ximian Evolution. Evolution is a free email client for Linux and Solaris, developed by Ximian. See www.ximian.com for details. Evolution is sometimes called 'Evo' for short. Actually Evo is more than that -- you can think of it as an Outlook-alike for Linux -- but all we care about here is the mail reader. Evo can connect to a POP or IMAP server, so you can of course use Spambayes' normal POP or IMAP filters. For a variety of reasons, I don't like hooking things up this way. In Evo, you can specify filters which run on folders whenever a message shows up in that folder. The filter can have any number of criteria, and if the criteria match, Evo will execute some number of actions. One of the things a filter can do is pipe the message to a program's standard in, and then check the exit code of that program. That's how we'll hook things together. You'll need to start sb_xmlrpcserver.py, as this script is a client of that server. You'll use sb_imapfilter.py to train a database on the machine local to your Evo client (yes, if you use many different workstations, you'll need your database on all of them). sb_evoscore.py takes the message from standard in, sends it to the xmlrpc server and receives the float spam score for the message. Then it compares this to your ham_cutoff and spam_cutoff options. It exits with a return code that your Evo filter will check. The return codes are: -1 - Error 0 - Ham 1 - Unsure 2 - Spam So, to hook things up do the following: - In Evo, go to Tools -> Filters... to bring up the filter rules - Select 'incoming' as the filter rule direction - Add a new filter rule called 'Spambayes Spam' - Select 'Pipe Message to Shell Command' as the first and only criteria. Point the command at this script, e.g. /usr/local/bin/sb_evoscore.py - Select the match criteria to be 'returns 2' - In the 'Then' section, select what you want to have happen for Spam. Personally, I have a folder called SBInbox, and inside that folder I have four subfolders: HamTrain, SpamTrain, Spam, and Unsure. My action for the 'Spambayes Spam' filter is then 'Move to Folder SBInbox/Spam'. - Now do the same thing with a second filter rule called 'Spambayes Unsure', except this time, match a return value of 1, and move these messages to SBInbox/Unsure. - Finally, make sure Evo will run filters automatically when your inbox receives new messages. Now, what I do is throw a bunch of known ham in SBInbox/HamTrain and a bunch of known spam in SBInbox/SpamTrain. I use 'sb_imapfilter -t -v -p' to train a database on my local machine. Then I start up sb_xmlrpcserver.py. NOTE: you must edit the variable RPCURL below to match how you invoke sb_xmlrpcserver.py. For a while, I watch the Unsure folder, moving mistakes to SpamTrain and HamTrain respectively. Every once in a while, I retrain my database, and copy my database to all my other desktops. One caveat: I've found that if I kill the xmlrpc server while Evo is still running, it can cause Evo to hang, choke, or start spewing endless error messages. It's best to exit Evo before killing sb_xmlrpcserver.py. """ import sys import xmlrpclib from spambayes.Options import options RPCURL = 'http://localhost:8881' def main(): msg = sys.stdin.read() try: server = xmlrpclib.ServerProxy(RPCURL) score = server.score(msg) except: import traceback traceback.print_exc() return -1 else: if score < options['Categorization', 'ham_cutoff']: return 0 elif score < options['Categorization', 'spam_cutoff']: return 1 return 2 status = main() sys.exit(status) From bwarsaw at users.sourceforge.net Mon Nov 24 22:58:16 2003 From: bwarsaw at users.sourceforge.net (Barry A. Warsaw) Date: Tue Nov 25 03:35:16 2003 Subject: [Spambayes-checkins] spambayes/scripts sb_xmlrpcserver.py,1.2,1.3 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv28804 Modified Files: sb_xmlrpcserver.py Log Message: Make sure that the socket being bound is reusable. Change XMLHammie.score() so that the float score is returned directly instead of trying to be wrapped in a Binary object. The latter won't work since Binary's expect a string buffer, and besides XMLRPC supports floats directly. Index: sb_xmlrpcserver.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_xmlrpcserver.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sb_xmlrpcserver.py 24 Sep 2003 06:38:30 -0000 1.2 --- sb_xmlrpcserver.py 25 Nov 2003 03:58:14 -0000 1.3 *************** *** 22,30 **** import os - import SimpleXMLRPCServer import getopt import sys import traceback import xmlrpclib from spambayes import hammie, Options --- 22,30 ---- import os import getopt import sys import traceback import xmlrpclib + import SimpleXMLRPCServer from spambayes import hammie, Options *************** *** 38,41 **** --- 38,45 ---- + class ReusableSimpleXMLRPCServer(SimpleXMLRPCServer.SimpleXMLRPCServer): + allow_reuse_address = True + + program = sys.argv[0] # For usage(); referenced by docstring above *************** *** 46,50 **** except AttributeError: pass ! return xmlrpclib.Binary(hammie.Hammie.score(self, msg, *extra)) def filter(self, msg, *extra): --- 50,54 ---- except AttributeError: pass ! return hammie.Hammie.score(self, msg, *extra) def filter(self, msg, *extra): *************** *** 94,99 **** h = XMLHammie(bayes) ! server = SimpleXMLRPCServer.SimpleXMLRPCServer((ip, port), ! SimpleXMLRPCServer.SimpleXMLRPCRequestHandler) server.register_instance(h) server.serve_forever() --- 98,104 ---- h = XMLHammie(bayes) ! server = ReusableSimpleXMLRPCServer( ! (ip, port), ! SimpleXMLRPCServer.SimpleXMLRPCRequestHandler) server.register_instance(h) server.serve_forever() From bwarsaw at users.sourceforge.net Tue Nov 25 16:02:50 2003 From: bwarsaw at users.sourceforge.net (Barry A. Warsaw) Date: Tue Nov 25 16:02:53 2003 Subject: [Spambayes-checkins] spambayes/scripts sb_evoscore.py,1.1,1.2 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv22902 Modified Files: sb_evoscore.py Log Message: main(): Wrap the message in a binary, just in case there are unencoded binary characters in the message. Index: sb_evoscore.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_evoscore.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sb_evoscore.py 25 Nov 2003 03:52:23 -0000 1.1 --- sb_evoscore.py 25 Nov 2003 21:02:46 -0000 1.2 *************** *** 92,96 **** try: server = xmlrpclib.ServerProxy(RPCURL) ! score = server.score(msg) except: import traceback --- 92,96 ---- try: server = xmlrpclib.ServerProxy(RPCURL) ! score = server.score(xmlrpclib.Binary(msg)) except: import traceback From richiehindle at users.sourceforge.net Tue Nov 25 17:35:51 2003 From: richiehindle at users.sourceforge.net (Richie Hindle) Date: Tue Nov 25 17:35:56 2003 Subject: [Spambayes-checkins] spambayes/spambayes hammie.py,1.11,1.12 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv12289 Modified Files: hammie.py Log Message: Made sb_filter obey the notate_to and notate_subject options. Thanks to Tony and Hank for the patch. Index: hammie.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/hammie.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** hammie.py 18 Sep 2003 03:58:59 -0000 1.11 --- hammie.py 25 Nov 2003 22:35:49 -0000 1.12 *************** *** 119,122 **** --- 119,123 ---- if train: self.train(msg, is_spam, True) + basic_disp = disp disp += ("; %."+str(options["Headers", "header_score_digits"])+"f") % prob if options["Headers", "header_score_logarithm"]: *************** *** 131,134 **** --- 132,143 ---- del msg[header] msg.add_header(header, disp) + + # Obey notate_to and notate_subject. + for header in ('to', 'subject'): + if basic_disp in options["Headers", "notate_"+header]: + orig = msg[header] + del msg[header] + msg[header] = "%s,%s" % (basic_disp, orig) + if debug: disp = self.formatclues(clues) From richiehindle at users.sourceforge.net Tue Nov 25 18:11:20 2003 From: richiehindle at users.sourceforge.net (Richie Hindle) Date: Tue Nov 25 18:11:23 2003 Subject: [Spambayes-checkins] spambayes/spambayes message.py,1.40,1.41 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv19794 Modified Files: message.py Log Message: Patch 831388: Make message.py respect the header_score_digits option. Bugfix candidate (probably). Index: message.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/message.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** message.py 8 Oct 2003 04:04:35 -0000 1.40 --- message.py 25 Nov 2003 23:11:18 -0000 1.41 *************** *** 342,346 **** if options['Headers','include_score']: ! disp = str(prob) if options["Headers", "header_score_logarithm"]: if prob<=0.005 and prob>0.0: --- 342,346 ---- if options['Headers','include_score']: ! disp = ("%."+str(options["Headers", "header_score_digits"])+"f") % prob if options["Headers", "header_score_logarithm"]: if prob<=0.005 and prob>0.0: From richiehindle at users.sourceforge.net Tue Nov 25 18:57:01 2003 From: richiehindle at users.sourceforge.net (Richie Hindle) Date: Tue Nov 25 18:57:08 2003 Subject: [Spambayes-checkins] spambayes/spambayes UserInterface.py, 1.32, 1.33 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv29964 Modified Files: UserInterface.py Log Message: More robust code for parsing evidence headers. Copes with ';' and ': ' being part of a clue. Index: UserInterface.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/UserInterface.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** UserInterface.py 3 Oct 2003 02:37:10 -0000 1.32 --- UserInterface.py 25 Nov 2003 23:56:59 -0000 1.33 *************** *** 335,342 **** # classified. clues = [] ! evidence = mo.group(1).strip().split(';') ! for clue in evidence: ! word, prob = clue.strip().split(': ') ! clues.append((word.strip("'"), prob)) cluesTable = self._fillCluesTable(clues) --- 335,341 ---- # classified. clues = [] ! evidence = re.findall(r"'(.+?)': ([^;]+)(?:;|$)", mo.group(1)) ! for word, prob in evidence: ! clues.append((word, prob)) cluesTable = self._fillCluesTable(clues) From richiehindle at users.sourceforge.net Tue Nov 25 19:03:32 2003 From: richiehindle at users.sourceforge.net (Richie Hindle) Date: Tue Nov 25 19:03:37 2003 Subject: [Spambayes-checkins] spambayes/spambayes UserInterface.py, 1.33, 1.34 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv31368 Modified Files: UserInterface.py Log Message: More robust code for parsing score headers - copes with the presence of logarithms. Thanks to Mats Kindahl for the bug report and patch. Index: UserInterface.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/UserInterface.py,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** UserInterface.py 25 Nov 2003 23:56:59 -0000 1.33 --- UserInterface.py 26 Nov 2003 00:03:30 -0000 1.34 *************** *** 272,276 **** "evidence_header_name"]), re.DOTALL) ! sc_re = re.compile("%s:(.*)\n" % \ re.escape(options["Headers", "score_header_name"])) --- 272,276 ---- "evidence_header_name"]), re.DOTALL) ! sc_re = re.compile("%s:\s*([\d.]+)" % \ re.escape(options["Headers", "score_header_name"])) From anadelonbrin at users.sourceforge.net Tue Nov 25 19:12:46 2003 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Tue Nov 25 19:12:49 2003 Subject: [Spambayes-checkins] spambayes/scripts sb_dbexpimp.py,1.2,1.3 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv592/scripts Modified Files: sb_dbexpimp.py Log Message: Import/Export data as utf-8. Part of patch [ 824651 ] Japanese (and/or other CJK languages) message support Index: sb_dbexpimp.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_dbexpimp.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sb_dbexpimp.py 10 Sep 2003 04:33:17 -0000 1.2 --- sb_dbexpimp.py 26 Nov 2003 00:12:44 -0000 1.3 *************** *** 102,105 **** --- 102,114 ---- import sys, os, getopt, errno, re import urllib + from types import UnicodeType + + def uquote(s): + if isinstance(s, UnicodeType): + s = s.encode('utf-8') + return urllib.quote(s) + + def uunquote(s): + return unicode(urllib.unquote(s), 'utf-8') def runExport(dbFN, useDBM, outFN): *************** *** 132,136 **** hamcount = wi.hamcount spamcount = wi.spamcount ! word = urllib.quote(word) fp.write("%s`%s`%s`\n" % (word, hamcount, spamcount)) --- 141,145 ---- hamcount = wi.hamcount spamcount = wi.spamcount ! word = uquote(word) fp.write("%s`%s`%s`\n" % (word, hamcount, spamcount)) *************** *** 190,194 **** for line in lines: (word, hamcount, spamcount, junk) = re.split('`', line) ! word = urllib.unquote(word) try: --- 199,203 ---- for line in lines: (word, hamcount, spamcount, junk) = re.split('`', line) ! word = uunquote(word) try: From anadelonbrin at users.sourceforge.net Tue Nov 25 19:34:34 2003 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Tue Nov 25 19:34:41 2003 Subject: [Spambayes-checkins] spambayes/spambayes message.py,1.41,1.42 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv4950/spambayes Modified Files: message.py Log Message: Encode words in the evidence header as utf-8 if they are unicode. Part of patch [ 824651 ] Japanese (and/or other CJK languages) message support Index: message.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/message.py,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** message.py 25 Nov 2003 23:11:18 -0000 1.41 --- message.py 26 Nov 2003 00:34:32 -0000 1.42 *************** *** 101,104 **** --- 101,105 ---- import email.Message import email.Parser + import email.Header from spambayes import dbmstorage *************** *** 363,366 **** --- 364,370 ---- for word, score in clues: if (word[0] == '*' or score <= hco or score >= sco): + if isinstance(word, types.UnicodeType): + word = email.Header.Header(word, + charset='utf-8').encode() evd.append("%r: %.2f" % (word, score)) From anadelonbrin at users.sourceforge.net Tue Nov 25 20:13:04 2003 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Tue Nov 25 20:13:07 2003 Subject: [Spambayes-checkins] spambayes/spambayes dbmstorage.py,1.9,1.10 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv12660/spambayes Modified Files: dbmstorage.py Log Message: I believe this is the cause of quite a few bug reports recently. Because we now use whichdb to figure out what type of file the db is, rather than the open_best function, if we were using windows and python 2.2 we would try and use dbhash instead of db3hash, which (as I understand it) is a big bad thing. Fix this. This fixes the problem that can be reproduced (before this checkin) like this: start sb_server.py with fresh databases. stop sb_server.py try and start sb_server.py. you get a 'messageinfo db has no attribute db' traceback. (Bugfix candidate). Index: dbmstorage.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/dbmstorage.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dbmstorage.py 28 Oct 2003 16:19:08 -0000 1.9 --- dbmstorage.py 26 Nov 2003 01:13:02 -0000 1.10 *************** *** 52,55 **** --- 52,60 ---- # let the file tell us what db to use dbm_type = whichdb.whichdb(db_name) + # if we are using Windows and Python < 2.3, then we need to use + # db3hash, not dbhash. + if sys.platform == "win32" and sys.version_info < (2,3) and \ + dbm_type == "dbhash": + dbm_type = "db3hash" else: # fresh file - open with what the user specified From sjoerd at acm.org Wed Nov 26 05:39:56 2003 From: sjoerd at acm.org (Sjoerd Mullender) Date: Wed Nov 26 05:40:05 2003 Subject: [Spambayes-checkins] spambayes/spambayes message.py,1.40,1.41 In-Reply-To: References: Message-ID: <3FC482FC.7030707@acm.org> Richie Hindle wrote: > Update of /cvsroot/spambayes/spambayes/spambayes > In directory sc8-pr-cvs1:/tmp/cvs-serv19794 > > Modified Files: > message.py > Log Message: > Patch 831388: Make message.py respect the header_score_digits option. > > Bugfix candidate (probably). > > > Index: message.py > =================================================================== > RCS file: /cvsroot/spambayes/spambayes/spambayes/message.py,v > retrieving revision 1.40 > retrieving revision 1.41 > diff -C2 -d -r1.40 -r1.41 > *** message.py 8 Oct 2003 04:04:35 -0000 1.40 > --- message.py 25 Nov 2003 23:11:18 -0000 1.41 > *************** > *** 342,346 **** > > if options['Headers','include_score']: > ! disp = str(prob) > if options["Headers", "header_score_logarithm"]: > if prob<=0.005 and prob>0.0: > --- 342,346 ---- > > if options['Headers','include_score']: > ! disp = ("%."+str(options["Headers", "header_score_digits"])+"f") % prob > if options["Headers", "header_score_logarithm"]: > if prob<=0.005 and prob>0.0: > This can be done with disp = "%.*f" % (options["Headers", "header_score_digits"], prob) which looks more readable to me. -- Sjoerd Mullender From npickett at users.sourceforge.net Wed Nov 26 15:43:46 2003 From: npickett at users.sourceforge.net (Neale Pickett) Date: Wed Nov 26 15:43:50 2003 Subject: [Spambayes-checkins] spambayes/scripts sb_filter.py,1.7,1.8 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv27222/scripts Modified Files: sb_filter.py Log Message: sb_filter now prints each message only once, not once per argument :) Index: sb_filter.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_filter.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sb_filter.py 17 Nov 2003 21:47:47 -0000 1.7 --- sb_filter.py 26 Nov 2003 20:43:43 -0000 1.8 *************** *** 235,239 **** else: unixfrom = True ! sys.stdout.write(msg.as_string(unixfrom=unixfrom)) if __name__ == "__main__": --- 235,239 ---- else: unixfrom = True ! sys.stdout.write(msg.as_string(unixfrom=unixfrom)) if __name__ == "__main__": From richiehindle at users.sourceforge.net Wed Nov 26 17:09:53 2003 From: richiehindle at users.sourceforge.net (Richie Hindle) Date: Wed Nov 26 17:09:56 2003 Subject: [Spambayes-checkins] spambayes/spambayes message.py,1.42,1.43 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv11654 Modified Files: message.py Log Message: Sjoerd's improved version of patch 831388. Index: message.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/message.py,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** message.py 26 Nov 2003 00:34:32 -0000 1.42 --- message.py 26 Nov 2003 22:09:51 -0000 1.43 *************** *** 343,347 **** if options['Headers','include_score']: ! disp = ("%."+str(options["Headers", "header_score_digits"])+"f") % prob if options["Headers", "header_score_logarithm"]: if prob<=0.005 and prob>0.0: --- 343,347 ---- if options['Headers','include_score']: ! disp = "%.*f" % (options["Headers", "header_score_digits"], prob) if options["Headers", "header_score_logarithm"]: if prob<=0.005 and prob>0.0: From richiehindle at users.sourceforge.net Wed Nov 26 18:01:27 2003 From: richiehindle at users.sourceforge.net (Richie Hindle) Date: Wed Nov 26 18:01:46 2003 Subject: [Spambayes-checkins] spambayes/spambayes hammie.py,1.12,1.13 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv22175 Modified Files: hammie.py Log Message: Sjoerd's improved version of patch 831388, applied here as well as to message.py. Index: hammie.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/hammie.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** hammie.py 25 Nov 2003 22:35:49 -0000 1.12 --- hammie.py 26 Nov 2003 23:01:24 -0000 1.13 *************** *** 120,124 **** self.train(msg, is_spam, True) basic_disp = disp ! disp += ("; %."+str(options["Headers", "header_score_digits"])+"f") % prob if options["Headers", "header_score_logarithm"]: if prob<=0.005 and prob>0.0: --- 120,124 ---- self.train(msg, is_spam, True) basic_disp = disp ! disp += "; %.*f" % (options["Headers", "header_score_digits"], prob) if options["Headers", "header_score_logarithm"]: if prob<=0.005 and prob>0.0: From richiehindle at users.sourceforge.net Thu Nov 27 17:31:32 2003 From: richiehindle at users.sourceforge.net (Richie Hindle) Date: Thu Nov 27 17:31:35 2003 Subject: [Spambayes-checkins] spambayes WHAT_IS_NEW.txt,1.19.2.2,1.19.2.3 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1:/tmp/cvs-serv2009 Modified Files: Tag: release_1_0 WHAT_IS_NEW.txt Log Message: Making sure that stable door is good and tight. Index: WHAT_IS_NEW.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/WHAT_IS_NEW.txt,v retrieving revision 1.19.2.2 retrieving revision 1.19.2.3 diff -C2 -d -r1.19.2.2 -r1.19.2.3 *** WHAT_IS_NEW.txt 4 Nov 2003 10:35:23 -0000 1.19.2.2 --- WHAT_IS_NEW.txt 27 Nov 2003 22:31:30 -0000 1.19.2.3 *************** *** 21,26 **** no longer the case - if you are using a pickle for the statistics database, you have a pickle for everything. Your old 'message info' ! database is not converted (and there is no utility provided to do so), ! but you should not suffer any ill effects from this, *unless* you are using sb_imapfilter.py. In that case, you will find that the filter trains and classifies all messages in the folders it examines, even --- 21,28 ---- no longer the case - if you are using a pickle for the statistics database, you have a pickle for everything. Your old 'message info' ! database is not converted (and there is no utility provided to do so). ! If you are using a pickle for storage, you should delete your old ! 'spambayes.messageinfo.db' file before restarting after the upgrade. ! You should not suffer any ill effects from this, *unless* you are using sb_imapfilter.py. In that case, you will find that the filter trains and classifies all messages in the folders it examines, even