[Spambayes] Bugreport / Problems with initial setup

Matt Stegman matts at ksu.edu
Sat Sep 27 00:16:05 EDT 2003


I'm a new spambayes user.  I tried the Outlook plugin first, since it
was easier to install, but after about a week I've decided that I hate
Outlook and am moving back to UNIX to read my mail.  SpamBayes works
great; it's just that I hate the way Outlook works.

So I download 1.0a6, and I ran into some problems while setting up the
IMAP filter. The first time I run it to configure (sb_imapfilter.py
-b), after I enter info on the configuration page, save, and then try to
configure folders to filter, I get this on the
"Select Filter Folders" page:

500 Server error

Traceback (most recent call last):

  File "/usr/lib/python2.2/site-packages/spambayes/Dibbler.py", line 453, in found_terminator
    getattr(plugin, name)(**params)

  File "/usr/lib/python2.2/site-packages/spambayes/ImapUI.py", line 165, in onFilterfolders

  File "/usr/lib/python2.2/site-packages/spambayes/ImapUI.py", line 195, in _login_to_imap
    imap = IMAPSession(server, port)

NameError: global name 'IMAPSession' is not defined

If I save and shutdown, then run it again, I can go to select filter
folders without a problem.  This only occurs if I try to go do this
after entering the configuration information for the first time, and
haven't shutdown and restarted yet.

Once I've setup the filter folders and training folders, I go to train
SpamBayes. I run 'sb_imapfilter.py -c -t', and it goes for a while, then

Traceback (most recent call last):
  File "/usr/bin/sb_imapfilter.py", line 825, in ?
  File "/usr/bin/sb_imapfilter.py", line 811, in run
  File "/usr/bin/sb_imapfilter.py", line 647, in Train
    num_spam_trained = folder.Train(self.classifier, True)
  File "/usr/bin/sb_imapfilter.py", line 559, in Train
    for msg in self:
  File "/usr/bin/sb_imapfilter.py", line 486, in __iter__
    yield self[key]
  File "/usr/bin/sb_imapfilter.py", line 534, in __getitem__
  File "/usr/bin/sb_imapfilter.py", line 363, in get_substance
    new_msg = email.Parser.Parser().parsestr(data["RFC822"])
  File "/usr/lib/python2.2/email/Parser.py", line 75, in parsestr
    return self.parse(StringIO(text), headersonly=headersonly)
  File "/usr/lib/python2.2/email/Parser.py", line 64, in parse
    self._parsebody(root, fp, firstbodyline)
  File "/usr/lib/python2.2/email/Parser.py", line 245, in _parsebody
    raise Errors.BoundaryError(
email.Errors.BoundaryError: multipart message with no defined boundary

If I run it with -v, I can see at what point it died, and I found the
message it died on.  It's spam (of course).  I think it's dying on this

Content-Type: multipart/mixed;

My mail client gives no trouble with this message, nor did the Outlook
plugin complain when I trained it on this same corpus.  If I delete this
message and retrain, it goes OK.

One additional thing is that after it died, I had two copies of all my
messages.  One with a header "X-Spambayes-MailID" header, and one
without, which was marked deleted.  I guess this is how SpamBayes checks
if it's trained on that message already?  Why not use the Message-ID
header if it exists?

    -Matt Stegman

More information about the Spambayes mailing list