<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.9">
</HEAD>
<BODY>
There may be a problem in 1.0rc1 in using MySQL, which I'm trying to do to see how it would go.&nbsp; Currently you get the traceback:<BR>
<BR>
Traceback (most recent call last):<BR>
&nbsp; File &quot;/usr/bin/sb_imapfilter.py&quot;, line 121, in ?<BR>
&nbsp;&nbsp;&nbsp; from spambayes.UserInterface import UserInterfaceServer<BR>
&nbsp; File &quot;/usr/lib/python2.3/site-packages/spambayes/UserInterface.py&quot;, line 89, in ?<BR>
&nbsp;&nbsp;&nbsp; from spambayes import Stats<BR>
&nbsp; File &quot;/usr/lib/python2.3/site-packages/spambayes/Stats.py&quot;, line 34, in ?<BR>
&nbsp;&nbsp;&nbsp; from spambayes.message import msginfoDB<BR>
ImportError: cannot import name msginfoDB<BR>
<BR>
Looking at message.py shows there isna't a case for &quot;mysql&quot; in the messageinfo.db setup:<BR>
<BR>
message_info_db_name = get_pathname_option(&quot;Storage&quot;, &quot;messageinfo_storage_file&quot;)<BR>
if options[&quot;Storage&quot;, &quot;persistent_use_database&quot;] is True or \<BR>
&nbsp;&nbsp; options[&quot;Storage&quot;, &quot;persistent_use_database&quot;] == &quot;dbm&quot;:<BR>
&nbsp;&nbsp;&nbsp; msginfoDB = MessageInfoDB(message_info_db_name)<BR>
elif options[&quot;Storage&quot;, &quot;persistent_use_database&quot;] is False or \<BR>
&nbsp;&nbsp;&nbsp;&nbsp; options[&quot;Storage&quot;, &quot;persistent_use_database&quot;] == &quot;pickle&quot;:<BR>
&nbsp;&nbsp;&nbsp; msginfoDB = MessageInfoPickle(message_info_db_name)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>
<BR>
I'm not sure exactly how MySQL is supposed to work, I can't find docs on it other than source code comments =).&nbsp; My impressions is the msgingo.db is *not* placed into the mysql database at this time, only the hammie.db.<BR>
<BR>
I'd like to work on this some more, as I'd love to be able to setup spambayes for a mass-hosting email server; users still have their own hammie.db's<BR>
<BR>
Mike<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE><FONT COLOR="#0000ff"><I>You need to set the [Storage] persistent_use_database option to &quot;mysql&quot;.
You can do this via the web interface, I believe, or just by manually
editing your configuration file.  The 'name' of your database should be
something like:

    host:localhost user:username pass:password dbname:database_name

(If you leave any one item out, they default to:

  host = &quot;localhost&quot;
  username = &quot;root&quot;
  password = &quot;&quot;
  db_name = &quot;spambayes&quot;
)

You need to set the mySQL db up yourself first, creating the appropriate
database.  The table &quot;bayes&quot; will be created by SpamBayes.

Feedback would be great!
</I></PRE>
</BLOCKQUOTE>
<PRE><A HREF="http://mail.python.org/mailman/listinfo/spambayes"></A></PRE>
</BODY>
</HTML>