[Mimedefang] mimedefang && BerkeleyDB

Dirk Mueller dmuell at gmx.net
Tue Dec 17 16:53:01 EST 2002


On Mon, 16 Dez 2002, Dirk Mueller wrote:

> > > Are there known caveats when using this combination?
> > Try it...
> Well, I tried and it failed, thats why I asked :)

With help from Dmitry Sokolov <demian at elnet.ru> I was able to make it work. 
Here the relevant declaration for the record: 

use BerkeleyDB;
$dbhome = "/var/spool/MIMEDefang";
$dbenv = new BerkeleyDB::Env
             -Home => $dbhome,
             -Flags => DB_CREATE | DB_INIT_CDB | DB_INIT_MPOOL;
$dbh = tie %db_email, "BerkeleyDB::Hash",
     -Env => $dbenv,
     -Filename => "email.db",
     -Flags => DB_CREATE;


Then the %db_email hash can be used as usual in Perl and it works properly 
with concurrently running processes updating it. 


-- 
Dirk (received 662 mails today)



More information about the MIMEDefang mailing list