Bug 2556 - [2.54 -> 2.60] AWL not migrated
Summary: [2.54 -> 2.60] AWL not migrated
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Learner (show other bugs)
Version: 2.60
Hardware: PC Linux
: P5 normal
Target Milestone: 2.70
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-06 08:43 UTC by Martin Schröder
Modified: 2004-02-07 06:55 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schröder 2003-10-06 08:43:19 UTC
Hi,
after upgrading to 2.60 via CPAN, the AWL is not migrated.
auto-whitelist just sits there and SA is using newly created
auto-whitelist.{dir|pag} . 
Is there any way to migrate the AWLs by hand?

Setup is using spamd/spamc
Comment 1 Hannu Liljemark 2003-10-07 05:17:20 UTC
Try what happens if you uncomment (remove #) the line

# BEGIN { @AnyDBM_File::ISA = qw(DB_File GDBM_File NDBM_File SDBM_File); }

in DBBasedAddrList.pm. Perhaps it isn't wise to edit the files like that but... 
at least it can tell you something :)

Make sure you have the DB_File perl module installed. Also, what does

$ file auto-whitelist*

return for the database files?

I think there was some discussion on spamassassin-talk list about using db_dump 
and db_load to convert between database formats.
Comment 2 Martin Schröder 2003-10-07 05:27:16 UTC
> file auto-whitelist*
auto-whitelist:     Berkeley DB (Hash, version 7, native byte-order)
auto-whitelist.dir: GNU dbm 1.x or ndbm database, little endian
auto-whitelist.pag: GNU dbm 1.x or ndbm database, little endian
Comment 3 Martin Schröder 2003-10-07 05:31:22 UTC
DB_File is installed:
    DESCRIPTION  Tie to DB files
    CPAN_USERID  PMQS (Paul Marquess <Paul.Marquess@btinternet.com>)
    CPAN_VERSION 1.806
    CPAN_FILE    P/PM/PMQS/DB_File-1.806.tar.gz
    DSLI_STATUS  Suc  (standard,comp.lang.perl.*,C,)
    MANPAGE      DB_File - Perl5 access to Berkeley DB version 1.x
    INST_FILE    /usr/lib/perl5/5.6.0/i586-linux/DB_File.pm
    INST_VERSION 1.806
Comment 4 Martin Schröder 2003-10-07 06:01:08 UTC
Editing DBBasedAddrList.pm seems to have worked; at least now SA is using the
old AWL. :-)
Comment 5 Daniel Quinlan 2003-10-10 16:52:00 UTC
It's not really going to hurt results much at all if you just delete the old
one and the effect is only temporary.

Is this really worth fixing?  It's not even clear what we should do if, after
an upgrade to the next version, someone has a large old AWL and a newer and
smaller AWL (like you had prior to your workaround).
Comment 6 Martin Schröder 2003-10-13 01:46:21 UTC
Of course the effect is only temporary -- but unlike the bayes db the awl can
not be regenerated easily. Why does SA have to switch the db format for awl anyway?

If future releases don't migrate the awl this should at least be mentioned in
the README/INSTALL. 
Comment 7 Justin Mason 2004-02-07 15:55:55 UTC
OK, checked in a fix; the admin can now specify what modules they wish to
use, so you can select to use any module you prefer.


=item auto_whitelist_db_modules Module ...      (default: see below)

What database modules should be used for the auto-whitelist storage database
file.   The first named module that can be loaded from the perl include path
will be used.  The format is:

  PreferredModuleName SecondBest ThirdBest ...

ie. a space-separated list of perl module names.  The default is:

  DB_File GDBM_File NDBM_File SDBM_File