From anadelonbrin at users.sourceforge.net Wed Sep 15 08:54:00 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Wed Sep 15 08:54:04 2004 Subject: [Spambayes-checkins] spambayes/scripts sb_upload.py,1.2,1.3 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28483/scripts Modified Files: sb_upload.py Log Message: Fix problems found by Graham Ashton: Clarify docstring so that it's mroe clear what this script does. The -n / --null command line option didn't actually do anything; change it so that it does. Index: sb_upload.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_upload.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sb_upload.py 15 Jan 2004 03:39:11 -0000 1.2 --- sb_upload.py 15 Sep 2004 06:53:58 -0000 1.3 *************** *** 3,7 **** """ Read a message or a mailbox file on standard input, upload it to a ! web browser and write it to standard output. usage: %(progname)s [-h] [-n] [-s server] [-p port] [-r N] --- 3,12 ---- """ Read a message or a mailbox file on standard input, upload it to a ! web server and write it to standard output. ! ! By default, this sends the message to the SpamBayes sb_server web ! interface, which will save the message in the 'unknown' cache, ready ! for you to classify it. It does not do any training, just saves it ! ready for you to classify. usage: %(progname)s [-h] [-n] [-s server] [-p port] [-r N] *************** *** 129,133 **** data = sys.stdin.read() ! sys.stdout.write(data) if random.random() < prob: try: --- 134,139 ---- data = sys.stdin.read() ! if not null: ! sys.stdout.write(data) if random.random() < prob: try: From anadelonbrin at users.sourceforge.net Mon Sep 20 08:51:52 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Mon Sep 20 08:51:55 2004 Subject: [Spambayes-checkins] spambayes/windows .cvsignore,1.3,1.4 Message-ID: Update of /cvsroot/spambayes/spambayes/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17432/windows Modified Files: .cvsignore Log Message: Ignore pyc. Index: .cvsignore =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .cvsignore 12 Feb 2004 21:11:26 -0000 1.3 --- .cvsignore 20 Sep 2004 06:51:49 -0000 1.4 *************** *** 1,2 **** --- 1,3 ---- SpamBayes-Setup.exe spambayes-*.exe + *.pyc From anadelonbrin at users.sourceforge.net Tue Sep 21 10:04:42 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Tue Sep 21 10:04:45 2004 Subject: [Spambayes-checkins] spambayes/windows spambayes.iss, 1.15.4.2, 1.15.4.3 Message-ID: Update of /cvsroot/spambayes/spambayes/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25510/windows Modified Files: Tag: release_1_0-branch spambayes.iss Log Message: Change numbers for the 1.0 (final) release. Index: spambayes.iss =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/spambayes.iss,v retrieving revision 1.15.4.2 retrieving revision 1.15.4.3 diff -C2 -d -r1.15.4.2 -r1.15.4.3 *** spambayes.iss 26 Jun 2004 03:37:09 -0000 1.15.4.2 --- spambayes.iss 21 Sep 2004 08:04:39 -0000 1.15.4.3 *************** *** 5,11 **** [Setup] ; Version specific constants ! AppVerName=SpamBayes 1.0rc2 ! AppVersion=0.993 ! OutputBaseFilename=spambayes-1.0rc2 ; Normal constants. Be careful about changing 'AppName' AppName=SpamBayes --- 5,11 ---- [Setup] ; Version specific constants ! AppVerName=SpamBayes 1.0 ! AppVersion=1.0 ! OutputBaseFilename=spambayes-1.0 ; Normal constants. Be careful about changing 'AppName' AppName=SpamBayes From anadelonbrin at users.sourceforge.net Tue Sep 28 09:38:12 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Tue Sep 28 09:38:16 2004 Subject: [Spambayes-checkins] website download.ht, 1.27, 1.28 windows.ht, 1.40, 1.41 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2066 Modified Files: download.ht windows.ht Log Message: Minor 1.0 tweaks. Index: download.ht =================================================================== RCS file: /cvsroot/spambayes/website/download.ht,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** download.ht 20 Jul 2004 22:19:57 -0000 1.27 --- download.ht 28 Sep 2004 07:38:08 -0000 1.28 *************** *** 11,16 **** spambayes@python.org. !

You may like to view the release notes ! or the files that make up this release. --- 11,16 ---- spambayes@python.org. !

You may like to view the release notes ! or the files that make up this release. Index: windows.ht =================================================================== RCS file: /cvsroot/spambayes/website/windows.ht,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** windows.ht 20 Jul 2004 22:19:57 -0000 1.40 --- windows.ht 28 Sep 2004 07:38:09 -0000 1.41 *************** *** 12,16 ****

Latest Release

The latest release is 1.0 - see the ! release notes or download the installation program.

--- 12,16 ----

Latest Release

