jettero has asked for the wisdom of the Perl Monks concerning the following question:
I wish to make a simple program that dumps the entries in my sendmail access.db.
I fired up DB_File, and discovered that it wouldn't work. It fails silently (ie doesn't populate $!). If I have O_CREAT on, it wants to make a new db rather than read it -- it reports this by populating $! with "file exists."
I have a testing.db that I created with DB_File (and can read with no trouble) and my sendmail.db that was created with 'makemap hash'. Using the dbinfo app that comes with DB_File, I turned up this:
testing file db_file.db... File Type: Berkeley DB Hash file. File Version ID: 7 Built with Berkeley DB: 3.1.x -> 4.0.x Byte Order: Little Endian Magic: 061561 Encryption: Not Supported
testing file sendmail.db... File Type: Berkeley DB Hash file. File Version ID: 8 Built with Berkeley DB: 4.1.x or greater Byte Order: Little Endian Magic: 061561 Encryption: Disabled
I don't really know what those version numbers are. Is my problem a libdb version mismatch? Is there a better cpan module for reading these? Am I missing something simple?
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DB_File and sendmail's makemap hash
by jettero (Monsignor) on Mar 09, 2004 at 15:05 UTC |