From: Wietse Z Venema Date: Mon, 16 Mar 2026 05:00:00 +0000 (-0500) Subject: postfix-3.12-20260316 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=2336192fdbec811b046e31063f29e8af9cd0e7ae;p=thirdparty%2Fpostfix.git postfix-3.12-20260316 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index c578b1d40..65fba8718 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -30632,8 +30632,8 @@ Apologies for any names omitted. Preparation: move src/global/dynamicmaps.[hc] to src/util without making any other code changes. This is a baseline for developing support to build tests with "shared=yes - dynamicmaps=yes". Curently, tests must be built with - "shared=yes dynamicmaps=no", which is annoying. Files: + dynamicmaps=yes". Currently, tests must be built with + "shared=yes dynamicmaps=no", which is annoying. Files: util/dynamicmaps.[hc], util/Makefile.in, global/Makefile.in. 20260312 @@ -30654,3 +30654,21 @@ Apologies for any names omitted. Deleted mail_version_parse() and mail_version_free() infrastructure. It was used only by test code. Files: src/global/mail_version.[hc]. + +20260316 + + Cleanup: Berkeley DB plug-in support, like CDB and other + databases that have a third-party dependency. Files: + conf/dynamicmaps.cf, conf/postfix-files, makedefs, Makefile.in, + proto/DB_README.html, util/dict_open.c, util/Makefile.in, + util/sys_defs.h. + + Build incompatibility: on non-Linux, non-BSD systems, if + CCARGS="...-DHAS_DB...", then it may be necessary to also + specify AUXLIBS_DB="-ldb". + + Bugfix (defect introduced: 20260310) a change, to set the + service_name default value to "amnesiac", violated a test + that parameter names in postconf output must match 1:1 with + parameter names in the postlink script. File: global/mail_params.c, + postconf/postconf_builtin.c. diff --git a/postfix/Makefile.in b/postfix/Makefile.in index 8d7501ada..041cf9336 100644 --- a/postfix/Makefile.in +++ b/postfix/Makefile.in @@ -108,7 +108,10 @@ libexec/postmulti-script: conf/postmulti-script meta/dynamicmaps.cf: conf/dynamicmaps.cf Makefile rm -f $@ && $(EXPAND) conf/dynamicmaps.cf | $(AWK) ' \ BEGIN { split("'"$(DEFINED_MAP_TYPES)"'", map_types); \ - for (n in map_types) has_type[map_types[n]] = n } \ + for (n in map_types) has_type[map_types[n]] = n; \ + if (has_type["db"]) { \ + has_type["hash"] = has_type["btree"] = 1; \ + delete has_type["db"] } } \ /^#/ { print } \ /^[a-z]/ { if (has_type[$$1]) print } \ ' >$@ diff --git a/postfix/README_FILES/DB_README b/postfix/README_FILES/DB_README index 266464c81..8c050ad17 100644 --- a/postfix/README_FILES/DB_README +++ b/postfix/README_FILES/DB_README @@ -10,8 +10,6 @@ Postfix database type "hash" and "btree". The name of a Postfix Berkeley DB database is the name of the database file without the ".db" suffix. Berkeley DB databases are maintained with the postmap(1) command. -Note: Berkeley DB version 4 is not supported by Postfix versions before 2.0. - This document describes: 1. How to build Postfix without Berkeley DB support even if the system comes @@ -63,18 +61,25 @@ To build Postfix after you installed the Berkeley DB from source code, use something like: % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \ - AUXLIBS="-L/usr/local/BerkeleyDB/lib -ldb" + AUXLIBS_DB="-L/usr/local/BerkeleyDB/lib -ldb" % make +Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier versions, use +AUXLIBS instead. + If your Berkeley DB shared library is in a directory that the RUN-TIME linker does not know about, add a "-Wl,-R,/path/to/directory" option after "-ldb". Solaris needs this: % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \ - AUXLIBS="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb" + AUXLIBS_DB="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib - + ldb" % make +Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier versions, use +AUXLIBS instead. + The exact pathnames depend on the Berkeley DB version, and on how it was installed. @@ -97,9 +102,12 @@ Postfix builds with the default DB version that ships with the system. To build Postfix on BSD systems with a non-default DB version, use a variant of the following commands: - % make makefiles CCARGS=-I/usr/include/db3 AUXLIBS=-ldb3 + % make makefiles CCARGS=-I/usr/include/db3 AUXLIBS_DB=-ldb3 % make +Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier versions, use +AUXLIBS instead. + Warning: the file format produced by Berkeley DB version 1 is not compatible with that of versions 2 and 3 (versions 2 and 3 have the same format). If you switch between DB versions, then you may have to rebuild all your Postfix DB @@ -168,7 +176,10 @@ When building Postfix fails with: Add the "-lpthread" library to the "make makefiles" command. - % make makefiles .... AUXLIBS="... -lpthread" + % make makefiles .... AUXLIBS_DB="... -lpthread" + +Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier versions, use +AUXLIBS instead. More information is available at https://www.oracle.com/database/technologies/ related/berkeleydb.html. diff --git a/postfix/conf/dynamicmaps.cf b/postfix/conf/dynamicmaps.cf index feeb6a11e..073013456 100644 --- a/postfix/conf/dynamicmaps.cf +++ b/postfix/conf/dynamicmaps.cf @@ -1,5 +1,7 @@ # dict-type so-name (pathname) dict-function mkmap-function cdb ${LIB_PREFIX}cdb${LIB_SUFFIX} dict_cdb_open mkmap_cdb_open +hash ${LIB_PREFIX}db${LIB_SUFFIX} dict_hash_open mkmap_hash_open +btree ${LIB_PREFIX}db${LIB_SUFFIX} dict_btree_open mkmap_btree_open ldap ${LIB_PREFIX}ldap${LIB_SUFFIX} dict_ldap_open lmdb ${LIB_PREFIX}lmdb${LIB_SUFFIX} dict_lmdb_open mkmap_lmdb_open mongodb ${LIB_PREFIX}mongodb${LIB_SUFFIX} dict_mongodb_open diff --git a/postfix/conf/postfix-files b/postfix/conf/postfix-files index 88c337161..0d95a975d 100644 --- a/postfix/conf/postfix-files +++ b/postfix/conf/postfix-files @@ -73,6 +73,7 @@ $shlib_directory/lib${LIB_PREFIX}dns${LIB_SUFFIX}:f:root:-:755 $shlib_directory/lib${LIB_PREFIX}tls${LIB_SUFFIX}:f:root:-:755 $shlib_directory/lib${LIB_PREFIX}master${LIB_SUFFIX}:f:root:-:755 $shlib_directory/${LIB_PREFIX}cdb${LIB_SUFFIX}:f:root:-:755 +$shlib_directory/${LIB_PREFIX}db${LIB_SUFFIX}:f:root:-:755 $shlib_directory/${LIB_PREFIX}ldap${LIB_SUFFIX}:f:root:-:755 $shlib_directory/${LIB_PREFIX}lmdb${LIB_SUFFIX}:f:root:-:755 $shlib_directory/${LIB_PREFIX}mongodb${LIB_SUFFIX}:f:root:-:755 diff --git a/postfix/html/DB_README.html b/postfix/html/DB_README.html index 5080ddd54..714cf5708 100644 --- a/postfix/html/DB_README.html +++ b/postfix/html/DB_README.html @@ -27,9 +27,6 @@ Berkeley DB implements the Postfix database type "hash" and of the database file without the ".db" suffix. Berkeley DB databases are maintained with the postmap(1) command.

