How to Dump and Load a Berkeley Database File
You may see errors like this in the output from "spamassassin -D -t < msg":
debug: bayes: 29843 tie-ing to DB file R/O /home/jm/.spamassassin/bayes_toks Cannot open bayes databases /home/jm/.spamassassin/bayes_* R/O: tie failed:
This means that the DB_File module could not attach to a database file, which often means an incompatible version between the file and the libraries installed.
To fix, use the db_dump and db_load tools. Here's an example of how to upgrade your bayes_toks file with Berkeley db 4.1 installed:
cd ~ db4.1_dump .spamassassin/bayes_toks > dmp db4.1_load bayes_toks < dmp mv bayes_toks .spamassassin/bayes_toks
You may need to perform the "dump" step on the original machine, and the db_dump and db_load tools may have different names on your platform.
You can do the same with the bayes_seen and auto-whitelist files, but they're not as important; I generally just blow them away:
cd ~ rm .spamassassin/bayes_seen rm .spamassassin/auto-whitelist*