The latest release is 1.0 - see the ! release notes or download the installation program.

From anadelonbrin at users.sourceforge.net Wed Sep 29 01:47:22 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Wed Sep 29 01:47:26 2004 Subject: [Spambayes-checkins] spambayes/spambayes Options.py,1.112,1.113 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16949/spambayes Modified Files: Options.py Log Message: Fix [ 1036601 ] typo on advanced config web page This is only a typo, so might as well be backported. Index: Options.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/Options.py,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** Options.py 9 Aug 2004 06:50:03 -0000 1.112 --- Options.py 28 Sep 2004 23:47:20 -0000 1.113 *************** *** 544,548 **** """Messages will be expired from the cache after this many days. After this time, you will no longer be able to train on these messages ! (note this does not effect the copy of the message that you have in your mail client).""", INTEGER, RESTORE), --- 544,548 ---- """Messages will be expired from the cache after this many days. After this time, you will no longer be able to train on these messages ! (note this does not affect the copy of the message that you have in your mail client).""", INTEGER, RESTORE), From anadelonbrin at users.sourceforge.net Thu Sep 30 04:01:29 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Sep 30 04:01:32 2004 Subject: [Spambayes-checkins] spambayes README-DEVEL.txt,1.13,1.14 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26297 Modified Files: README-DEVEL.txt Log Message: Add instructions for making a binary release. Index: README-DEVEL.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/README-DEVEL.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** README-DEVEL.txt 14 Jul 2004 07:24:45 -0000 1.13 --- README-DEVEL.txt 30 Sep 2004 02:01:26 -0000 1.14 *************** *** 525,526 **** --- 525,555 ---- else is left alone. + Making a binary release + ======================= + + The binary release includes both sb_server and the Outlook plug-in and + is an installer for Windows (98 and above) systems. In order to have + COM typelibs that work with Outlook 2000, 2002 and 2003, you need to + build the installer on a system that has Outlook 2000 (not a more recent + version). You also need to have InnoSetup, resourcepackage and py2exe + installed. + + o Get hold of a fresh copy of the source (Windows line endings, + presumably). + o Run sb_server and open the web interface. This gets resourcepackage + to generate the needed files. + o Replace the __init__.py file in spambayes/spambayes/resources with + a blank file to disable resourcepackage. + o Ensure that the version numbers in spambayes/spambayes/__init__.py + and spambayes/spambayes/Version.py are up-to-date. + o Ensure that you don't have any other copies of spambayes in your + PYTHONPATH, or py2exe will pick these up! If in doubt, run + setup.py install. + o Run the "setup_all.py" script in the spambayes/windows/py2exe/ + directory. This uses py2exe to create the files that Inno will install. + o Open (in InnoSetup) the spambayes.iss file in the spambayes/windows/ + directory. Change the version number in the AppVerName and + OutputBaseFilename lines to the new number. + o Compile the spambayes.iss script to get the executable. + o You can now follow the steps in the source release description above, + from the testing step. From anadelonbrin at users.sourceforge.net Thu Sep 30 04:03:02 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Sep 30 04:03:04 2004 Subject: [Spambayes-checkins] spambayes/spambayes ImapUI.py,1.36,1.37 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26575/spambayes Modified Files: ImapUI.py Log Message: Fix [ 903905 ] IMAP Configuration Error (This was meant to have been fixed before, but apparently wasn't). Index: ImapUI.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/ImapUI.py,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** ImapUI.py 27 Jan 2004 08:37:14 -0000 1.36 --- ImapUI.py 30 Sep 2004 02:02:58 -0000 1.37 *************** *** 44,47 **** --- 44,48 ---- import re import cgi + import types import UserInterface *************** *** 208,213 **** self._writePostamble() return ! username = options["imap", "username"][0] ! if username == "": content = self._buildBox("Error", None, """Must specify username first.""") --- 209,216 ---- self._writePostamble() return ! username = options["imap", "username"] ! if isinstance(username, types.TupleType): ! username = username[0] ! if not username: content = self._buildBox("Error", None, """Must specify username first.""") *************** *** 215,218 **** --- 218,231 ---- self._writePostamble() return + if not self.imap_pwd: + self.imap_pwd = options["imap", "password"] + if isinstance(self.imap_pwd, types.TupleType): + self.imap_pwd = self.imap_pwd[0] + if not self.imap_pwd: + content = self._buildBox("Error", None, + """Must specify password first.""") + self.write(content) + self._writePostamble() + return self.imap.login(username, self.imap_pwd) self.imap_logged_in = True From anadelonbrin at users.sourceforge.net Thu Sep 30 07:16:33 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Sep 30 07:16:35 2004 Subject: [Spambayes-checkins] spambayes/spambayes Options.py,1.113,1.114 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26656/spambayes Modified Files: Options.py Log Message: Implement [ 940643 ] Add ham_folder option (the ham_folder option is just like the unsure_folder or spam_folder ones, but for ham). Index: Options.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/Options.py,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** Options.py 28 Sep 2004 23:47:20 -0000 1.113 --- Options.py 30 Sep 2004 05:16:30 -0000 1.114 *************** *** 1012,1015 **** --- 1012,1021 ---- IMAP_FOLDER, DO_NOT_RESTORE), + ("ham_folder", "Folder for ham messages", "", + """If you leave this option blank, messages classified as ham will not + be moved. However, if you wish to have ham messages moved, you can + select a folder here.""", + IMAP_FOLDER, DO_NOT_RESTORE), + ("ham_train_folders", "Folders with mail to be trained as ham", (), """Comma delimited list of folders that will be examined for messages From anadelonbrin at users.sourceforge.net Thu Sep 30 07:16:33 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Sep 30 07:16:35 2004 Subject: [Spambayes-checkins] spambayes/scripts sb_imapfilter.py,1.38,1.39 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26656/scripts Modified Files: sb_imapfilter.py Log Message: Implement [ 940643 ] Add ham_folder option (the ham_folder option is just like the unsure_folder or spam_folder ones, but for ham). Index: sb_imapfilter.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_imapfilter.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** sb_imapfilter.py 19 Aug 2004 13:11:45 -0000 1.38 --- sb_imapfilter.py 30 Sep 2004 05:16:30 -0000 1.39 *************** *** 171,177 **** # We may never have logged in, in which case we do nothing. if self.do_expunge and self.logged_in: ! # Expunge messages from the spam and unsure folders. for fol in ["spam_folder", ! "unsure_folder",]: self.select(options["imap", fol]) self.expunge() --- 171,178 ---- # We may never have logged in, in which case we do nothing. if self.do_expunge and self.logged_in: ! # Expunge messages from the ham, spam and unsure folders. for fol in ["spam_folder", ! "unsure_folder", ! "ham_folder"]: self.select(options["imap", fol]) self.expunge() *************** *** 747,751 **** return num_trained ! def Filter(self, classifier, spamfolder, unsurefolder): count = {} count["ham"] = 0 --- 748,752 ---- return num_trained ! def Filter(self, classifier, spamfolder, unsurefolder, hamfolder): count = {} count["ham"] = 0 *************** *** 770,774 **** cls = msg.GetClassification() if cls == options["Headers", "header_ham_string"]: ! # We leave ham alone. count["ham"] += 1 elif cls == options["Headers", "header_spam_string"]: --- 771,777 ---- cls = msg.GetClassification() if cls == options["Headers", "header_ham_string"]: ! if hamfolder: ! msg.MoveTo(hamfolder) ! # Otherwise, we leave ham alone. count["ham"] += 1 elif cls == options["Headers", "header_spam_string"]: *************** *** 786,789 **** --- 789,793 ---- self.spam_folder = None self.unsure_folder = None + self.ham_folder = None self.classifier = classifier self.imap_server = None *************** *** 832,835 **** --- 836,842 ---- "unsure_folder"], self.imap_server) + ham_folder_name = options["imap", "ham_folder"] + if ham_folder_name and not self.ham_folder: + self.ham_folder = IMAPFolder(ham_folder_name, self.imap_server) if options["globals", "verbose"]: *************** *** 841,845 **** count["unsure"] = 0 ! # Select the spam folder and unsure folder to make sure they exist. try: self.imap_server.SelectFolder(self.spam_folder.name) --- 848,852 ---- count["unsure"] = 0 ! # Select the ham, spam and unsure folders to make sure they exist. try: self.imap_server.SelectFolder(self.spam_folder.name) *************** *** 852,856 **** print "Cannot select spam folder. Please check configuration." sys.exit(-1) ! for filter_folder in options["imap", "filter_folders"]: # Select the folder to make sure it exists. --- 859,869 ---- print "Cannot select spam folder. Please check configuration." sys.exit(-1) ! if self.ham_folder: ! try: ! self.imap_server.SelectFolder(self.ham_folder.name) ! except BadIMAPResponseError: ! print "Cannot select ham folder. Please check configuration." ! sys.exit(-1) ! for filter_folder in options["imap", "filter_folders"]: # Select the folder to make sure it exists. *************** *** 863,867 **** folder = IMAPFolder(filter_folder, self.imap_server) subcount = folder.Filter(self.classifier, self.spam_folder, ! self.unsure_folder) for key in count.keys(): count[key] += subcount.get(key, 0) --- 876,880 ---- folder = IMAPFolder(filter_folder, self.imap_server) subcount = folder.Filter(self.classifier, self.spam_folder, ! self.unsure_folder, self.ham_folder) for key in count.keys(): count[key] += subcount.get(key, 0)