Purpose of this document
========================

This document describes how to build Postfix with third-party
constant data base (CDB) library.  CDB is fast and lightweight
database that lacks online update capability.

Building Postfix with CDB
=========================

Currently, postfix has support for two CDB implementations --
original cdb-0.75 from D.J.Bernstein (http://cr.yp.to/cdb.html),
and tinycdb (0.5 and earlier) from M.Tokarev (ftp://ftp.corpit.ru/pub/tinycdb).
Tinycdb is preferred, since it is a bit faster, has some extra
useful functionality and much simpler to use.

To build Postfix after you installed the CDB, use something like:

    % make tidy
    % CDB=../../../tinycdb-0.5
    % make -f Makefile.init makefiles "CCARGS=-DHAS_CDB -I$CDB" \
	"AUXLIBS=$CDB/libcdb.a"
    % make

for tinycdb, or, for D.J.B. version,

    % make tidy
    % CDB=../../../cdb-0.75
    % make -f Makefile.init makefiles "CCARGS=-DHAS_CDB -I$CDB" \
	"AUXLIBS=$CDB/cdb.a $CDB/alloc.a $CDB/buffer.a $CDB/unix.a $CDB/byte.a"
    % make

After postfix built with cdb support, you can use "cdb" map type
where hash, btree or dbm was used, except of non-static (i.e.
updateable at run time) databases.
