From anadelonbrin at users.sourceforge.net Tue Jun 1 20:28:39 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Tue Jun 1 20:28:44 2004 Subject: [Spambayes-checkins] spambayes/spambayes OptionsClass.py,1.24,1.25 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28042/spambayes Modified Files: OptionsClass.py Log Message: Fix [ 961713 ] server error when tryingto change Statistics Options The problem options were the notate_ ones. If they were a single value they could cause trouble changing any of the options. Bugfix candidate. Index: OptionsClass.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/OptionsClass.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** OptionsClass.py 23 Mar 2004 04:39:15 -0000 1.24 --- OptionsClass.py 2 Jun 2004 00:28:35 -0000 1.25 *************** *** 261,268 **** # This will fall apart if the allowed_value is a tuple, # but not a homogenous one... ! if type(self.allowed_values) in types.StringTypes: vals = list(self._split_values(value)) else: ! vals = value.split() if len(self.default_value) > 0: to_type = type(self.default_value[0]) --- 261,271 ---- # This will fall apart if the allowed_value is a tuple, # but not a homogenous one... ! if isinstance(self.allowed_values, types.StringTypes): vals = list(self._split_values(value)) else: ! if isinstance(value, types.TupleType): ! vals = list(value) ! else: ! vals = value.split() if len(self.default_value) > 0: to_type = type(self.default_value[0]) From anadelonbrin at users.sourceforge.net Sun Jun 6 22:34:56 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Sun Jun 6 22:35:00 2004 Subject: [Spambayes-checkins] website faq.txt,1.73,1.74 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25405 Modified Files: faq.txt Log Message: Add a FAQ for "how do I change the place the plug-in stores my data in". This information is in the configuration guide, but admittedly it is tricky to find, and you have to read the whole thing to really get it. This points people to that, but also gives the quick answer. Index: faq.txt =================================================================== RCS file: /cvsroot/spambayes/website/faq.txt,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** faq.txt 27 May 2004 03:58:03 -0000 1.73 --- faq.txt 7 Jun 2004 02:34:54 -0000 1.74 *************** *** 740,743 **** --- 740,768 ---- + How can I change the directory that SpamBayes stores my data in? + ---------------------------------------------------------------- + + Instructions for doing this can be found in the "Configuration Guide". + (You get to this by doing SpamBayes->Help->About SpamBayes, which opens + up a browser window, then clicking the "Configuration Guide" link. The + appropriate section is headed "Multiple Configuration Files" and is at + the end of the document). + + Basically, you need to create a file "default_configuration.ini", and + put it either in the directory that SpamBayes was installed into, or in + the default data directory (the `backup question`_ has instructions for + finding this directory). + + Inside this file, you need to have a section "General", and an option + "data_directory", which point to the new location that you wish to use. + + For example:: + + [General] + data_directory=c:\spambayes_data + + .. _`backup question`: #can-i-back-up-the-outlook-database-should-i-do-this + + How do I uninstall the plug-in? ------------------------------- From anadelonbrin at users.sourceforge.net Sun Jun 6 22:46:40 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Sun Jun 6 22:46:43 2004 Subject: [Spambayes-checkins] website unix.ht,1.9,1.10 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27427 Modified Files: unix.ht Log Message: Fix up a few closing tags. Add a note about the path to sb_filter, as suggested on the list by Jeff Epler. Index: unix.ht =================================================================== RCS file: /cvsroot/spambayes/website/unix.ht,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** unix.ht 15 Oct 2003 04:44:41 -0000 1.9 --- unix.ht 7 Jun 2004 02:46:37 -0000 1.10 *************** *** 12,16 **** package or from CVS, then choose the Spambayes application which best fits into your ! mail setup.

Procmail

--- 12,16 ---- package or from CVS, then choose the Spambayes application which best fits into your ! mail setup.

Procmail

*************** *** 21,25 **** sb_filter.py the easiest application to integrate into your mail environment.

!

