Import bayes_* for SpamAssassin from Debian to FreeBSD
Hello, I must export a SpamAssassin configuration in a GNU/Linux Debian 4.0. See these files: [EMAIL PROTECTED] .spamassassin # file * auto-whitelist: Berkeley DB (Hash, version 7, native byte-order) auto-whitelist.mutex: ASCII text bayes_journal:ASCII text bayes.mutex: ASCII text bayes_seen: Berkeley DB (Hash, version 7, native byte-order) bayes_toks: Berkeley DB (Hash, version 8, native byte-order) bayes_toks.dump: ASCII text user_prefs: ASCII English text [EMAIL PROTECTED] .spamassassin # spamc -V SpamAssassin Client version 3.1.5 This is my SpamAssassin on FreeBSD (p5-Mail-SpamAssassin port) : [EMAIL PROTECTED] .spamassassin # spamc -V SpamAssassin Client version 3.2.4 compiled with SSL support (OpenSSL 0.9.8e 23 Feb 2007) However, when I use these files in my ~/.spamassassin, on my FreeBSD, I have errors: spamd[51854]: bayes: cannot open bayes databases /var/spool/spamd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format spamd[51854]: bayes: cannot open bayes databases /var/spool/spamd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format spamd[51854]: auto-whitelist: open of auto-whitelist file failed: auto-whitelist: cannot open auto_whitelist_path /var/spool/spamd/.spamassassin/auto-whitelist: Inappropriate file type or format I don't understand, because they're only Berkeley databases... See the command file on these files in FreeBSD: auto-whitelist: Berkeley DB (Hash, version 7, native byte-order) auto-whitelist.mutex: ASCII text bayes.mutex: ASCII text bayes_journal:ASCII text bayes_seen: Berkeley DB (Hash, version 7, native byte-order) bayes_toks: Berkeley DB (Hash, version 8, native byte-order) bayes_toks.dump: ASCII text user_prefs: ASCII English text I tried to just import a dump from Debian (with db4.1_dump) and rebuild the database in FreeBSD (with db41_load), the problem is the same. How could I re-use these files? They are very important. Thanks for your help. -Nicolas ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Import bayes_* for SpamAssassin from Debian to FreeBSD
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Nicolas Letellier wrote: However, when I use these files in my ~/.spamassassin, on my FreeBSD, I have errors: spamd[51854]: bayes: cannot open bayes databases /var/spool/spamd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format spamd[51854]: bayes: cannot open bayes databases /var/spool/spamd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format spamd[51854]: auto-whitelist: open of auto-whitelist file failed: auto-whitelist: cannot open auto_whitelist_path /var/spool/spamd/.spamassassin/auto-whitelist: Inappropriate file type or format I don't understand, because they're only Berkeley databases... You'll need to install the same version of Berkeley DB on FreeBSD as you were using on Debian -- and you'll have to compile the perl modules SpamAssassin uses for BerkeleyDB access to use that version too. Same in this context means the first two field in the BDB version number should match -- the last field (a.k.a 'patchlevel') isn't significant. You can install multiple BDB versions in parallel from the ports tree, but to force the perl ports to link against the chosen variant you'll need something like: WITH_BDB_VER= 44 in /etc/make.conf. (See /usr/ports/Mk/bsd.database.mk for the possible values) Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. Flat 3 7 Priory Courtyard PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW, UK -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.8 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREDAAYFAkfVMEAACgkQ3jDkPpsZ+VaEDQCgpriBLoXycXtGmJPYDzMLfkoz a4AAoJsKhFvStJpGXdNBXyZnL4xYy8N9 =dNeE -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Import bayes_* for SpamAssassin from Debian to FreeBSD
Matthew Seaman a écrit : You'll need to install the same version of Berkeley DB on FreeBSD as you were using on Debian -- and you'll have to compile the perl modules SpamAssassin uses for BerkeleyDB access to use that version too. I use the same BerkeleyDB. I use db41 on FreeBSD (and db41* commands) and db41 on Debian (and db.41* commands). `file`commands returns the same headers of the file on Debian and the defaults ~/.spamassassin/tok*. When I try this: [EMAIL PROTECTED] .spamassassin # sa-learn --import --dbpath . bayes: cannot open bayes databases ./bayes_* R/O: tie failed: Inappropriate file type or format upgrading to DB_File, please be patient: ./old_bayes_seen DB_File: no database of that kind found, nothing copied GDBM_File: no database of that kind found, nothing copied NDBM_File: no database of that kind found, nothing copied SDBM_File: no database of that kind found, nothing copied upgrading to DB_File, please be patient: ./old_bayes_toks DB_File: no database of that kind found, nothing copied GDBM_File: no database of that kind found, nothing copied NDBM_File: no database of that kind found, nothing copied SDBM_File: no database of that kind found, nothing copied import failed, original files saved with old prefix What must I do? Do you think it's a Perl problem? -Nicolas ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Import bayes_* for SpamAssassin from Debian to FreeBSD
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Nicolas Letellier wrote: Matthew Seaman a écrit : You'll need to install the same version of Berkeley DB on FreeBSD as you were using on Debian -- and you'll have to compile the perl modules SpamAssassin uses for BerkeleyDB access to use that version too. I use the same BerkeleyDB. I use db41 on FreeBSD (and db41* commands) and db41 on Debian (and db.41* commands). `file`commands returns the same headers of the file on Debian and the defaults ~/.spamassassin/tok*. When I try this: [EMAIL PROTECTED] .spamassassin # sa-learn --import --dbpath . bayes: cannot open bayes databases ./bayes_* R/O: tie failed: Inappropriate file type or format upgrading to DB_File, please be patient: ./old_bayes_seen DB_File: no database of that kind found, nothing copied GDBM_File: no database of that kind found, nothing copied NDBM_File: no database of that kind found, nothing copied SDBM_File: no database of that kind found, nothing copied upgrading to DB_File, please be patient: ./old_bayes_toks DB_File: no database of that kind found, nothing copied GDBM_File: no database of that kind found, nothing copied NDBM_File: no database of that kind found, nothing copied SDBM_File: no database of that kind found, nothing copied import failed, original files saved with old prefix What must I do? Do you think it's a Perl problem? Hmmm assuming that the debian box and the new FreeBSD box have the same CPU architecture -- ie. both i386 machines the .db files should be compatible. I /think/ they're compatible between a 32 and a 64 bit machine of the same endian-ness BICBW. Can you confirm that the copies of the files on the FreeBSD box are byte-for-byte identical to the originals on the Debian box? The easiest way to do this is to generate MD5 or similar checksums on both. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. Flat 3 7 Priory Courtyard PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW, UK -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.8 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREDAAYFAkfVPmAACgkQ3jDkPpsZ+VYxAQCeJmgCIqh5A7SzvGfiOmV/lGWU jBoAnjYBv8F+fh/0Nx9Ms1nizDFz7oSu =OUTN -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]