bf_compact

R Kimber rkimber at ntlworld.com
Sat May 14 23:57:11 CEST 2005


On Sat, 14 May 2005 20:18:54 +0200
Matthias Andree <matthias.andree at gmx.de> wrote:

> > Yes.  Thanks.  I wasn't offended - just that I used it as advertised
> > and my wordlist and config files disappeared.
> 
> If your *wordlist* disappeared, then that is a genuine bug that needs
> to be fixed - in that case, have my apologies for mis-reading your
> previous mail. Configuration files in .bogofilter? DB_CONFIG perhaps,
> we are copying that if present, but no other configuration files
> should be in that directory, no?

/etc/bogofilter.cf suggests one can have:-
user_config_file=~/.bogofilter/config
which is what I had.

More accurately, for the record, what happened was that my .bogofilter
directory contained a config file, a wordlist.db, and some log files
etc left in place from previously running in tansactional mode, plus a
copy of a previous wordlist in a subdirectory.

After running first

bf_compact .

and then (after having got mv: cannot move `.' to `..old': Device or
resource busy) I ran

bf_compact ~/.bogofilter wordlist.db

I was left with an empty wordlist.db (reduced from about
20MB+ to about 8K) in .bogofilter and also in .bogofilter.old, and all
the other files in .bogofilter were deleted. including the config file,
the log files, and the subdirectory.

> > It might still be better for those that use it if bf_compact got its
> > transactional info from the config file, though, as there might be
> > old unused log files around from a previous transactional usage - or
> > wouldn't that matter?
> 
> That wouldn't work reliably. I don't need to configure transactions, I
> can also just create the wordlist (i. e. the very first registration
> of spam or ham) in transactional mode and bogofilter will remember
> this, but couldn't tell from the configuration that you were using
> transactions.

I just thought that because bf_compact seems to check whether it's
dealing with a transactional mode by looking for log files, if it
detects old log files it might be doing something to a non-transactional
setup that is best not done. But David has said this is not so, so
that's fine.

If it's any help, I could try to write an alternative script using the
default directory structure, but I guess if it's not necessary to
compact the db anyway, there's no point.  And it's not as if I have a
slow machine :)

- Richard
-- 
Richard Kimber
http://www.psr.keele.ac.uk/



More information about the Bogofilter mailing list