An example setup is as follows (thanks to Alister Forbes for contributing this):

  1. Install spambayes with the usual
    setup.py install
  2. --- 21,31 ---- sb_filter.py the easiest application to integrate into your mail environment.

    !

    An example setup is as follows (thanks to Alister Forbes for contributing this). ! Note that the path to the sb_filter script will be the same as the prefix ! you used when installing Python, which is probably /usr when you installed ! Python using your OS's package management software, and is more likely to ! be /usr/local if you built your own. You can refer to the output of ! "setup.py install" to find the location.

    !
    1. Install spambayes with the usual
      setup.py install
    2. *************** *** 46,50 ****
    -

    Additional details are available in the Hammie --- 52,55 ---- *************** *** 54,62 ****

    If your mail program fetches mail using POP3, then you should run sb_server.py.

    You might wish to set sb_server.py to run as a daemon - Fernando NIŅO and Dave Handley have provided these scripts (respectively) which will allow you ! to do this:

      #!/bin/bash
    --- 59,67 ----
      
      

    If your mail program fetches mail using POP3, then you should run sb_server.py.

    You might wish to set sb_server.py to run as a daemon - Fernando NIŅO and Dave Handley have provided these scripts (respectively) which will allow you ! to do this:

      #!/bin/bash
    ***************
    *** 189,198 ****
      exit $RETVAL
      
    -

    IMAP

    If your mail program fetches mail using IMAP, then you should run ! imapfilter.py.

    Training

    --- 194,202 ---- exit $RETVAL

    IMAP

    If your mail program fetches mail using IMAP, then you should run ! imapfilter.py.

    Training

    *************** *** 201,205 **** href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/spambayes/spambayes/README.txt?rev=HEAD&content-type=text/plain">Hammie readme for a detailed discussion of the many training options ! on Unix systems.

    Notes

    --- 205,209 ---- href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/spambayes/spambayes/README.txt?rev=HEAD&content-type=text/plain">Hammie readme for a detailed discussion of the many training options ! on Unix systems.

    Notes

    *************** *** 212,218 ****

    exmh

    !

    The following short guide will help you set up a new message menu on exmh - this adds a menu containing "Train as Spam" and "Train as Ham" ! options.

      --- 216,222 ----

      exmh

      !

      The following short guide will help you set up a new message menu on exmh - this adds a menu containing "Train as Spam" and "Train as Ham" ! options.

        *************** *** 255,258 **** !
      1. Restart exmh, and you're done.
      --- 259,262 ---- !
    1. Restart exmh, and you're done.
    From anadelonbrin at users.sourceforge.net Thu Jun 10 00:36:54 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Jun 10 00:36:58 2004 Subject: [Spambayes-checkins] spambayes/windows/py2exe setup_all.py, 1.17, 1.18 Message-ID: Update of /cvsroot/spambayes/spambayes/windows/py2exe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18985/windows/py2exe Modified Files: setup_all.py Log Message: Install a copy of the license with the binary versions. Index: setup_all.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/py2exe/setup_all.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** setup_all.py 13 Apr 2004 04:01:11 -0000 1.17 --- setup_all.py 10 Jun 2004 04:36:51 -0000 1.18 *************** *** 136,139 **** --- 136,140 ---- common_data_files = [ ["", [os.path.join(sb_top_dir, r"windows\resources\sbicon.ico")]], + ["", [os.path.join(sb_top_dir, r"LICENSE.txt")]], ] From anadelonbrin at users.sourceforge.net Thu Jun 10 00:38:28 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Jun 10 00:38:31 2004 Subject: [Spambayes-checkins] spambayes/windows spambayes.iss,1.16,1.17 Message-ID: Update of /cvsroot/spambayes/spambayes/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21122/windows Modified Files: spambayes.iss Log Message: Install a copy of the license with the binary versions. Index: spambayes.iss =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/spambayes.iss,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** spambayes.iss 17 May 2004 21:17:55 -0000 1.16 --- spambayes.iss 10 Jun 2004 04:38:26 -0000 1.17 *************** *** 18,21 **** --- 18,22 ---- [Files] Source: "py2exe\dist\sbicon.ico"; DestDir: "{app}"; Flags: ignoreversion + Source: "py2exe\dist\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion Source: "py2exe\dist\lib\*.*"; DestDir: "{app}\lib"; Flags: ignoreversion From anadelonbrin at users.sourceforge.net Thu Jun 10 00:49:17 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Jun 10 00:49:21 2004 Subject: [Spambayes-checkins] spambayes/windows/py2exe setup_all.py, 1.17, 1.17.4.1 Message-ID: Update of /cvsroot/spambayes/spambayes/windows/py2exe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1839/windows/py2exe Modified Files: Tag: release_1_0-branch setup_all.py Log Message: Backport installation of the license with the binary versions to 1.0 release branch. Backport installation of the default_bayes_customize.ini file. Index: setup_all.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/py2exe/setup_all.py,v retrieving revision 1.17 retrieving revision 1.17.4.1 diff -C2 -d -r1.17 -r1.17.4.1 *** setup_all.py 13 Apr 2004 04:01:11 -0000 1.17 --- setup_all.py 10 Jun 2004 04:49:13 -0000 1.17.4.1 *************** *** 136,139 **** --- 136,140 ---- common_data_files = [ ["", [os.path.join(sb_top_dir, r"windows\resources\sbicon.ico")]], + ["", [os.path.join(sb_top_dir, r"LICENSE.txt")]], ] From anadelonbrin at users.sourceforge.net Thu Jun 10 00:49:17 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Jun 10 00:49:23 2004 Subject: [Spambayes-checkins] spambayes/windows spambayes.iss,1.15,1.15.4.1 Message-ID: Update of /cvsroot/spambayes/spambayes/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1839/windows Modified Files: Tag: release_1_0-branch spambayes.iss Log Message: Backport installation of the license with the binary versions to 1.0 release branch. Backport installation of the default_bayes_customize.ini file. Index: spambayes.iss =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/spambayes.iss,v retrieving revision 1.15 retrieving revision 1.15.4.1 diff -C2 -d -r1.15 -r1.15.4.1 *** spambayes.iss 4 May 2004 02:06:51 -0000 1.15 --- spambayes.iss 10 Jun 2004 04:49:13 -0000 1.15.4.1 *************** *** 18,21 **** --- 18,22 ---- [Files] Source: "py2exe\dist\sbicon.ico"; DestDir: "{app}"; Flags: ignoreversion + Source: "py2exe\dist\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion Source: "py2exe\dist\lib\*.*"; DestDir: "{app}\lib"; Flags: ignoreversion *************** *** 27,30 **** --- 28,32 ---- Source: "py2exe\dist\docs\outlook\*.*"; DestDir: "{app}\docs\outlook"; Check: InstallingOutlook; Flags: ignoreversion recursesubdirs Source: "py2exe\dist\docs\outlook\docs\welcome.html"; DestDir: "{app}\docs\outlook\docs"; Check: InstallingOutlook; Flags: isreadme + Source: "py2exe\dist\bin\default_bayes_customize.ini"; DestDir: "{app}\bin"; Check: InstallingOutlook; Flags: ignoreversion Source: "py2exe\dist\bin\sb_server.exe"; DestDir: "{app}\bin"; Check: InstallingProxy; Flags: ignoreversion From anadelonbrin at users.sourceforge.net Thu Jun 10 00:52:20 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Jun 10 00:52:24 2004 Subject: [Spambayes-checkins] spambayes/spambayes OptionsClass.py, 1.24, 1.24.4.1 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6390/spambayes Modified Files: Tag: release_1_0-branch OptionsClass.py Log Message: Backport fix for [ 961713 ] server error when trying to change Statistics Options Index: OptionsClass.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/OptionsClass.py,v retrieving revision 1.24 retrieving revision 1.24.4.1 diff -C2 -d -r1.24 -r1.24.4.1 *** OptionsClass.py 23 Mar 2004 04:39:15 -0000 1.24 --- OptionsClass.py 10 Jun 2004 04:52:17 -0000 1.24.4.1 *************** *** 261,268 **** # This will fall apart if the allowed_value is a tuple, # but not a homogenous one... ! if type(self.allowed_values) in types.StringTypes: vals = list(self._split_values(value)) else: ! vals = value.split() if len(self.default_value) > 0: to_type = type(self.default_value[0]) --- 261,271 ---- # This will fall apart if the allowed_value is a tuple, # but not a homogenous one... ! if isinstance(self.allowed_values, types.StringTypes): vals = list(self._split_values(value)) else: ! if isinstance(value, types.TupleType): ! vals = list(value) ! else: ! vals = value.split() if len(self.default_value) > 0: to_type = type(self.default_value[0]) From anadelonbrin at users.sourceforge.net Thu Jun 10 00:57:14 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Jun 10 00:57:17 2004 Subject: [Spambayes-checkins] spambayes/Outlook2000/dialogs FolderSelector.py, 1.36, 1.36.4.1 Message-ID: Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12423/Outlook2000/dialogs Modified Files: Tag: release_1_0-branch FolderSelector.py Log Message: Backport fix for [ 943397 ] Cannot choose more than one Inbox folder to filter (this is Mark's fix of Tony's fix). Index: FolderSelector.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/FolderSelector.py,v retrieving revision 1.36 retrieving revision 1.36.4.1 diff -C2 -d -r1.36 -r1.36.4.1 *** FolderSelector.py 27 Feb 2004 02:59:51 -0000 1.36 --- FolderSelector.py 10 Jun 2004 04:57:11 -0000 1.36.4.1 *************** *** 6,9 **** --- 6,10 ---- import win32api import win32gui + import winerror import struct, array *************** *** 491,497 **** folder = self.manager.message_store.GetFolder(spec.folder_id) parent = folder.GetParent() ! valid = parent is not None and parent.GetParent() is not None except self.manager.message_store.MsgStoreException, details: ! print "Eeek - couldn't get the folder to check valid" valid = False if not valid: --- 492,525 ---- folder = self.manager.message_store.GetFolder(spec.folder_id) parent = folder.GetParent() ! try: ! # Psts and the main Exchange store have top level ! # folders with parents (with empty display names), ! # and no grandparents. Anything below the top ! # level *does* have a grandparent. This means our ! # test for "top level folder" can be: does it have ! # a parent *and* grandparent. However, a ! # secondary Exchange account doesn't have the ! # empty-display-name parent, so the top-level ! # doesn't have a parent, and the top selectable ! # folder doesn't have a grandparent, and our test ! # fails. Allow for this by checking for the ! # "Access denied" exception when getting the ! # grandparent, and assuming that this means that ! # this is what is happening. This will only fail ! # if we get an 'access denied' error for the ! # empty-display-name parent, which should not be ! # the case. ! grandparent = parent.GetParent() ! except self.manager.message_store.MsgStoreException, details: ! hr, msg, exc, argErr = details.mapi_exception ! if hr == winerror.E_ACCESSDENIED: ! valid = parent is not None ! else: ! raise # but only down a couple of lines... ! else: ! valid = parent is not None and grandparent is not None except self.manager.message_store.MsgStoreException, details: ! print "Eeek - couldn't get the folder to check " \ ! "valid:", details valid = False if not valid: From anadelonbrin at users.sourceforge.net Thu Jun 10 01:04:01 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Jun 10 01:04:05 2004 Subject: [Spambayes-checkins] spambayes/Outlook2000/docs troubleshooting.html, 1.20, 1.20.4.1 Message-ID: Update of /cvsroot/spambayes/spambayes/Outlook2000/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17800/Outlook2000/docs Modified Files: Tag: release_1_0-branch troubleshooting.html Log Message: Backport documentation fixes. (Suggest our registration utility rather than regsrv32 and disabled items is in Outlook 2002 and 2003). Index: troubleshooting.html =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/docs/troubleshooting.html,v retrieving revision 1.20 retrieving revision 1.20.4.1 diff -C2 -d -r1.20 -r1.20.4.1 *** troubleshooting.html 22 Dec 2003 03:13:56 -0000 1.20 --- troubleshooting.html 10 Jun 2004 05:03:59 -0000 1.20.4.1 *************** *** 113,118 ****
  3. If the SpamBayes addin is not listed, then SpamBayes should be reinstalled (Note that running regsvr32.exe ! outlook_addin.dll from the SpamBayes directory may also solve ! this problem)
  4. If the SpamBayes addin is listed but not checked, then simply check it and close the dialog.
  5. --- 113,119 ----
  6. If the SpamBayes addin is not listed, then SpamBayes should be reinstalled (Note that running regsvr32.exe ! outlook_addin.dll or ! outlook_addin_register.exe from the SpamBayes directory may also ! solve this problem).
  7. If the SpamBayes addin is listed but not checked, then simply check it and close the dialog.
  8. *************** *** 120,124 ****
    !
  • If you are running Outlook 2002, you may find that if you go back to the dialog, the addin will still be unselected.  In this case, perform the following:
  • --- 121,125 ----
      !
    • If you are running Outlook XP/2002/2003, you may find that if you go back to the dialog, the addin will still be unselected.  In this case, perform the following:
    • *************** *** 133,137 ****
    • Select SpamBayes. 
    • Click Enable.
    • !
    • Restart Outlook 2002.
    • --- 134,138 ----
    • Select SpamBayes. 
    • Click Enable.
    • !
    • Restart Outlook.
    • *************** *** 249,255 **** To register SpamBayes in this way, you must log on as a user with permissions to modify the system registry, then execute the command ! (obviously with the correct patch substituted):
      !     regsvr32.exe ! /i:hkey_local_machine "c:\Program Files\SpamBayes\bin\outlook_addin.dll"
      If you check the installation log after performing such an install, you should see the following messages:
      --- 250,256 ---- To register SpamBayes in this way, you must log on as a user with permissions to modify the system registry, then execute the command ! (obviously with the correct path substituted):
      !     ! "c:\Program Files\SpamBayes\bin\outlook_addin_register.exe" hkey_local_machine
      If you check the installation log after performing such an install, you should see the following messages:
      From anadelonbrin at users.sourceforge.net Thu Jun 10 01:12:46 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Jun 10 01:12:50 2004 Subject: [Spambayes-checkins] spambayes/spambayes UserInterface.py, 1.46, 1.46.4.1 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/spambayes Modified Files: Tag: release_1_0-branch UserInterface.py Log Message: Backport IndexError fix (this is very minor and stops the bug report from functioning). Index: UserInterface.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/UserInterface.py,v retrieving revision 1.46 retrieving revision 1.46.4.1 diff -C2 -d -r1.46 -r1.46.4.1 *** UserInterface.py 22 Feb 2004 02:41:50 -0000 1.46 --- UserInterface.py 10 Jun 2004 05:12:43 -0000 1.46.4.1 *************** *** 1046,1053 **** % (sb_ver, sb_type, py_ver, os_name, self.classifier.nham, self.classifier.nspam) ! domain_guess = options["pop3proxy", "remote_servers"][0] ! for pre in ["pop.", "pop3.", "mail.",]: ! if domain_guess.startswith(pre): ! domain_guess = domain_guess[len(pre):] report.from_addr.value = "[YOUR EMAIL ADDRESS]@%s" % (domain_guess,) report.subject.value = "Problem with %s: [PROBLEM SUMMARY]" % \ --- 1046,1057 ---- % (sb_ver, sb_type, py_ver, os_name, self.classifier.nham, self.classifier.nspam) ! remote_servers = options["pop3proxy", "remote_servers"] ! if remote_servers: ! domain_guess = remote_servers[0] ! for pre in ["pop.", "pop3.", "mail.",]: ! if domain_guess.startswith(pre): ! domain_guess = domain_guess[len(pre):] ! else: ! domain_guess = "[YOUR ISP]" report.from_addr.value = "[YOUR EMAIL ADDRESS]@%s" % (domain_guess,) report.subject.value = "Problem with %s: [PROBLEM SUMMARY]" % \ From anadelonbrin at users.sourceforge.net Thu Jun 10 01:15:03 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Jun 10 01:15:11 2004 Subject: [Spambayes-checkins] spambayes/spambayes compatcsv.py,1.1,1.1.4.1 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27183/spambayes Modified Files: Tag: release_1_0-branch compatcsv.py Log Message: Backport Skip's compatcsv fixes. Index: compatcsv.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/compatcsv.py,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** compatcsv.py 16 Mar 2004 21:36:22 -0000 1.1 --- compatcsv.py 10 Jun 2004 05:15:01 -0000 1.1.4.1 *************** *** 20,25 **** return self def next(self): ! return self.parse_line(self.fp.next()) def parse_line(self, line): --- 20,35 ---- return self + def _readline(self): + line = self.fp.readline() + # strip any EOL detritus + while line[-1:] in ("\r", "\n"): + line = line[:-1] + return line + def next(self): ! line = self._readline() ! if not line: ! raise StopIteration ! return self.parse_line(line) def parse_line(self, line): *************** *** 35,68 **** result = [] while line: if line[0] == '"': ! # search for ending quotation mark ! match = re.match('"(.*?)"[^"]', line) ! if match is None: ! # embedded newline ! line = line + self.fp.next() ! continue ! else: ! field = match.group(1) ! field = field.replace('""', '"') ! try: ! dummy = unicode(field, "ascii") ! except UnicodeError: ! field = unicode(field, "utf-8") ! result.append(field) ! line = line[len(field)+3:] ! else: ! # field is terminated by a comma or EOL ! match = re.match("(.*?)(,|%s)"%EOL, line) ! if match is None: ! print "parse error:", line ! raise ! field = match.group(1) ! try: ! dummy = unicode(field, "ascii") ! except UnicodeError: ! field = unicode(field, "utf-8") ! result.append(field) ! line = line[len(field)+len(match.group(2))] return result --- 45,83 ---- result = [] while line: + # quoted field if line[0] == '"': ! line = line[1:] ! field = [] ! while True: ! if line[0:2] == '""': ! field.append('"') ! line = line[2:] ! elif line[0] == '"': ! # end of field - skip quote and possible comma ! line = line[1:] ! if line[0:1] == ',': ! line = line[1:] ! break ! else: ! field.append(line[0]) ! line = line[1:] ! # ran out of line before field ! if not line: ! field.append("\n") ! line = self._readline() ! if not line: ! raise IOError, "end-of-file during parsing" else: ! # unquoted field ! field = [] ! while line: ! if line[0] == ',': ! # end of field ! line = line[1:] ! break ! else: ! field.append(line[0]) ! line = line[1:] ! result.append("".join(field)) return result *************** *** 84,85 **** --- 99,120 ---- result = ",".join(result) self.fp.write(result+EOL) + + if __name__ == "__main__": + import unittest + import StringIO + + class TestCase(unittest.TestCase): + def test_reader(self): + f = StringIO.StringIO('''\ + """rare""",1,0 + "beginning; + end=""itinhh.txt""",1,0 + ''') + f.seek(0) + rdr = reader(f) + self.assertEqual(rdr.next(), ['"rare"', '1', '0']) + self.assertEqual(rdr.next(), + ['beginning;\n\tend="itinhh.txt"','1', '0']) + self.assertRaises(StopIteration, rdr.next) + + unittest.main() From anadelonbrin at users.sourceforge.net Thu Jun 10 01:17:23 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Jun 10 01:17:32 2004 Subject: [Spambayes-checkins] spambayes/scripts sb_dbexpimp.py, 1.12, 1.12.4.1 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29638/scripts Modified Files: Tag: release_1_0-branch sb_dbexpimp.py Log Message: Backport Skip's Python 2.2 compatibility fixes. Index: sb_dbexpimp.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_dbexpimp.py,v retrieving revision 1.12 retrieving revision 1.12.4.1 diff -C2 -d -r1.12 -r1.12.4.1 *** sb_dbexpimp.py 24 Mar 2004 21:30:43 -0000 1.12 --- sb_dbexpimp.py 10 Jun 2004 05:17:12 -0000 1.12.4.1 *************** *** 93,107 **** from __future__ import generators try: True, False except NameError: - # Maintain compatibility with Python 2.2 True, False = 1, 0 try: import csv except ImportError: import spambayes.compatcsv as csv import spambayes.storage from spambayes.Options import options --- 93,118 ---- from __future__ import generators + # Python 2.2 compatibility stuff try: True, False except NameError: True, False = 1, 0 try: import csv + # might get the old object craft csv module - has no reader attr + if not hasattr(csv, "reader"): + raise ImportError except ImportError: import spambayes.compatcsv as csv + try: + x = UnicodeDecodeError + except NameError: + UnicodeDecodeError = UnicodeError + else: + del x + + import spambayes.storage from spambayes.Options import options *************** *** 115,123 **** return s def uunquote(s): ! try: ! return unicode(s, 'utf-8') ! except UnicodeDecodeError: ! return s def runExport(dbFN, useDBM, outFN): --- 126,139 ---- return s + # Heaven only knows what encoding non-ASCII stuff will be in + # Try a few common western encodings and punt if they all fail def uunquote(s): ! for encoding in ("utf-8", "cp1252", "iso-8859-1"): ! try: ! return unicode(s, encoding) ! except UnicodeDecodeError: ! pass ! # punt ! return s def runExport(dbFN, useDBM, outFN): From anadelonbrin at users.sourceforge.net Thu Jun 10 01:21:18 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Jun 10 01:21:21 2004 Subject: [Spambayes-checkins] spambayes/scripts sb_mboxtrain.py, 1.11, 1.11.4.1 Message-ID: Update of /cvsroot/spambayes/spambayes/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2516/scripts Modified Files: Tag: release_1_0-branch sb_mboxtrain.py Log Message: Backport fix for [ 942262 ] TypeError: string payload expected: Index: sb_mboxtrain.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/scripts/sb_mboxtrain.py,v retrieving revision 1.11 retrieving revision 1.11.4.1 diff -C2 -d -r1.11 -r1.11.4.1 *** sb_mboxtrain.py 5 Feb 2004 08:13:26 -0000 1.11 --- sb_mboxtrain.py 10 Jun 2004 05:21:16 -0000 1.11.4.1 *************** *** 51,55 **** import sys, os, getopt, email import shutil ! from spambayes import hammie, storage from spambayes.Options import options, get_pathname_option --- 51,55 ---- import sys, os, getopt, email import shutil ! from spambayes import hammie, storage, mboxutils from spambayes.Options import options, get_pathname_option *************** *** 83,87 **** # multipart/alternative? try: ! msg.as_string() except TypeError: # We'll be unable to represent this as text :( --- 83,87 ---- # multipart/alternative? try: ! mboxutils.as_string(msg) except TypeError: # We'll be unable to represent this as text :( *************** *** 145,149 **** continue f = file(tfn, "wb") ! f.write(msg.as_string()) f.close() shutil.copystat(cfn, tfn) --- 145,149 ---- continue f = file(tfn, "wb") ! f.write(mboxutils.as_string(msg)) f.close() shutil.copystat(cfn, tfn) *************** *** 190,194 **** if options["Headers", "include_trained"]: # Write it out with the Unix "From " line ! outf.write(msg.as_string(True)) if options["Headers", "include_trained"]: --- 190,194 ---- if options["Headers", "include_trained"]: # Write it out with the Unix "From " line ! outf.write(mboxutils.as_string(msg, True)) if options["Headers", "include_trained"]: *************** *** 246,250 **** continue f = file(tfn, "wb") ! f.write(msg.as_string()) f.close() shutil.copystat(cfn, tfn) --- 246,250 ---- continue f = file(tfn, "wb") ! f.write(mboxutils.as_string(msg)) f.close() shutil.copystat(cfn, tfn) From anadelonbrin at users.sourceforge.net Thu Jun 10 01:25:57 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Jun 10 01:26:00 2004 Subject: [Spambayes-checkins] spambayes/spambayes message.py,1.49,1.49.4.1 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10140/spambayes Modified Files: Tag: release_1_0-branch message.py Log Message: Backport the sb_server/sb_imapfilter/sb_pop3dnd fix for the 'TypeError' malformed message problem. Index: message.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/message.py,v retrieving revision 1.49 retrieving revision 1.49.4.1 diff -C2 -d -r1.49 -r1.49.4.1 *** message.py 25 Apr 2004 03:45:30 -0000 1.49 --- message.py 10 Jun 2004 05:25:55 -0000 1.49.4.1 *************** *** 277,281 **** # \r\n *only*). imaplib *should* take care of this for us (in the # append function), but does not, so we do it here ! return self._force_CRLF(email.Message.Message.as_string(self, unixfrom)) def modified(self): --- 277,288 ---- # \r\n *only*). imaplib *should* take care of this for us (in the # append function), but does not, so we do it here ! try: ! return self._force_CRLF(\ ! email.Message.Message.as_string(self, unixfrom)) ! except TypeError: ! parts = [] ! for part in self.get_payload(): ! parts.append(email.Message.Message.as_string(part, unixfrom)) ! return self._force_CRLF("\n".join(parts)) def modified(self): From anadelonbrin at users.sourceforge.net Thu Jun 10 23:16:24 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Thu Jun 10 23:16:29 2004 Subject: [Spambayes-checkins] spambayes/contrib sb_culler.py,NONE,1.1 Message-ID: Update of /cvsroot/spambayes/spambayes/contrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1183/contrib Added Files: sb_culler.py Log Message: Add the "sb_culler.py" script from the SB wiki by Andrew Dalke. The idea is that you run this script continuously and it clears your POP3 server of spam & viruses (storing the spam locally so that you can review it if necessary). You can leave this running when you go on vacation or check mail via your phone or whatever, so that you don't need to handle so much junk with limited means. Something like this is requested fairly regularly, so it seems worth distributing it rather than just having on the wiki. This way it should stay updated, too, and can be made more user friendly. I asked Andrew about adding it to the dist and he's fine with that. This is an exact copy of the version that's on the wiki. It's stable (Andrew says he's been running it almost continuously since he wrote it), but is slightly out of date (works with the spambayes source that was current at the time). As time allows, I'll update it to match current code and try to make it a bit easier for non-programmers to use. --- NEW FILE: sb_culler.py --- #!/usr/bin/env python """sb_culler.py -- remove spam from POP3 servers, leave ham. I get about 150 spams a day and 12 viruses as background noise. I use Apple's Mail.app on my laptop, which filters out most of them. But when I travel my mailbox starts to accumulate crap, which is annoying over dial-up. Even at home, during peak periods of a recent virus shedding I got about 30 viruses an hour, and my 10MB mailbox filled up while I slept! I have a server machine at home, which can stay up full time. This program, sb_culler, uses SpamBayes to run a POP3 email culler. It connects to my email servers every few minutes, downloads the emails, classifies each one, and deletes the spam and viruses. (It makes a local copy of the spam, just in case.) This program is designed for me, a programmer. The structure should be helpful enough for other programmers, but even configuration must be done by editing the code. Written by Andrew Dalke, November 2003. Released into the public domain on 2003/11/22. == NO copyright protection asserted for this code. Share and enjoy! == This program requires Python 2.3 or newer. """ import sets, traceback import poplib import posixpath from email import Header from spambayes import mboxutils, hammie DO_ACTIONS = 1 VERBOSE_LEVEL = 1 APPEND_TO_FILE = "append_to_file" DELETE = "delete" KEEP_IN_MAILBOX = "keep in mailbox" SPAM = "spam" VIRUS = "virus" class Logger: def __init__(self): self.tests = {} self.actions = {} def __nonzero__(self): return bool(self.tests) and bool(self.actions) def pass_test(self, name): self.tests[name] = self.tests.get(name, 0) + 1 def do_action(self, name): self.actions[name] = self.actions.get(name, 0) + 1 def accept(self, text): print text def info(self, text): print text class MessageInfo: """reference to an email message in a mailbox""" def __init__(self, mailbox, i, msg, text): self.mailbox = mailbox self.i = i self.msg = msg self.text = text class Filter: """if message passes test then do the given action""" def __init__(self, test, action): self.test = test self.action = action def process(self, mi, log): result = self.test(mi, log) if result: self.action(mi, log) return self.action.descr + " because " + result return False class AppendFile: """Action: append message text to the given filename""" def __init__(self, filename): self.filename = filename self.descr = "save to %r then delete" % self.filename def __call__(self, mi, log): log.do_action(APPEND_TO_FILE) if not DO_ACTIONS: return f = open(self.filename, "a") try: f.write(mi.text) finally: f.close() mi.mailbox.dele(mi.i) def DELETE(mi, log): """Action: delete message from mailbox""" log.do_action(DELETE) if not DO_ACTIONS: return mi.mailbox.dele(mi.i) DELETE.descr = "delete" def KEEP(mi, log): """Action: keep message in mailbox""" log.do_action(KEEP_IN_MAILBOX) KEEP.descr = "keep in mailbox" class WhiteListFrom: """Test: Read a list of email addresses to use a 'from' whitelist""" def __init__(self, filename): lines = [line.strip().lower() for line in open(filename).readlines()] self.addresses = sets.Set(lines) def __call__(self, mi, log): frm = mi.msg["from"] status = (frm is not None) and (frm.lower() in self.addresses) if status: log.pass_test("'from' white list") return "it is in 'from' white list" return False class WhiteListSubstrings: """Test: Whitelist message if named field contains one of the substrings""" def __init__(self, field, substrings): self.field = field self.substrings = substrings def __call__(self, mi, log): data = mi.msg[self.field] if data is None: return False for s in self.substrings: if s in data: log.pass_test("'%s' white list" % (self.field,)) return "it matches '%s' white list" % (self.field,) return False class IsSpam: """Test: use SpamBayes to tell if something is spam""" def __init__(self, sb_hammie, spam_cutoff = None): self.sb_hammie = sb_hammie if spam_cutoff is None: spam_cutoff = options["Categorization", "spam_cutoff"] self.spam_cutoff = spam_cutoff def __call__(self, mi, log): prob = self.sb_hammie.score(mi.msg) if prob > self.spam_cutoff: log.pass_test(SPAM) return "it is spam (%4.3f)" % prob if VERBOSE_LEVEL > 1: print "not spam (%4.3f)" % prob return False # Simple check for executable attachments def IsVirus(mi, log): """Test: a virus is any message with an attached executable I've also noticed the viruses come in as wav and midi attachements so I trigger on those as well. This is a very paranoid detector, since someone might send me a binary for valid reasons. I white-list everyone who's sent me email before so it doesn't affect me. """ for part in mi.msg.walk(): if part.get_main_type() == 'multipart': continue filename = part.get_filename() if filename is None: if part.get_type() in ["application/x-msdownload", "audio/x-wav", "audio/x-midi"]: # Only viruses send messages to me with these types log.pass_test(VIRUS) return ("it has a virus-like content-type (%s)" % part.get_type()) else: extensions = "bat com exe pif ref scr vbs wsh".split() base, ext = posixpath.splitext(filename) if ext[1:].lower() in extensions: log.pass_test(VIRUS) return "it has a virus-like attachment (%s)" % ext[1:] return False def open_mailbox(server, username, password, debuglevel = 0): mailbox = poplib.POP3(server) try: mailbox.user(username) mailbox.pass_(password) mailbox.set_debuglevel(debuglevel) if VERBOSE_LEVEL > 1: count, size = mailbox.stat() print "Message count: ", count print "Total bytes : ", size except: mailbox.quit() raise return mailbox def _log_subject(mi, log): encoded_subject = mi.msg.get('subject') subject, encoding = Header.decode_header(encoded_subject)[0] if encoding is None or encoding == 'iso-8859-1': s = subject else: s = encoded_subject log.info("%s Subject: %r" % (mi.i, s)) class Filters(list): def add(self, test, action): """short-cut to make a Filter given the test and action""" self.append(Filter(test, action)) def process_mailbox(self, mailbox): count, size = mailbox.stat() log = Logger() for i in range(1, count+1): # Kevin's code used -1, but -1 doesn't work for one of # my POP accounts, while a million does. # Don't use retr because that may mark the message as # read (so says Kevin's code) message_tuple = mailbox.top(i, 1000000) text = "\n".join(message_tuple[1]) msg = mboxutils.get_message(text) mi = MessageInfo(mailbox, i, msg, text) _log_subject(mi, log) for filter in self: result = filter.process(mi, log) if result: log.accept(result) break else: # don't know what to do with this so just # keep it on the server log.pass_test("unknown") log.do_action(KEEP_IN_MAILBOX) log.accept("unknown") return log def filter_server( (server, user, pwd), filters): if VERBOSE_LEVEL: print "=" * 78 print "Processing %s on %s" % (user, server) mailbox = open_mailbox(server, user, pwd) try: log = filters.process_mailbox(mailbox) finally: mailbox.quit() return log ##### User-specific import time, sys, urllib # A simple text interface. def _unix_stop(): pass def _ms_stop(): # ^C doesn't seem to work correctly in the DOS box # so assume any keypress is a break if msvcrt.kbhit(): raise SystemExit() try: import msvcrt _check_for_stop = _ms_stop except ImportError: _check_for_stop = _unix_stop def restart_network(): # This is called after too many connection failures. # That usually means my ISP dropped my DHCP and I need to # bounce my Linksys firewall/DHCP/hub. print "Network appears to be down. Bringing Linksys down then up..." try: # Note this this example uses the default password. YMMV. urllib.urlopen("http://:admin@192.168.1.1/Gozila.cgi?pppoeAct=2") urllib.urlopen("http://:admin@192.168.1.1/Gozila.cgi?pppoeAct=1") except KeyboardInterrupt: raise except: traceback.print_exc() def wait(t, delta = 10): """Wait for 't' seconds""" assert delta > 0, delta assert t >= 1 first = True for i in range(t, -1, -delta): if VERBOSE_LEVEL: if not first: print "..", print i, sys.stdout.flush() time.sleep(min(i, delta)) _check_for_stop() first = False print def main(): filters = Filters() # A list of everyone who has emailed me this year. # Keep their messages on the server. filters.add(WhiteListFrom("good_emails.txt"), KEEP) # My mailing lists. Edited to make it slightly harder # for spammers to read this description and figure # out how to spam me. filters.add(WhiteListSubstrings("subject", ['[Twisted]', 'CompChem:', '[Bioperl]', '[BioPy]', '[SALSA CLUB]', '[Open-bio]', '[StarshipCrew]']), KEEP) # Get rid of anything which smells like an exectuable. filters.add(IsVirus, DELETE) # Use SpamBayes to identify spam. Make a local copy then # delete from the server. h = hammie.open("cull.spambayes", False, "r") filters.add(IsSpam(h, 0.90), AppendFile("spam.mbox")) # These are my POP3 accounts. (or not ;) server_configs = [("mail.example.com", "dalke", "password"), ("mail2.spam.com", "dalke", "1234"), ] # The main culling loop. error_count = 0 cumulative_log = {SPAM: 0, VIRUS: 0} initial_log = None start_time = None # init'ed only after initial_log is created while 1: error_flag = False for server, user, pwd in server_configs: try: log = filter_server( (server, user, pwd), filters) except StandardError: raise except: error_flag = True traceback.print_exc() continue if VERBOSE_LEVEL > 1 and log: print " ** Summary **" for x in (log.tests, log.actions): items = x.items() if items: items.sort() for k, v in items: print " %s: %s" % (k, v) print cumulative_log[SPAM] += log.tests.get(SPAM, 0) cumulative_log[VIRUS] += log.tests.get(VIRUS, 0) if initial_log is None: initial_log = cumulative_log.copy() start_time = time.time() if VERBOSE_LEVEL: print "Stats: %d spams, %d virus" % ( initial_log[SPAM], initial_log[VIRUS]) else: if VERBOSE_LEVEL: delta_t = time.time() - start_time delta_t = max(delta_t, 1) # print "Stats: %d spams (%.2f/hr), %d virus (%.2f/hr)" % ( cumulative_log[SPAM], (cumulative_log[SPAM] - initial_log[SPAM]) / delta_t * 3600, cumulative_log[VIRUS], (cumulative_log[VIRUS] - initial_log[VIRUS]) / delta_t * 3600) if error_flag: error_count += 1 if error_count > 20: restart_network() error_count = 0 wait(3*60) if __name__ == "__main__": main() From anadelonbrin at users.sourceforge.net Wed Jun 23 19:05:49 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Wed Jun 23 19:05:56 2004 Subject: [Spambayes-checkins] spambayes/spambayes message.py, 1.49.4.1, 1.49.4.2 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26544/spambayes Modified Files: Tag: release_1_0-branch message.py Log Message: Backport fix for people using non dbm/pickle db's. Index: message.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/message.py,v retrieving revision 1.49.4.1 retrieving revision 1.49.4.2 diff -C2 -d -r1.49.4.1 -r1.49.4.2 *** message.py 10 Jun 2004 05:25:55 -0000 1.49.4.1 --- message.py 23 Jun 2004 23:05:47 -0000 1.49.4.2 *************** *** 207,213 **** --- 207,215 ---- message_info_db_name = get_pathname_option("Storage", "messageinfo_storage_file") if options["Storage", "persistent_use_database"] is True or \ + options["Storage", "persistent_use_database"] == "True" or \ options["Storage", "persistent_use_database"] == "dbm": msginfoDB = MessageInfoDB(message_info_db_name) elif options["Storage", "persistent_use_database"] is False or \ + options["Storage", "persistent_use_database"] == "False" or \ options["Storage", "persistent_use_database"] == "pickle": msginfoDB = MessageInfoPickle(message_info_db_name) From anadelonbrin at users.sourceforge.net Wed Jun 23 19:08:49 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Wed Jun 23 19:08:52 2004 Subject: [Spambayes-checkins] spambayes CHANGELOG.txt,1.44,1.45 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27115 Modified Files: CHANGELOG.txt Log Message: Bring up to date. Index: CHANGELOG.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/CHANGELOG.txt,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** CHANGELOG.txt 5 May 2004 00:37:07 -0000 1.44 --- CHANGELOG.txt 23 Jun 2004 23:08:45 -0000 1.45 *************** *** 1,4 **** --- 1,28 ---- [Note that all dates are in English, not American format - i.e. day/month/year] + Future Release + ============== + Tony Meyer 11/06/2004 Add the "sb_culler.py" script from the SB wiki by Andrew Dalke. + Tony Meyer 01/06/2004 Add fixes from [ 962693 ] mozilla/thunderbird/netscape profile dir detection + Skip Montanaro 26/05/2004 New file: pycksum.py - A fuzzy checksum program similar based on a message posted a long time ago by Justin Mason of the SpamAssassin group. + Tony Meyer 24/05/2004 imapfilter: With the verbose output, put the final counts on a line all by themselves. + Tony Meyer 16/05/2004 imapfilter: Sometimes we can't fetch a message, so we can't add the exception header. Don't crash, just warn and continue. + Toby Dickenson 06/05/2004 Add a C implementation of sb_bnfilter. Tweak the Python version to minimise differences between the two. Enable psyco in sb_bnserver. + + Release Candidate 2 + =================== + Tony Meyer 10/06/2004 Install license with binaries. + Mark Hammond 01/06/2004 Fix Tony's fix for [ 943397 ] Cannot choose more than one Inbox folder to filter + Tony Meyer 02/06/2004 Fix [ 961713 ] server error when trying to change Statistics Options + Skip Montanaro 31/05/2004 Compatcsv: Abandon regexes as bad way to parse csv file - add simple unit test as well + Skip Montanaro 31/05/2004 sb_dbexpimp.py: handle case of importing the old object craft csv module. + Skip Montanaro 22/05/2004 sb_dbexpimp.py: Add a fake UnicodeDecodeError for Python 2.2 compatibility. + Skip Montanaro 22/05/2004 Compatcsv: correct a list chomping bug (forgot a slicing ":") and use .readline() instead of .next() for Python 2.2 compatibility + Tony Meyer 18/05/2004 Fix [ 955442 ] default_bayes_customize.ini not handled right + Tony Meyer 14/05/2004 message.py: If we trigger the TypeError problem, try to do our best to put the message together anyway. + Tony Meyer 14/05/2004 Handle people using a storage type that isn't pickle/dbm (like one of the sql ones). + Tony Meyer 13/05/2004 If a user tried to send a bug report before entering in any servers to proxy, this would generate an IndexError. Fix that. + Tony Meyer 12/05/2004 Fix [ 943397 ] Cannot choose more than one Inbox folder to filter + Release Candidate 1 =================== From anadelonbrin at users.sourceforge.net Wed Jun 23 19:10:02 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Wed Jun 23 19:10:06 2004 Subject: [Spambayes-checkins] spambayes CHANGELOG.txt,1.44,1.44.4.1 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27338 Modified Files: Tag: release_1_0-branch CHANGELOG.txt Log Message: Bring up to date. Index: CHANGELOG.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/CHANGELOG.txt,v retrieving revision 1.44 retrieving revision 1.44.4.1 diff -C2 -d -r1.44 -r1.44.4.1 *** CHANGELOG.txt 5 May 2004 00:37:07 -0000 1.44 --- CHANGELOG.txt 23 Jun 2004 23:10:00 -0000 1.44.4.1 *************** *** 1,4 **** --- 1,19 ---- [Note that all dates are in English, not American format - i.e. day/month/year] + Release Candidate 2 + =================== + Tony Meyer 10/06/2004 Install license with binaries. + Mark Hammond 01/06/2004 Fix Tony's fix for [ 943397 ] Cannot choose more than one Inbox folder to filter + Tony Meyer 02/06/2004 Fix [ 961713 ] server error when trying to change Statistics Options + Skip Montanaro 31/05/2004 Compatcsv: Abandon regexes as bad way to parse csv file - add simple unit test as well + Skip Montanaro 31/05/2004 sb_dbexpimp.py: handle case of importing the old object craft csv module. + Skip Montanaro 22/05/2004 sb_dbexpimp.py: Add a fake UnicodeDecodeError for Python 2.2 compatibility. + Skip Montanaro 22/05/2004 Compatcsv: correct a list chomping bug (forgot a slicing ":") and use .readline() instead of .next() for Python 2.2 compatibility + Tony Meyer 18/05/2004 Fix [ 955442 ] default_bayes_customize.ini not handled right + Tony Meyer 14/05/2004 message.py: If we trigger the TypeError problem, try to do our best to put the message together anyway. + Tony Meyer 14/05/2004 Handle people using a storage type that isn't pickle/dbm (like one of the sql ones). + Tony Meyer 13/05/2004 If a user tried to send a bug report before entering in any servers to proxy, this would generate an IndexError. Fix that. + Tony Meyer 12/05/2004 Fix [ 943397 ] Cannot choose more than one Inbox folder to filter + Release Candidate 1 =================== From anadelonbrin at users.sourceforge.net Wed Jun 23 19:15:30 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Wed Jun 23 19:15:34 2004 Subject: [Spambayes-checkins] spambayes WHAT_IS_NEW.txt,1.35,1.35.4.1 Message-ID: Update of /cvsroot/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28466 Modified Files: Tag: release_1_0-branch WHAT_IS_NEW.txt Log Message: Update for 1.0rc2. Index: WHAT_IS_NEW.txt =================================================================== RCS file: /cvsroot/spambayes/spambayes/WHAT_IS_NEW.txt,v retrieving revision 1.35 retrieving revision 1.35.4.1 diff -C2 -d -r1.35 -r1.35.4.1 *** WHAT_IS_NEW.txt 5 May 2004 00:37:07 -0000 1.35 --- WHAT_IS_NEW.txt 23 Jun 2004 23:15:28 -0000 1.35.4.1 *************** *** 11,15 **** changes" section. ! New in 1.0 Release Candiate 1 ============================= --- 11,15 ---- changes" section. ! New in 1.0 Release Candiate 2 ============================= *************** *** 18,22 **** -------------------------- ! There should be no incompatible changes (from 1.0b1) in this release. --- 18,22 ---- -------------------------- ! There should be no incompatible changes (from 1.0rc1) in this release. *************** *** 27,52 **** Outlook Plugin -------------- ! o Default buttons in some dialogs have been corrected. ! ! IMAP Filter ! ----------- ! o The code that allows the filter to keep going when a message cannot ! be parsed correctly has been strengthened. If the filter crashed ! with a "TypeError" when processing some messages, this should fix ! that problem. ! o If the move_trained_[ham|spam]_to_folder options were used, this ! would wipe out the SpamBayes headers. This is now fixed. General ------- ! o Added -R/--reverse flag to tte.py ! o Fix an error that stopped the notes filter working at all in many cases. ! o sb_filter and sb_bnfilter now better handle messages that fail to ! correctly parse. Transition ========== ! If you are transitioning from a version older than 1.0b1, please read the notes in the previous release notes (accessible from ). --- 27,40 ---- Outlook Plugin -------------- ! o Selecting mailboxes on multiple Exchange accounts has been fixed. General ------- ! o Improved the db_expimp.py script when using Python 2.2. Transition ========== ! If you are transitioning from a version older than 1.0rc1, please read the notes in the previous release notes (accessible from ). *************** *** 56,60 **** =================== The following bugs tracked via the Sourceforge system were fixed: ! 940155, 941596, 918157 A URL containing the details of these bugs can be made by appending the --- 44,48 ---- =================== The following bugs tracked via the Sourceforge system were fixed: ! 961713, 955442, 943397 A URL containing the details of these bugs can be made by appending the From anadelonbrin at users.sourceforge.net Wed Jun 23 19:47:45 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Wed Jun 23 19:47:49 2004 Subject: [Spambayes-checkins] spambayes/spambayes Version.py, 1.31, 1.31.4.1 __init__.py, 1.11, 1.11.4.1 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2190/spambayes Modified Files: Tag: release_1_0-branch Version.py __init__.py Log Message: Prepare for 1.0rc2. Index: Version.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/Version.py,v retrieving revision 1.31 retrieving revision 1.31.4.1 diff -C2 -d -r1.31 -r1.31.4.1 *** Version.py 4 May 2004 04:26:12 -0000 1.31 --- Version.py 23 Jun 2004 23:47:40 -0000 1.31.4.1 *************** *** 40,50 **** # 0.99 indicates '1.0b/rc/' so will go 0.992 etc, until a real # 1.0, which can get 1.0 :) ! "Version": 0.992, ! "BinaryVersion": 0.992, "Description": "SpamBayes Outlook Addin", ! "Date": "May 2004", ! "Full Description": "%(Description)s Version 1.0rc1 (%(Date)s)", "Full Description Binary": ! "%(Description)s Binary Version 1.0rc1 (%(Date)s)", # Note this means we can change the download page later, and old # versions will still go to the new page. --- 40,50 ---- # 0.99 indicates '1.0b/rc/' so will go 0.992 etc, until a real # 1.0, which can get 1.0 :) ! "Version": 0.993, ! "BinaryVersion": 0.993, "Description": "SpamBayes Outlook Addin", ! "Date": "June 2004", ! "Full Description": "%(Description)s Version 1.0rc2 (%(Date)s)", "Full Description Binary": ! "%(Description)s Binary Version 1.0rc2 (%(Date)s)", # Note this means we can change the download page later, and old # versions will still go to the new page. *************** *** 58,65 **** "BinaryVersion": 0.6, "Description": "SpamBayes POP3 Proxy", ! "Date": "May 2004", ! "Full Description": """%(Description)s Version 1.0rc1 (%(Date)s)""", "Full Description Binary": ! """%(Description)s Binary Version 1.0rc1 (%(Date)s)""", # Note this means we can change the download page later, and old # versions will still go to the new page. --- 58,65 ---- "BinaryVersion": 0.6, "Description": "SpamBayes POP3 Proxy", ! "Date": "June 2004", ! "Full Description": """%(Description)s Version 1.0rc2 (%(Date)s)""", "Full Description Binary": ! """%(Description)s Binary Version 1.0rc2 (%(Date)s)""", # Note this means we can change the download page later, and old # versions will still go to the new page. Index: __init__.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/__init__.py,v retrieving revision 1.11 retrieving revision 1.11.4.1 diff -C2 -d -r1.11 -r1.11.4.1 *** __init__.py 5 May 2004 00:38:22 -0000 1.11 --- __init__.py 23 Jun 2004 23:47:43 -0000 1.11.4.1 *************** *** 1,3 **** # package marker. ! __version__ = '1.0rc1' --- 1,3 ---- # package marker. ! __version__ = '1.0rc2' From kpitt at users.sourceforge.net Thu Jun 24 12:55:51 2004 From: kpitt at users.sourceforge.net (Kenny Pitt) Date: Thu Jun 24 14:24:26 2004 Subject: [Spambayes-checkins] website faq.txt,1.74,1.75 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25095 Modified Files: faq.txt Log Message: Add a reference and link to the RFE number in the envelope icon question so that people can maybe find the existing feature request more easily (assuming that they read the FAQ in the first place ). Index: faq.txt =================================================================== RCS file: /cvsroot/spambayes/website/faq.txt,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** faq.txt 7 Jun 2004 02:34:54 -0000 1.74 --- faq.txt 24 Jun 2004 16:55:48 -0000 1.75 *************** *** 626,630 **** Until someone comes up with a clever solution for all of this, you'll have to put up with the little envelope, sorry. Note that there is a feature request ! already open for this, which you may add to if you have comments to make. --- 626,633 ---- Until someone comes up with a clever solution for all of this, you'll have to put up with the little envelope, sorry. Note that there is a feature request ! already open for this (`RFE 774978`_), which you may add to if you have comments ! to make. ! ! .. _`RFE 774978`: http://sourceforge.net/tracker/index.php?func=detail&aid=774978&group_id=61702&atid=498106 From anadelonbrin at users.sourceforge.net Fri Jun 25 01:12:13 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Fri Jun 25 01:12:17 2004 Subject: [Spambayes-checkins] website faq.txt,1.75,1.76 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17564 Modified Files: faq.txt Log Message: Add a FAQ about proxy chaining. Feel free to make this clearer ;) Index: faq.txt =================================================================== RCS file: /cvsroot/spambayes/website/faq.txt,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** faq.txt 24 Jun 2004 16:55:48 -0000 1.75 --- faq.txt 25 Jun 2004 05:12:10 -0000 1.76 *************** *** 1421,1424 **** --- 1421,1462 ---- + I already have a POP3 proxy so how can I use sb_server? + ------------------------------------------------------- + + The solution here is to chain the proxies together. SpamBayes (sb_server) + doesn't really care where in the chain it is, although some of the other + proxies (often anti-virus software like Norton Anti-Virus or AVG) sometimes + do. + + The easiest solution is to leave your other proxy set up exactly as it was + before SpamBayes. Then look in your email client to see what port it is + using (it'll probably be connecting to "localhost" or "127.0.0.1"), and set + SpamBayes to collect mail from localhost on that port, rather than from + your mail server, and forward to localhost (on any free port). This means + that mail arrives at your mail server, then goes through your other proxy, + then through SpamBayes, then arrives at your mail client. This has been + found to work with AVG, for example. + + Some proxies, however, may force your mail client (e.g. Outlook Express) to + get mail from a particular place (IIRC, some flavours of Norton do this). + In this case, you need to leave your mail client set up as it is, and change + the settings of your other proxy instead. So get the proxy to get mail from + localhost (on any free port) and have SpamBayes get mail from the mail + server and forward to localhost (on the port you set up the other proxy + goes through SpamBayes, then through your other proxy, then arrives at your + mail client. + + You should be able to chain more than two proxies together with a similar + process, if necessary. + + How do you know which one you should use? Trial and error, basically. I'd + suggest trying the first solution first, as it is the most straightforward, + but if you find that your mail client keeps 'magically' changing back to + the original settings, you'll probably need to use the second one. If + you can't manage to get either one working, be sure to email the mailing + list asking for help - with any many details as possible, including what + you have already tried. + + Development =========== From montanaro at users.sourceforge.net Fri Jun 25 21:47:59 2004 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Fri Jun 25 21:48:03 2004 Subject: [Spambayes-checkins] spambayes/spambayes postfixproxy.py,NONE,1.1 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12986 Added Files: postfixproxy.py Log Message: first cut untested proxy filter for use with PostFix 2.1's content filter stuff. It imports but has not been tested beyond that. (Need it checked in to do a sane cvs checkout on bag.python.org.) --- NEW FILE: postfixproxy.py --- #!/usr/bin/env python """ Proxy class used to insert Spambayes training between two Postfix servers. For details, see . """ import smtpd import email.Parser from spambayes import Options, hammie __all__ = ['SpambayesProxy'] # stolen from sb_filter.py # XXX should probably be enhanced to select training database based upon # message recipients, but let's see how far a single database gets us. class HammieFilter(object): def __init__(self): options = Options.options # This is a bit of a hack to counter the default for # persistent_storage_file changing from ~/.hammiedb to hammie.db # This will work unless a user: # * had hammie.db as their value for persistent_storage_file, and # * their config file was loaded by Options.py. if options["Storage", "persistent_storage_file"] == \ options.default("Storage", "persistent_storage_file"): options["Storage", "persistent_storage_file"] = \ "~/.hammiedb" options.merge_files(['/etc/hammierc', os.path.expanduser('~/.hammierc')]) self.dbname, self.usedb = storage.database_type([]) self.modtime = os.path.getmtime(self.dbname) self.h = None def open(self): mtime = os.path.getmtime(self.dbname) if self.h is None or self.modtime < mtime: self.h = hammie.open(self.dbname, self.usedb, 'r') self.modtime = mtime def __del__(self): self.h = None def score_and_filter(self, msg): self.open() return self.h.score_and_filter(msg) class SpambayesProxy(smtpd.PureProxy): def __init__(self, *args, **kwds): smtpd.PureProxy.__init__(self, *args, **kwds) self.h = HammieFilter() self.spam_cutoff = Options.options["Categorization", "spam_cutoff"] def log_message(self, data): """log message to unix mbox for later review""" # XXX where should we log it? pass def process_message(self, peer, mailfrom, rcpttos, data): try: msg = email.Parser.Parser().parsestr(data) except: pass else: prob, msg = self.h.score_and_filter(msg) if prob >= self.spam_cutoff: self.push('503 Error: probable spam') self.log_message(msg) return msg.add_header("X-Peer", peer[0]) data = str(msg) refused = self._deliver(mailfrom, rcpttos, data) # TBD: what to do with refused addresses? print >> smtpd.DEBUGSTREAM, 'we got some refusals:', refused From montanaro at users.sourceforge.net Fri Jun 25 21:57:40 2004 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Fri Jun 25 21:57:44 2004 Subject: [Spambayes-checkins] spambayes/spambayes hammie.py,1.15,1.16 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14186 Modified Files: hammie.py Log Message: Rename filter() to score_and_filter() and return both the spamprob and the modified message. Useful in situations where both are needed. Saves the expense of calling both score() and filter() or calling filter() then rummaging around for the spamprob. Index: hammie.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/hammie.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** hammie.py 4 May 2004 13:02:08 -0000 1.15 --- hammie.py 26 Jun 2004 01:57:38 -0000 1.16 *************** *** 62,68 **** return self._scoremsg(msg, evidence) ! def filter(self, msg, header=None, spam_cutoff=None, ! ham_cutoff=None, debugheader=None, ! debug=None, train=None): """Score (judge) a message and add a disposition header. --- 62,68 ---- return self._scoremsg(msg, evidence) ! def score_and_filter(self, msg, header=None, spam_cutoff=None, ! ham_cutoff=None, debugheader=None, ! debug=None, train=None): """Score (judge) a message and add a disposition header. *************** *** 84,88 **** All defaults for optional parameters come from the Options file. ! Returns the same message with a new disposition header. """ --- 84,88 ---- All defaults for optional parameters come from the Options file. ! Returns the score and same message with a new disposition header. """ *************** *** 146,149 **** --- 146,157 ---- result = mboxutils.as_string(msg, unixfrom=(msg.get_unixfrom() is not None)) + return prob, result + + def filter(self, msg, header=None, spam_cutoff=None, + ham_cutoff=None, debugheader=None, + debug=None, train=None): + prob, result = self.score_and_filter( + msg, header, spam_cutoff, ham_cutoff, debugheader, + debug, train) return result From mhammond at users.sourceforge.net Fri Jun 25 23:37:11 2004 From: mhammond at users.sourceforge.net (Mark Hammond) Date: Fri Jun 25 23:37:15 2004 Subject: [Spambayes-checkins] spambayes/windows spambayes.iss, 1.15.4.1, 1.15.4.2 Message-ID: Update of /cvsroot/spambayes/spambayes/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27211 Modified Files: Tag: release_1_0-branch spambayes.iss Log Message: rc2 Index: spambayes.iss =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/spambayes.iss,v retrieving revision 1.15.4.1 retrieving revision 1.15.4.2 diff -C2 -d -r1.15.4.1 -r1.15.4.2 *** spambayes.iss 10 Jun 2004 04:49:13 -0000 1.15.4.1 --- spambayes.iss 26 Jun 2004 03:37:09 -0000 1.15.4.2 *************** *** 5,11 **** [Setup] ; Version specific constants ! AppVerName=SpamBayes 1.0rc1 ! AppVersion=0.992 ! OutputBaseFilename=spambayes-1.0rc1 ; Normal constants. Be careful about changing 'AppName' AppName=SpamBayes --- 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 From mhammond at users.sourceforge.net Fri Jun 25 23:38:44 2004 From: mhammond at users.sourceforge.net (Mark Hammond) Date: Fri Jun 25 23:38:47 2004 Subject: [Spambayes-checkins] spambayes/windows/py2exe setup_all.py, 1.17.4.1, 1.17.4.2 Message-ID: Update of /cvsroot/spambayes/spambayes/windows/py2exe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27430 Modified Files: Tag: release_1_0-branch setup_all.py Log Message: For some reason, the 2.3.3 distutils caused us to fail to find our packages. Index: setup_all.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/py2exe/setup_all.py,v retrieving revision 1.17.4.1 retrieving revision 1.17.4.2 diff -C2 -d -r1.17.4.1 -r1.17.4.2 *** setup_all.py 10 Jun 2004 04:49:13 -0000 1.17.4.1 --- setup_all.py 26 Jun 2004 03:38:41 -0000 1.17.4.2 *************** *** 10,13 **** --- 10,15 ---- sys.path.append(os.path.join(sb_top_dir, "Outlook2000/sandbox")) + import spambayes.resources + # Generate the dialogs.py file. import dialogs *************** *** 147,150 **** --- 149,153 ---- setup(name="SpamBayes", packages = ["spambayes.resources"], + package_dir = {"spambayes.resources" : spambayes.resources.__path__[0]}, # We implement a COM object. com_server=[outlook_addin], From anadelonbrin at users.sourceforge.net Sat Jun 26 02:57:10 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Sat Jun 26 02:57:14 2004 Subject: [Spambayes-checkins] website applications.ht, 1.28, 1.29 download.ht, 1.25, 1.26 index.ht, 1.33, 1.34 reply.txt, 1.13, 1.14 windows.ht, 1.38, 1.39 Message-ID: Update of /cvsroot/spambayes/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22718 Modified Files: applications.ht download.ht index.ht reply.txt windows.ht Log Message: Update for 1.0rc2 Index: applications.ht =================================================================== RCS file: /cvsroot/spambayes/website/applications.ht,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** applications.ht 5 May 2004 07:42:09 -0000 1.28 --- applications.ht 26 Jun 2004 06:57:06 -0000 1.29 *************** *** 28,32 ****

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

      !

      Alternatively, to run from source, download 1.0 release candidate 1.

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

      --- 28,32 ----

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

      !

      Alternatively, to run from source, download 1.0 release candidate 2.

      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 1.0 release candidate 1.

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

      --- 44,48 ----

      Availability

      !

      Download 1.0 release candidate 2.

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

      *************** *** 77,81 ****

      Availability

      !

      Download 1.0 release candidate 1.

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

      --- 77,81 ----

      Availability

      !

      Download 1.0 release candidate 2.

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

      *************** *** 93,97 ****

      Availability

      !

      Download 1.0 release candidate 1.

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

      --- 93,97 ----

      Availability

      !

      Download 1.0 release candidate 2.

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

      *************** *** 111,114 ****

      Availability

      !

      Download 1.0 release candidate 1.

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

      --- 111,114 ----

      Availability

      !

      Download 1.0 release candidate 2.

      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.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** download.ht 5 May 2004 06:49:20 -0000 1.25 --- download.ht 26 Jun 2004 06:57:07 -0000 1.26 *************** *** 3,13 **** Author: SpamBayes !

      Version 1.0 (Release Candidate 1) of the SpamBayes project is now available. !

      This release is primarily to shake out those last few bugs on the way to a final 1.0 ! release. Feedback to spambayes@python.org. !

      You may like to view the release notes ! or the files that make up this release.

      Microsoft Windows

      --- 3,14 ---- Author: SpamBayes !

      Version 1.0 (Release Candidate 2) of the SpamBayes project is now available. !

      The purpose of this release is solely to shake out those last few bugs on the way to a final 1.0 ! release - assuming no problems are found, a 1.0 release will follow in a few days. Feedback to ! spambayes@python.org. !

      You may like to view the release notes ! or the ! files that make up this release.

      Microsoft Windows

      Index: index.ht =================================================================== RCS file: /cvsroot/spambayes/website/index.ht,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** index.ht 5 May 2004 06:49:20 -0000 1.33 --- index.ht 26 Jun 2004 06:57:07 -0000 1.34 *************** *** 5,9 ****

      News

      !

      The Version 1.0 release candidate (both source and Windows binary installer) is now available!

      See the download page for more.

      --- 5,9 ----

      News

      !

      The second Version 1.0 release candidate (both source and Windows binary installer) is now available!

      See the download page for more.

      Index: reply.txt =================================================================== RCS file: /cvsroot/spambayes/website/reply.txt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** reply.txt 13 Apr 2004 05:11:24 -0000 1.13 --- reply.txt 26 Jun 2004 06:57:07 -0000 1.14 *************** *** 48,53 **** ----------------------------------------------- ! Please ensure that you have the latest version. As of 2004-04-13, this is ! 1.0b1 for both the source and for the binary installer (for the Outlook plug-in and sb_server). If you are still having trouble, try looking at the bug reports that are currently open: --- 48,53 ---- ----------------------------------------------- ! Please ensure that you have the latest version. As of 2004-06-26, this is ! 1.0rc2 for both the source and for the binary installer (for the Outlook plug-in and sb_server). If you are still having trouble, try looking at the bug reports that are currently open: Index: windows.ht =================================================================== RCS file: /cvsroot/spambayes/website/windows.ht,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** windows.ht 18 May 2004 01:17:07 -0000 1.38 --- windows.ht 26 Jun 2004 06:57:07 -0000 1.39 *************** *** 11,17 ****

      Latest Release

      !

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

      --- 11,17 ----

      Latest Release

      !

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

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

      Windows users using other mail clients and retrieving mail via POP3 can now download the same ! installation program and use it to install a binary version of sb_server, including a tray application.

      --- 74,78 ----

      Windows users using other mail clients and retrieving mail via POP3 can now download the same ! installation program and use it to install a binary version of sb_server, including a tray application.

      From montanaro at users.sourceforge.net Sat Jun 26 15:12:33 2004 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Sat Jun 26 15:12:36 2004 Subject: [Spambayes-checkins] spambayes/spambayes postfixproxy.py,1.1,1.2 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15120 Modified Files: postfixproxy.py Log Message: add a couple missing imports realize the message is returned as a string from score_and_filter() Index: postfixproxy.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/postfixproxy.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** postfixproxy.py 26 Jun 2004 01:47:57 -0000 1.1 --- postfixproxy.py 26 Jun 2004 19:12:31 -0000 1.2 *************** *** 7,13 **** """ import smtpd import email.Parser ! from spambayes import Options, hammie __all__ = ['SpambayesProxy'] --- 7,14 ---- """ + import os import smtpd import email.Parser ! from spambayes import Options, hammie, storage __all__ = ['SpambayesProxy'] *************** *** 64,74 **** pass else: ! prob, msg = self.h.score_and_filter(msg) if prob >= self.spam_cutoff: self.push('503 Error: probable spam') ! self.log_message(msg) return - msg.add_header("X-Peer", peer[0]) - data = str(msg) refused = self._deliver(mailfrom, rcpttos, data) --- 65,74 ---- pass else: ! msg.add_header("X-Peer", peer[0]) ! prob, data = self.h.score_and_filter(msg) if prob >= self.spam_cutoff: self.push('503 Error: probable spam') ! self.log_message(data) return refused = self._deliver(mailfrom, rcpttos, data) From montanaro at users.sourceforge.net Sat Jun 26 17:07:39 2004 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Sat Jun 26 17:07:42 2004 Subject: [Spambayes-checkins] spambayes/spambayes postfixproxy.py,1.2,1.3 Message-ID: Update of /cvsroot/spambayes/spambayes/spambayes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1612 Modified Files: postfixproxy.py Log Message: Correct the import of smtpd. It's probably already imported as __main__. We don't want to import it as smtpd in that case because the main program setup may set the DEBUGSTREAM module global. Index: postfixproxy.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/spambayes/postfixproxy.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** postfixproxy.py 26 Jun 2004 19:12:31 -0000 1.2 --- postfixproxy.py 26 Jun 2004 21:07:37 -0000 1.3 *************** *** 8,12 **** import os ! import smtpd import email.Parser from spambayes import Options, hammie, storage --- 8,20 ---- import os ! # This module is generally going to be imported from smtpd which will be run ! # as the main program and thus be named __main__. Importing smtpd directly ! # will override any global object definitions. In particular, the ! # DEBUGSTREAM setting might get hosed. ! import __main__ as smtpd ! if not hasattr(smtpd, "PureProxy"): ! import smtpd ! ! import time import email.Parser from spambayes import Options, hammie, storage *************** *** 60,63 **** --- 68,72 ---- def process_message(self, peer, mailfrom, rcpttos, data): + t1 = time.time() try: msg = email.Parser.Parser().parsestr(data) *************** *** 65,76 **** pass else: msg.add_header("X-Peer", peer[0]) prob, data = self.h.score_and_filter(msg) ! if prob >= self.spam_cutoff: ! self.push('503 Error: probable spam') ! self.log_message(data) ! return ! refused = self._deliver(mailfrom, rcpttos, data) ! # TBD: what to do with refused addresses? ! print >> smtpd.DEBUGSTREAM, 'we got some refusals:', refused --- 74,93 ---- pass else: + t2 = time.time() msg.add_header("X-Peer", peer[0]) prob, data = self.h.score_and_filter(msg) ! t3 = time.time() ! try: ! if prob >= self.spam_cutoff: ! self.log_message(data) ! print >> smtpd.DEBUGSTREAM, 'probable spam: %.2f' % prob ! return '503 Error: probable spam' ! refused = self._deliver(mailfrom, rcpttos, data) ! t4 = time.time() ! # TBD: what to do with refused addresses? ! print >> smtpd.DEBUGSTREAM, 'we got some refusals:', refused ! print >> smtpd.DEBUGSTREAM, 'deliver time:', t4-t3 ! finally: ! print >> smtpd.DEBUGSTREAM, 'parse time:', t2-t1 ! print >> smtpd.DEBUGSTREAM, 'score time:', t3-t2 From montanaro at users.sourceforge.net Mon Jun 28 09:23:03 2004 From: montanaro at users.sourceforge.net (Skip Montanaro) Date: Mon Jun 28 09:23:07 2004 Subject: [Spambayes-checkins] spambayes/contrib tte.py,1.9,1.10 Message-ID: Update of /cvsroot/spambayes/spambayes/contrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7665 Modified Files: tte.py Log Message: Worm around the extremely rare case during verbose most where the message sneaks through without either a message-id or a subject. Index: tte.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/contrib/tte.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tte.py 28 Apr 2004 03:29:46 -0000 1.9 --- tte.py 28 Jun 2004 13:22:58 -0000 1.10 *************** *** 113,117 **** if score > ham_cutoff: if verbose: ! print >> sys.stderr, "miss ham: %.6f %s" % (score, hammsg["message-id"]) hmisses += 1 tdict[hammsg["message-id"]] = True --- 113,125 ---- if score > ham_cutoff: if verbose: ! selector = (hammsg["message-id"] or ! hammsg["subject"]) ! if selector is None: ! print >> sys.stderr, "-"*25 ! print >> sys.stderr, mboxutils.as_string(hammsg) ! print >> sys.stderr, "-"*25 ! else: ! print >> sys.stderr, "miss ham: %.6f %s" % ( ! score, selector) hmisses += 1 tdict[hammsg["message-id"]] = True *************** *** 121,125 **** if score < spam_cutoff: if verbose: ! print >> sys.stderr, "miss spam: %.6f %s" % (score, spammsg["message-id"]) smisses += 1 tdict[spammsg["message-id"]] = True --- 129,141 ---- if score < spam_cutoff: if verbose: ! selector = (spammsg["message-id"] or ! spammsg["subject"]) ! if selector is None: ! print >> sys.stderr, "-"*25 ! print >> sys.stderr, mboxutils.as_string(spammsg) ! print >> sys.stderr, "-"*25 ! else: ! print >> sys.stderr, "miss spam: %.6f %s" % ( ! score, selector) smisses += 1 tdict[spammsg["message-id"]] = True From kpitt at users.sourceforge.net Tue Jun 29 09:05:51 2004 From: kpitt at users.sourceforge.net (Kenny Pitt) Date: Tue Jun 29 09:05:54 2004 Subject: [Spambayes-checkins] spambayes/Outlook2000/docs welcome.html, 1.7, 1.8 Message-ID: Update of /cvsroot/spambayes/spambayes/Outlook2000/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12237 Modified Files: welcome.html Log Message: Update screenshot of SpamBayes menu, and adjust dimensions in the HTML page to match. Index: welcome.html =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/docs/welcome.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** welcome.html 5 Nov 2003 13:05:15 -0000 1.7 --- welcome.html 29 Jun 2004 13:05:47 -0000 1.8 *************** *** 87,91 **** SpamBayes Toolbar
      --- 87,91 ---- SpamBayes Toolbar
      From kpitt at users.sourceforge.net Tue Jun 29 09:05:52 2004 From: kpitt at users.sourceforge.net (Kenny Pitt) Date: Tue Jun 29 09:05:57 2004 Subject: [Spambayes-checkins] spambayes/Outlook2000/docs/images manager-select.jpg, 1.2, 1.3 Message-ID: Update of /cvsroot/spambayes/spambayes/Outlook2000/docs/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12237/images Modified Files: manager-select.jpg Log Message: Update screenshot of SpamBayes menu, and adjust dimensions in the HTML page to match. Index: manager-select.jpg =================================================================== RCS file: /cvsroot/spambayes/spambayes/Outlook2000/docs/images/manager-select.jpg,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsxJmbud and /tmp/cvs2Qzyio differ From nascheme at users.sourceforge.net Tue Jun 29 16:38:50 2004 From: nascheme at users.sourceforge.net (Neil Schemenauer) Date: Tue Jun 29 16:38:56 2004 Subject: [Spambayes-checkins] spambayes/utilities hammie2cdb.py,NONE,1.1 Message-ID: Update of /cvsroot/spambayes/spambayes/utilities In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11627 Added Files: hammie2cdb.py Log Message: Simple script that converts hammie databases into cdb databases (usable by CdbClassifier). --- NEW FILE: hammie2cdb.py --- #/usr/bin/env python """ Convert a hammie database to a cdb database. usage %(prog)s [ -h ] [ -d | -p ] -h - Print this usage message and exit. -d file - Use a database-based classifier named file. -p file - Use a pickle-based classifier named file. """ import sys import getopt from spambayes import cdb from spambayes import storage from spambayes.cdb_classifier import CdbClassifier def usage(msg=None): if msg is not None: print >> sys.stderr, msg print >> sys.stderr, __doc__.strip() % globals() def main(): try: opts, args = getopt.getopt(sys.argv[1:], "hd:p:", ["help", "database=", "pickle="]) except getopt.GetoptError, msg: usage(msg) return 1 if len(args) != 1: usage(msg) return 1 cdbname = args[0] dbname = usedb = None for opt, arg in opts: if opt in ("-h", "--help"): usage() return 0 dbname, usedb = storage.database_type(opts) store = storage.open_storage(dbname, usedb) bayes = CdbClassifier() items = [] for word in store._wordinfokeys(): record = store._wordinfoget(word) prob = store.probability(record) items.append((word, str(prob))) cdbfile = open(cdbname, "wb") cdb.cdb_make(cdbfile, items) cdbfile.close() main() From nascheme at users.sourceforge.net Tue Jun 29 18:28:08 2004 From: nascheme at users.sourceforge.net (Neil Schemenauer) Date: Tue Jun 29 18:28:11 2004 Subject: [Spambayes-checkins] spambayes/utilities hammie2cdb.py,1.1,1.2 Message-ID: Update of /cvsroot/spambayes/spambayes/utilities In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3483 Modified Files: hammie2cdb.py Log Message: Fix usage error. Index: hammie2cdb.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/utilities/hammie2cdb.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** hammie2cdb.py 29 Jun 2004 20:38:47 -0000 1.1 --- hammie2cdb.py 29 Jun 2004 22:28:05 -0000 1.2 *************** *** 14,17 **** --- 14,18 ---- import sys + import os import getopt from spambayes import cdb *************** *** 19,22 **** --- 20,25 ---- from spambayes.cdb_classifier import CdbClassifier + prog = os.path.basename(sys.argv[0]) + def usage(msg=None): if msg is not None: *************** *** 24,30 **** print >> sys.stderr, __doc__.strip() % globals() ! def main(): try: ! opts, args = getopt.getopt(sys.argv[1:], "hd:p:", ["help", "database=", "pickle="]) except getopt.GetoptError, msg: --- 27,33 ---- print >> sys.stderr, __doc__.strip() % globals() ! def main(args): try: ! opts, args = getopt.getopt(args, "hd:p:", ["help", "database=", "pickle="]) except getopt.GetoptError, msg: *************** *** 33,37 **** if len(args) != 1: ! usage(msg) return 1 cdbname = args[0] --- 36,40 ---- if len(args) != 1: ! usage() return 1 cdbname = args[0] *************** *** 56,58 **** cdbfile.close() ! main() --- 59,62 ---- cdbfile.close() ! if __name__ == "__main__": ! sys.exit(main(sys.argv[1:])) From anadelonbrin at users.sourceforge.net Wed Jun 30 19:10:41 2004 From: anadelonbrin at users.sourceforge.net (Tony Meyer) Date: Wed Jun 30 19:10:45 2004 Subject: [Spambayes-checkins] spambayes/windows pop3proxy_tray.py,1.20,1.21 Message-ID: Update of /cvsroot/spambayes/spambayes/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15960/windows Modified Files: pop3proxy_tray.py Log Message: Fix typo identified by Richard B Barger Index: pop3proxy_tray.py =================================================================== RCS file: /cvsroot/spambayes/spambayes/windows/pop3proxy_tray.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** pop3proxy_tray.py 23 Dec 2003 03:12:40 -0000 1.20 --- pop3proxy_tray.py 30 Jun 2004 23:10:38 -0000 1.21 *************** *** 190,194 **** self.tip = None if self.use_service and not self.IsServiceAvailable(): ! print "Service not availible. Using thread." self.use_service = False --- 190,194 ---- self.tip = None if self.use_service and not self.IsServiceAvailable(): ! print "Service not available. Using thread." self.use_service = False