Viktor Dukhovni via Postfix-users:
> On Fri, Dec 26, 2025 at 03:10:40PM -0500, Wietse Venema via Postfix-users
> wrote:
>
> > Here is a proposal that avoids deep invasive changes shortly before
> > a new stable releaas:
> >
> > address_verify_map = $default_cache_db_type:$data_directory/verify_cache
> > postscreen_cache_map =
> > $default_cache_db_type:$data_directory/postscreen_cache
> >
> > With a built-in default of:
> >
> > default_cache_db_type (default: lmdb if default_database_type is lmdb,
> > otherwise btree)
> > The default database type for address_verify_map and
> > postscreen_cache_map.
> >
> > This can be overruled at build time with:
> >
> > make makefiles default_cache_db_type=whatever
> >
> > However, to build for a non-BerkeleyDB system, people may want to use:
> >
> > make makefiles default_database_type=lmdb CCARGS="-DNO_DB ..."
> >
> > Which will already do the right thing for default_cache_db_type.
>
> LGTM. The distros still face a tricky issue with migrating non-cache
> extant tables when `default_database_type` changes.
It's updloaded as postfix-3.12-20251226 (and the autogenerated
postfix-3.11-RC2).
> With 20/20 hindsight, it would have been a good idea to have a
> "Makefile" in /etc/postfix that rebuilds all the expected tables, and
> that users are strongly encouraged to update if/when they add custom
> tables, override the default database type, ...
>
> Basically after installing a new Postfix, always run "make" in the
> primary configuration directory (perhaps also in any additional
> instance directories that have a Makefile).
How would this automate the migration from one default database
type to another? As a start one would replace hard-coded "local
file" database types in main.cf and master.cf with parameterized
types.
That could work for databases that are regenerated by processing a
source file. If a site migrates from Berkeley DB (suffix: .db) to
LMDB (suffix: .lmdb) the Makefile would need to have parameterized
suffix rules that tell it that it should now make .lmdb files.
Either that or there would have to be some ueber tool that generates
Makefile suffix rules based on even more obscure rules.
And a different approach is needed if one wants to migrate cache
files that have no "source file" for example from .btree to .lmdb.
Wiets
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]