Converting old wordlist.db to Berkeley format?

Geoff capsthorne at yahoo.co.uk
Sat Sep 3 13:52:51 CEST 2016


First, thank you so much Matthias and Charles for your prompt and helpful
advice.  The good news is that (that after some hours tinkering), I have a
working bogofilter again.  The less satisfying news for experts is that I
did not arrive at that by properly solving the underlying problem.

In my old, self-compiled, bogofilter I had not set any 
"--with-database" when configuring. That was a legacy of the difficulties I had
when database use came along. Because I have just assembled a new computer, I
thought I would use Arch bogofilter package.  That is configured
"--enable-transactions --with-database=db", and I suppose that is why my effort
to compact using my usual "bogoutil -d wordlist.db | bogoutil -l
wordlist.db.new" generated all the logfiles etc.

Following all your advice, I did export a wordlist.txt from my old machine /
tools and import it to the new system. The result (over several tries and
variations), was that db_verify would initially report that the database was
valid, but after bogofilter had operated on just one new test email (including
an imaginary word so that I could trace it).  bogofiler -w would find the word,
correctly classified, but db_verify would now report:

db_verify ~/.bogofilter/wordlist.db
db_verify: BDB2506 file unknown has LSN 576/24366, past end of log at 1/28
db_verify: BDB2507 Commonly caused by moving a database from one database
environment db_verify: BDB2508 to another without clearing the database LSNs,
or by removing all of db_verify: BDB2509 the log files from a database
environment db_verify: BDB0522 Page 0: metadata page corrupted
db_verify: BDB0523 Page 0: could not check metadata page
db_verify: /home/me/.bogofilter/wordlist.db: BDB0090 DB_VERIFY_BAD:
Database verification failed BDB5105 Verification
of /home/me/.bogofilter/wordlist.db failed.

db_verify was a bit of a nuisance in that it demanded more mutex space than was
allocated by the system, and sometimes would not run at all for that reason.
Google shows that this is an old issue and (apparently) unrelated to the
problem I was trying to solve.

Attempts to use bf_compact always failed (even if I imported the wordlist.txt
with transactions), eg:

Error accessing file or directory 'bf_compact.8423/wordlist.db'.
error #2 - No such file or directory.
BDB1579 Database handles still open at environment close
DB_ENV->close(0x15f6bf0): Invalid argument

In this case bf_compact.8423 (or whatever random extension number it
generated), was created but contained no wordlist.db.

I gave up and self-compiled bogofilter 1.2.4 without transactions / database.
That is working as before, and I can compact it as I used to.

I did look for the db_53 commands that Charles suggested, but they are not on
my system.

This is just my home, single-user, computer and I think that what I have is
going to be satisfactory.

Thanks again for your help.

Geoff


More information about the bogofilter mailing list