-

Note: Berkeley DB version 4 is not supported by Postfix versions -before 2.0.

-

This document describes:

    @@ -96,11 +93,14 @@ source code, use something like:

     % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
    -    AUXLIBS="-L/usr/local/BerkeleyDB/lib -ldb"
    +    AUXLIBS_DB="-L/usr/local/BerkeleyDB/lib -ldb"
     % make
     
    +

    Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier +versions, use AUXLIBS instead.

    +

    If your Berkeley DB shared library is in a directory that the RUN-TIME linker does not know about, add a "-Wl,-R,/path/to/directory" option after "-ldb".

    @@ -110,11 +110,14 @@ linker does not know about, add a "-Wl,-R,/path/to/directory" option after
     % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
    -    AUXLIBS="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
    +    AUXLIBS_DB="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
     % make
     
    +

    Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier +versions, use AUXLIBS instead.

    +

    The exact pathnames depend on the Berkeley DB version, and on how it was installed.

    @@ -143,11 +146,14 @@ use a variant of the following commands:

    -% make makefiles CCARGS=-I/usr/include/db3 AUXLIBS=-ldb3
    +% make makefiles CCARGS=-I/usr/include/db3 AUXLIBS_DB=-ldb3
     % make
     
    +

    Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier +versions, use AUXLIBS instead.

    +

    Warning: the file format produced by Berkeley DB version 1 is not compatible with that of versions 2 and 3 (versions 2 and 3 have the same format). If you switch between DB versions, then you may @@ -235,10 +241,13 @@ undefined reference to `pthread_mutex_trylock'

    -% make makefiles .... AUXLIBS="... -lpthread"
    +% make makefiles .... AUXLIBS_DB="... -lpthread"
     
    +

    Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier +versions, use AUXLIBS instead.

    +

    More information is available at https://www.oracle.com/database/technologies/related/berkeleydb.html.

    diff --git a/postfix/html/postalias.1.html b/postfix/html/postalias.1.html index 20799a080..5c4e311e1 100644 --- a/postfix/html/postalias.1.html +++ b/postfix/html/postalias.1.html @@ -38,7 +38,7 @@ POSTALIAS(1) POSTALIAS(1) substitutions. In a database file, postalias(1) stores keys in the external (quoted) - form. Historically, Postfix versions 3.10 and earlier stored the inter- + form. Historically, Postfix versions 3.11 and earlier store the inter- nal (unquoted) form. This was not consistent with postmap(1) behavior. For backwards compatibility, Postfix programs will search with the legacy internal form only if the preferred external form is not found, diff --git a/postfix/makedefs b/postfix/makedefs index 2b9242d44..96f22ccef 100644 --- a/postfix/makedefs +++ b/postfix/makedefs @@ -646,7 +646,9 @@ EOF SYSTYPE=LINUX$RELEASE_MAJOR case "$CCARGS" in *-DNO_DB*) ;; - *-DHAS_DB*) ;; + *-DHAS_DB*) case "$AUXLIBS_DB" in + "") AUXLIBS_DB=-ldb;; + esac;; *) if [ -f /usr/include/db.h ] then : we are all set @@ -662,7 +664,7 @@ EOF echo "See: https://www.postfix.org/NON_BERKELEYDB_README.html#build-conf" 1>&2 exit 1 fi - SYSLIBS="-ldb" + AUXLIBS_DB="-ldb" ;; esac for name in nsl resolv @@ -701,7 +703,7 @@ EOF echo "Alternatively, build with CCARGS=\"-NO_DB ...\"" 1>&2 exit 1 fi - SYSLIBS="-ldb" + AUXLIBS_DB="-ldb" ;; esac for name in nsl resolv @@ -745,14 +747,14 @@ HP-UX.B.10.*) SYSTYPE=HPUX10 CCARGS="$CCARGS -DNO_SNPRINTF" if [ -f /usr/lib/libdb.a ]; then CCARGS="$CCARGS -DHAS_DB" - SYSLIBS=-ldb + AUXLIBS_DB=-ldb fi ;; HP-UX.B.11.*) SYSTYPE=HPUX11 SYSLIBS=-lnsl if [ -f /usr/lib/libdb.a ]; then CCARGS="$CCARGS -DHAS_DB" - SYSLIBS="$SYSLIBS -ldb" + AUXLIBS_DB="-ldb" fi ;; ReliantUNIX-?.5.43) SYSTYPE=ReliantUnix543 @@ -1262,8 +1264,26 @@ ${WARN='-Wall -Wno-comment -Wformat -Wimplicit -Wmissing-prototypes \ # and we don't try to figure out which awk versions have tolower(). # The following was validated in 2014 on FreeBSD/Linux and Solaris 9. +# But first, find out if sys_defs.h may contain '#define HAS_DB'. +# Historically, this was how Postfix builds "knew" BDB was supported. +trap 'rm -f makedefs.test makedefs.test.[co]' 0 1 2 3 15 + cat >makedefs.test.c <<'EOF' +#include "src/util/sys_defs.h" +#include +int main(void) +{ +#ifdef HAS_DB + printf("-DHAS_DB\n"); +#endif + return (0); +} +EOF +eval ${CC-gcc} ${CCARGS} -D$SYSTYPE -o makedefs.test makedefs.test.c || exit 1 +HAS_DB=`./makedefs.test` || exit 1 +rm -f makedefs.test makedefs.test.[co] + DEFINED_MAP_TYPES=` - echo $CCARGS | sed 's/=[^ ]*//g' | + echo $HAS_DB $CCARGS | sed 's/=[^ ]*//g' | tr -cd '\- _ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | ${AWK} ' { for (n = 1; n <= NF; n++) @@ -1274,7 +1294,7 @@ DEFINED_MAP_TYPES=` # Propagate AUXLIBS_FOO or merge them into global AUXLIBS (i.e. SYSLIBS). -PLUGGABLE_MAPS="CDB LDAP LMDB MONGODB MYSQL PCRE PGSQL SDBM SQLITE" +PLUGGABLE_MAPS="CDB DB LDAP LMDB MONGODB MYSQL PCRE PGSQL SDBM SQLITE" case "$dynamicmaps" in yes) for name in $PLUGGABLE_MAPS diff --git a/postfix/man/man1/postalias.1 b/postfix/man/man1/postalias.1 index e9cce32d6..798db5ad7 100644 --- a/postfix/man/man1/postalias.1 +++ b/postfix/man/man1/postalias.1 @@ -41,8 +41,8 @@ text, such as regexp: and pcre:. This resulted in loss of information with $\fInumber\fR substitutions. In a database file, \fBpostalias\fR(1) stores keys in the external -(quoted) form. Historically, Postfix versions 3.10 and earlier -stored the internal (unquoted) form. This was not consistent +(quoted) form. Historically, Postfix versions 3.11 and earlier +store the internal (unquoted) form. This was not consistent with \fBpostmap\fR(1) behavior. For backwards compatibility, Postfix programs will search with the legacy internal form only if the preferred external form is not found, and the internal diff --git a/postfix/proto/DB_README.html b/postfix/proto/DB_README.html index 4b58b9f02..972205a25 100644 --- a/postfix/proto/DB_README.html +++ b/postfix/proto/DB_README.html @@ -27,9 +27,6 @@ Berkeley DB implements the Postfix database type "hash" and of the database file without the ".db" suffix. Berkeley DB databases are maintained with the postmap(1) command.

    -

    Note: Berkeley DB version 4 is not supported by Postfix versions -before 2.0.

    -

    This document describes:

      @@ -96,11 +93,14 @@ source code, use something like:

       % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
      -    AUXLIBS="-L/usr/local/BerkeleyDB/lib -ldb"
      +    AUXLIBS_DB="-L/usr/local/BerkeleyDB/lib -ldb"
       % make
       
      +

      Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier +versions, use AUXLIBS instead.

      +

      If your Berkeley DB shared library is in a directory that the RUN-TIME linker does not know about, add a "-Wl,-R,/path/to/directory" option after "-ldb".

      @@ -110,11 +110,14 @@ linker does not know about, add a "-Wl,-R,/path/to/directory" option after
       % make makefiles CCARGS="-DHAS_DB -I/usr/local/BerkeleyDB/include" \
      -    AUXLIBS="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
      +    AUXLIBS_DB="-R/usr/local/BerkeleyDB/lib -L/usr/local/BerkeleyDB/lib -ldb"
       % make
       
      +

      Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier +versions, use AUXLIBS instead.

      +

      The exact pathnames depend on the Berkeley DB version, and on how it was installed.

      @@ -143,11 +146,14 @@ use a variant of the following commands:

      -% make makefiles CCARGS=-I/usr/include/db3 AUXLIBS=-ldb3
      +% make makefiles CCARGS=-I/usr/include/db3 AUXLIBS_DB=-ldb3
       % make
       
      +

      Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier +versions, use AUXLIBS instead.

      +

      Warning: the file format produced by Berkeley DB version 1 is not compatible with that of versions 2 and 3 (versions 2 and 3 have the same format). If you switch between DB versions, then you may @@ -235,10 +241,13 @@ undefined reference to `pthread_mutex_trylock'

      -% make makefiles .... AUXLIBS="... -lpthread"
      +% make makefiles .... AUXLIBS_DB="... -lpthread"
       
      +

      Note: Postfix version 3.12 and later use AUXLIBS_DB. With earlier +versions, use AUXLIBS instead.

      +

      More information is available at https://www.oracle.com/database/technologies/related/berkeleydb.html.

      diff --git a/postfix/src/global/mail_params.c b/postfix/src/global/mail_params.c index f715124aa..d7079dd2a 100644 --- a/postfix/src/global/mail_params.c +++ b/postfix/src/global/mail_params.c @@ -797,7 +797,6 @@ void mail_params_init() VAR_POSTLOG_SERVICE, DEF_POSTLOG_SERVICE, &var_postlog_service, 1, 0, VAR_DNSSEC_PROBE, DEF_DNSSEC_PROBE, &var_dnssec_probe, 0, 0, VAR_KNOWN_TCP_PORTS, DEF_KNOWN_TCP_PORTS, &var_known_tcp_ports, 0, 0, - VAR_SERVNAME, DEF_SERVNAME, &var_servname, 0, 0, 0, }; static const CONFIG_BOOL_TABLE first_bool_defaults[] = { diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 5fa1d0ffb..a1393289d 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20260312" +#define MAIL_RELEASE_DATE "20260316" #define MAIL_VERSION_NUMBER "3.12" #ifdef SNAPSHOT diff --git a/postfix/src/postalias/postalias.c b/postfix/src/postalias/postalias.c index eec322f4f..ccbd61aac 100644 --- a/postfix/src/postalias/postalias.c +++ b/postfix/src/postalias/postalias.c @@ -35,8 +35,8 @@ /* information with $\fInumber\fR substitutions. /* /* In a database file, \fBpostalias\fR(1) stores keys in the external -/* (quoted) form. Historically, Postfix versions 3.10 and earlier -/* stored the internal (unquoted) form. This was not consistent +/* (quoted) form. Historically, Postfix versions 3.11 and earlier +/* store the internal (unquoted) form. This was not consistent /* with \fBpostmap\fR(1) behavior. For backwards compatibility, /* Postfix programs will search with the legacy internal form only /* if the preferred external form is not found, and the internal diff --git a/postfix/src/postconf/postconf_builtin.c b/postfix/src/postconf/postconf_builtin.c index e0902862b..0a88bb8fa 100644 --- a/postfix/src/postconf/postconf_builtin.c +++ b/postfix/src/postconf/postconf_builtin.c @@ -466,7 +466,7 @@ void pcf_register_builtin_parameters(const char *procname, pid_t pid) PCF_PARAM_TABLE_ENTER(pcf_param_table, pcf_adhoc_procname.name, PCF_PARAM_FLAG_BUILTIN | PCF_PARAM_FLAG_READONLY, (void *) &pcf_adhoc_procname, pcf_conv_str_parameter); - pcf_adhoc_servname.defval = mystrdup(""); + pcf_adhoc_servname.defval = mystrdup(DEF_SERVNAME); PCF_PARAM_TABLE_ENTER(pcf_param_table, pcf_adhoc_servname.name, PCF_PARAM_FLAG_BUILTIN | PCF_PARAM_FLAG_READONLY, (void *) &pcf_adhoc_servname, pcf_conv_str_parameter); diff --git a/postfix/src/util/Makefile.in b/postfix/src/util/Makefile.in index 770dd7734..b7157beb2 100644 --- a/postfix/src/util/Makefile.in +++ b/postfix/src/util/Makefile.in @@ -53,7 +53,7 @@ OBJS = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \ attr_print64.o attr_print_plain.o attr_scan0.o attr_scan64.o \ attr_scan_plain.o auto_clnt.o base64_code.o basename.o binhash.o \ chroot_uid.o cidr_match.o clean_env.o close_on_exec.o concatenate.o \ - ctable.o dict.o dict_alloc.o dict_cidr.o dict_db.o \ + ctable.o dict.o dict_alloc.o dict_cidr.o \ dict_dbm.o dict_debug.o dict_env.o dict_ht.o dict_ni.o dict_nis.o \ dict_nisplus.o dict_open.o dict_regexp.o \ dict_static.o dict_tcp.o dict_unix.o dir_forest.o doze.o dummy_read.o \ @@ -93,7 +93,7 @@ OBJS = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \ split_qnameval.o argv_attr_print.o argv_attr_scan.o dict_file.o \ msg_logger.o logwriter.o unix_dgram_connect.o unix_dgram_listen.o \ byte_mask.o known_tcp_ports.o argv_split_at.o dict_stream.o \ - sane_strtol.o hash_fnv.o ldseed.o mkmap_db.o mkmap_dbm.o \ + sane_strtol.o hash_fnv.o ldseed.o mkmap_dbm.o \ mkmap_fail.o mkmap_open.o inet_prefix_top.o inet_addr_sizes.o \ quote_for_json.o mystrerror.o sane_sockaddr_to_hostaddr.o \ normalize_ws.o valid_uri_scheme.o clean_ascii_cntrl_space.o \ @@ -103,7 +103,7 @@ OBJS = alldig.o allprint.o argv.o argv_split.o attr_clnt.o attr_print0.o \ # When hard-linking these, makedefs sets NON_PLUGIN_MAP_OBJ=$(MAP_OBJ), # otherwise it sets the PLUGIN_* macros. MAP_OBJ = dict_pcre.o dict_cdb.o dict_lmdb.o dict_sdbm.o slmdb.o \ - mkmap_cdb.o mkmap_lmdb.o mkmap_sdbm.o + mkmap_cdb.o mkmap_lmdb.o mkmap_sdbm.o dict_db.o mkmap_db.o HDRS = argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.h \ chroot_uid.h cidr_match.h clean_env.h connect.h ctable.h dict.h \ dict_cdb.h dict_cidr.h dict_db.h dict_dbm.h dict_debug.h dict_env.h \ @@ -160,7 +160,8 @@ TESTPROG= dict_open dup2_pass_on_exec events exec_command fifo_open \ normalize_v4mapped_addr_test ossl_digest_test dict_pipe_test \ dict_union_test PLUGIN_MAP_SO = $(LIB_PREFIX)pcre$(LIB_SUFFIX) $(LIB_PREFIX)lmdb$(LIB_SUFFIX) \ - $(LIB_PREFIX)cdb$(LIB_SUFFIX) $(LIB_PREFIX)sdbm$(LIB_SUFFIX) + $(LIB_PREFIX)cdb$(LIB_SUFFIX) $(LIB_PREFIX)sdbm$(LIB_SUFFIX) \ + $(LIB_PREFIX)db$(LIB_SUFFIX) HTABLE_FIX = NORANDOMIZE=1 LIB_DIR = ../../lib INC_DIR = ../../include @@ -203,6 +204,10 @@ $(LIB_PREFIX)sdbm$(LIB_SUFFIX): mkmap_sdbm.o dict_sdbm.o $(PLUGIN_LD) $(SHLIB_RPATH) -o $@ mkmap_sdbm.o \ dict_sdbm.o $(AUXLIBS_SDBM) +$(LIB_PREFIX)db$(LIB_SUFFIX): mkmap_db.o dict_db.o + $(PLUGIN_LD) $(SHLIB_RPATH) -o $@ mkmap_db.o \ + dict_db.o $(AUXLIBS_DB) + update: $(LIB_DIR)/$(LIB) $(HDRS) $(PLUGIN_MAP_SO_UPDATE) \ $(PLUGIN_MAP_OBJ_UPDATE) -for i in $(HDRS); \ diff --git a/postfix/src/util/dict_open.c b/postfix/src/util/dict_open.c index 05e4175c7..d7fab9141 100644 --- a/postfix/src/util/dict_open.c +++ b/postfix/src/util/dict_open.c @@ -397,10 +397,6 @@ static const DICT_OPEN_INFO dict_open_info[] = { #ifdef HAS_DBM DICT_TYPE_DBM, dict_dbm_open, mkmap_dbm_open, #endif -#ifdef HAS_DB - DICT_TYPE_HASH, dict_hash_open, mkmap_hash_open, - DICT_TYPE_BTREE, dict_btree_open, mkmap_btree_open, -#endif #ifdef HAS_NIS DICT_TYPE_NIS, dict_nis_open, 0, #endif @@ -423,6 +419,10 @@ static const DICT_OPEN_INFO dict_open_info[] = { DICT_TYPE_UNION, dict_union_open, 0, DICT_TYPE_INLINE, dict_inline_open, 0, #ifndef USE_DYNAMIC_MAPS +#ifdef HAS_DB + DICT_TYPE_HASH, dict_hash_open, mkmap_hash_open, + DICT_TYPE_BTREE, dict_btree_open, mkmap_btree_open, +#endif #ifdef HAS_PCRE DICT_TYPE_PCRE, dict_pcre_open, 0, #endif diff --git a/postfix/src/util/sys_defs.h b/postfix/src/util/sys_defs.h index 93a83b64d..e14b2ef8e 100644 --- a/postfix/src/util/sys_defs.h +++ b/postfix/src/util/sys_defs.h @@ -51,7 +51,7 @@ #define DEF_MAILBOX_LOCK "flock, dotlock" #define HAS_SUN_LEN #define HAS_FSYNC -#define HAS_DB +#define HAS_DB 1 #define HAS_SA_LEN #define NATIVE_DB_TYPE "hash" #if (defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104250000) @@ -232,7 +232,7 @@ #define DEF_MAILBOX_LOCK "flock, dotlock" #define HAS_SUN_LEN #define HAS_FSYNC -#define HAS_DB +#define HAS_DB 1 #define HAS_SA_LEN #define NATIVE_DB_TYPE "hash" #define ALIAS_DB_MAP "$default_database_type:/etc/aliases" @@ -774,7 +774,7 @@ extern int initgroups(const char *, int); #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK #define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */ #define HAS_FSYNC -#define HAS_DB +#define HAS_DB 1 #define NATIVE_DB_TYPE "hash" #define ALIAS_DB_MAP "$default_database_type:/etc/aliases" #ifndef NO_NIS @@ -850,7 +850,7 @@ extern int initgroups(const char *, int); #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK #define DEF_MAILBOX_LOCK "dotlock" /* verified RedHat 3.03 */ #define HAS_FSYNC -#define HAS_DB +#define HAS_DB 1 #define NATIVE_DB_TYPE "hash" #define ALIAS_DB_MAP "$default_database_type:/etc/aliases" #ifndef NO_NIS @@ -883,7 +883,7 @@ extern int initgroups(const char *, int); #define INTERNAL_LOCK MYFLOCK_STYLE_FCNTL #define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */ #define HAS_FSYNC -#define HAS_DB +#define HAS_DB 1 #define NATIVE_DB_TYPE "hash" #define ALIAS_DB_MAP "$default_database_type:/etc/aliases" #ifndef NO_NIS