database environment [was: bogofilter 0.93.4 - new current release]

David Relson relson at osagesoftware.com
Sun Jan 9 18:49:59 CET 2005


Hi Chris,

Sorry to hear you're encountering difficulties.  Let's see if we can
figure what's going on...

On Sun, 9 Jan 2005 09:30:02 -0800
Chris Wilkes wrote:

> On Sun, Jan 09, 2005 at 10:38:57AM -0500, David Relson wrote:
> > 
> > The 0.93.4 includes additional tweaks for supporting Berkeley DB
> > transactions, new options for ./configure for russian language support
> > (specifically "--enable-russian" and "--default-charset=charsetname"),
> > and a common "long options" file shared by bogofilter, bogolexer, and
> > bogoutil.  The usual number of small changes is also included.  Read
> > below for further details.
> 
> I suffered from the same lock table errors reported by others in 0.93.3
> when trying to do a bf_compact.  I updated to 0.93.4 and tried again:
> 
> $ bf_compact $BOGOFILTER_DIR wordlist.db
>   mv: cannot overwrite directory `/home/vmail/maildirs/cwilkes/.bogofilter/.old/.bogofilter'
> $ rmdir /home/vmail/maildirs/cwilkes/.bogofilter/.old/.bogofilter
> $ bf_compact $BOGOFILTER_DIR wordlist.db
> mv: cannot move `/home/vmail/maildirs/cwilkes/.bogofilter/' to a
> subdirectory of itself, `/home/vmail/maildirs/cwilkes/.bogofilter/.old/.bogofilter'

A "mv" failure sounds like permission problems with the parent
directory.  What does 

  ls -la /home/vmail/maildirs/cwilkes/.bogofilter/.old

report?


> Can I use the wordlist.df found in bf_compact.$$/ ?

Not by itself.  A Berkeley DB environment includes _all_ the files in
the directory.  As long as _NO_ bogofilter process is running, you can
cheat and use "cp -f bf_compact.$$/* $BOGOFILTER_DIR".

> I was also able to do a
>    bogoutil -d wordlist.db | bogoutil -l wordlist.db.new
> without the lock problem.  However I sometimes get these errors:
>   $ mv wordlist.db.new wordlist.db
>   $ bogofilter -B $files -v
>   /home/vmail/maildirs/cwilkes/.bogofilter/wordlist.db.new: No such file or directory
> which is a little odd -- a simple grep for "new" in the $BOGOFILTER_DIR
> doesn't show anything referencing the new wordlist file.

That's an odd one.  Bogofilter's DEBUG macros (activated by "-x ...")
should help us.  What's the output of command:

   echo this is a test | bogofilter -x d -vv -C 

Regards,

David



More information about the Bogofilter mailing list