[Spambayes] IMAP enhancement requests and problems seen...

Paul Michali pcm at cisco.com
Tue May 25 07:49:35 EDT 2004

Tony Meyer wrote:
>>As an enhancement, can you add a "hamfolder" configuration 
>>option that would allow ham to be moved to that folder?
> This will definitely be added post-1.0.  The code's all done (contributed by
> someone, although the name escapes me right now), but I was hesitant about
> adding it between a beta and a release-candidate/final.

It might have been me. I did send in some diffs. That would be
great, as I like being able to move ham to a folder and then
just check that folder.

> There's a tracker here:
> <http://sf.net/tracker/index.php?func=detail&aid=836642&group_id=61702&atid=
> 498106>
> Although I thought there was another one, too, which I can't find.  This one
> will be closed when it's done, anyway, if you want to monitor it.
>>A problem that I seem to have with spambayes, running the 
>>imapfilter, is that occasionally the script exits saying 
>>"Invalid server or port, please check these settings". I 
>>added some debug and the server is in-fact my mail server and 
>>the port is 143. This fails, BTW, after days of running just 
>>fine. Any ideas?
> This is a bug of sorts, at the least.  The code currently prints out that
> error if *anything* goes wrong during the initialisation of the IMAP
> connection.  It should really only print it out if that is actually the
> problem.  I'll fix this when I get a chance (I've opened a tracker so I
> remember).
> <http://sf.net/tracker/index.php?func=detail&aid=959937&group_id=61702&atid=
> 498103>
> Of course, that doesn't answer the question as to what *is* going wrong.
> Maybe the server's unavailable temporarily, or something?

It's possible the server is busy. Does spambayes retry the
connection, if it times out (I assume that it reconnects
each time it trains/classifies)?

> [...]
>>I ran with the "-b" option, and under the advanced config,
>>changed it from "dbm" to "pickle" for the database, saved,
>>and then re-ran with the "-b" option and now, when I go to
>>"More Statistics" I do not get an error. However, it says
>>that no messages have been processed.
> This is very odd.  What does your (token) database (i.e. hammie.db) use,
> pickle or dbm?  The stats one should be the same, which is dbm if you've
> never changed it.

I have to use pickle, as I cannot get dbm to work (don't
know how and the default didn't work).

>>Also, on the main page, it still says zero for all the 
>>entries (# spam, # ham, #trained, etc).
> The "this session" numbers will always be zero at the moment.  This is also
> on the list to be fixed.  The "total trained" numbers should definitely not
> be zero, though.
>>Do I need to specify a path or something, for the database file?
> By default the one the stats uses gets called spambayes.messageinfo.db and
> be in the same directory as your configuration file.  The one that the
> "total trained" numbers comes from is called "hammie.db" and should be in
> the same directory.  You can specify them manually, though (and I believe
> this is exposed via the configuration page).
> This does sound like they're not finding the same database files.  Maybe
> they're not using the same configuration file?  The top of the configuration
> page says where the file is located, although that won't find the one that
> the regular running one uses (but if it's not in the BAYESCUSTOMIZE
> environment variable, or .spambayesrc in ~, then it'll assume
> bayescustomize.ini in the current working directory).

AH, I think that is the problem. When I run spambayes for normal
processing, I use a script that changes my directory to ~ and
then runs. When I ran the second instance, I was in the ~/bin
area, so it created a second db and bayescustomize.ini file. I
don't have an environment variable set.  If I set the env variable,
do I set it to the path AND name of the .ini file or just the directory?
Is there a way to specify the DB location via env variable?

I just ran a second instance from ~ directory and it now shows
the trained messages count on the home page. However, if I go
to "More statistics...", I get the same error message as mentioned
before. When I go to advanced config, the storage database option
says "dbm", although I am using pickle. Again, if I change it, exit,
and then restart, when I go to "More Statistics..." it says that
spambayes has processed zero messages.

BTW, I use this to start spambayes:

sb_imapfilter.py -b -p hammie.db -P

It shows on the console that it is using a pickle for the DB.

PCM @ WORK (Paul Michali)

Contact info for internal use:

More information about the Spambayes mailing list