Problem copying bayes db

Nikolaos Milas nmilas at noa.gr
Thu Oct 15 08:21:50 CEST 2020


Hello,

I am (still) on CentOS 6 and had an installation of 
amavis/clamav/spamassassin with postfix as a gateway server.

The installation (some years old) was based on packages from rpmforge 
repo (amavisd-new-2.8.0-1.el6.rf.x86_64) which are not getting updated 
any more.

I switched now to EPEL-based packages 
(amavisd-new-2.9.1-3.el6.noarch.rpm), which include different filesystem 
paths.

I would like to use my database of bayes tokens in the new installation, 
so I have copied  bayes_journal, bayes_seen and bayes_toks from the old 
path to the new installation's .spamassassin directory.

However, the db will not work: I see in the log:

   SA dbg: bayes: no dbs present, cannot tie DB R/O: 
/var/spool/amavisd/var/.spamassassin/bayes_toks

I found (by googling) that it may be due to db format change (ref.: 
http://spamassassin.1065346.n5.nabble.com/Moving-bayes-database-to-a-new-SA-installation-td2123.html) 
but which db_dump should I use for dumping and which db_load for 
re-importing?

I see that (these are the files copied from the older amavisd 
rpmforge-based installation on the same server):

# file /var/spool/amavisd/.spamassassin/bayes_*
/var/spool/amavisd/.spamassassin/bayes_journal: ASCII text
/var/spool/amavisd/.spamassassin/bayes_seen:    Berkeley DB (Hash, 
version 9, native byte-order)
/var/spool/amavisd/.spamassassin/bayes_toks:    Berkeley DB (Hash, 
version 9, native byte-order)

I tried using db_dump / db_load provided by CentOS 6:

     # which db_dump
     /usr/bin/db_dump

...but there was no difference.

I cannot figure out what should be the target berkeley db version and 
how I could manage to convert to it!

Question: What should I do so that the bayes db can be opened/read 
successfully?

Thanks in advance,
Nick



More information about the amavis-users mailing list