From: Wietse Z Venema
Date: Fri, 27 Feb 2026 05:00:00 +0000 (-0500)
Subject: postfix-3.12-20260227
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4f9f3690950c746bdeee17bdde1da74ae400f4e;p=thirdparty%2Fpostfix.git
postfix-3.12-20260227
---
diff --git a/postfix/.indent.pro b/postfix/.indent.pro
index f645854e9..3faf372e5 100644
--- a/postfix/.indent.pro
+++ b/postfix/.indent.pro
@@ -2,6 +2,7 @@
-TADDR_MATCH_LIST
-TADDR_PATTERN
-TALIAS_TOKEN
+-TALLOWED_PARENT
-TANVIL_CLNT
-TANVIL_LOCAL
-TANVIL_MAX
@@ -235,6 +236,10 @@
-TMKMAP_OPEN_FN
-TMKMAP_OPEN_INFO
-TMKMAP_SDBM
+-TMOCK_OPEN_AS_REQ
+-TMOCK_SPAWN_CMD_REQ
+-TMOCK_STAT_REQ
+-TMSG_CAPTURE
-TMSG_STATS
-TMULTI_SERVER
-TMVECT
@@ -246,6 +251,7 @@
-TNAME_CODE
-TNAME_MASK
-TNBBIO
+-TNBDB_PATH_SUFFIX
-TNVTABLE_INFO
-TOPTIONS
-TOSSL_DGST
@@ -444,9 +450,11 @@
-Tsize_t
-Tsockaddr
-Tsockaddr_storage
+-Tspawn_args
-Tssize_t
-Tssl_cipher_stack_t
-Tssl_comp_stack_t
+-Tstat
-Ttime_t
-Ttlsa_filter
-Tuint16_t
diff --git a/postfix/HISTORY b/postfix/HISTORY
index 75ac447dc..f59be79a6 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -58,7 +58,7 @@ Apologies for any names omitted.
reflects the current status of the software.
Added -d (don't disconnect) and -c (show running counter)
- option to te smtp-source test program. These tools are
+ option to the smtp-source test program. These tools are
great torture tests for the mail software, and for the
system that it runs on.
@@ -30404,3 +30404,145 @@ Apologies for any names omitted.
that an IPv6 address needs to be enclosed in [] for the
debug_peer_list and qmqpd_authorized_clients parameters.
File: proto/postconf.proto.
+
+20260219
+
+ Feature: support to migrate a working Postfix configuration
+ that uses hash: and btree: tables, to an OS that has deleted
+ Berkeley DB support. Files: Makefile.in, conf/postfix-files,
+ conf/postfix-non-bdb-script, conf/postfix-script,
+ global/Makefile.in, global/allowed_prefix.c,
+ global/allowed_prefix.h, global/allowed_prefix_test.c,
+ global/mail_params.c, global/mail_params.h, global/mail_proto.h,
+ global/nbdb_clnt.c, global/nbdb_clnt.h, global/nbdb_redirect.c,
+ global/nbdb_redirect.h, global/nbdb_redirect_test.c,
+ global/nbdb_surrogate.c, global/nbdb_surrogate.h,
+ global/nbdb_surrogate_test.c, global/nbdb_util.c,
+ global/nbdb_util.h, global/nbdb_util_test.c, html/Makefile.in,
+ man/Makefile.in, mantools/postlink, proto/Makefile.in,
+ proto/NON_BERKELEYDB_README.html, proto/postconf.proto,
+ proto/stop, proto/stop.double-cc,
+ proto/stop.double-install-proto-text, proto/stop.spell-cc,
+ proto/stop.spell-history, proto/stop.spell-proto-html,
+ smtp/smtp_connect.c, testing/Makefile.in, testing/mock_open_as.c,
+ testing/mock_open_as.h, testing/mock_spawn_command.c,
+ testing/mock_spawn_command.h, testing/mock_stat.c,
+ testing/mock_stat.h, testing/msg_capture.c, testing/msg_capture.h,
+ util/Makefile.in, util/dict.h, util/dict_open.c,
+ util/dict_surrogate.c, util/open_as.c, util/open_as.h,
+ util/spawn_command.c, util/spawn_command.h, util/vstream.h,
+ util/wrap_stat.c, util/wrap_stat.h.
+
+20260220
+
+ Documentation: TESTING, proto/NON_BERKELEYDB_README.html,
+ proto/stop.spell-proto-html, postfix/postfix.c, conf/postfix-files,
+ mantools/postlink, global/nbdb_clnt.c.
+
+ Portability: testing/msg_capture.c.
+
+ Migration to "No Berkeley DB": update default values
+ for alias_maps and alias_database, and replace the
+ platform-dependent database type with $default_database_type.
+ File: src/util/sys_defs.h.
+
+ Documentation: update obsolete references to "dbm or db"
+ in xxx_table(5) manpages and make text more consistent.
+ Files: proto/cidr_table, proto/ldap_table, proto/memcache_table,
+ proto/mongodb_table, proto/mysql_table, proto/nisplus_table,
+ proto/pcre_table, proto/pgsql_table, proto/regexp_table,
+ proto/socketmap_table, proto/sqlite_table, proto/tcp_table.
+
+ Documentation: made the postmap(1) and postmap(1) manpages
+ more consistent in the discussion of the default_data_base,
+ and moved that text to a more visible location. Files:
+ postalias/postalias.c, postmap/postmap.c.
+
+ Documentation: updated 'man5' manpages for changes in default
+ indexed file types. Files: proto/access, proto/canonical,
+ proto/generic, proto/relocated, proto/transport, proto/virtual.
+
+ Incompatibility: The alias_maps and alias_database parameter
+ default values have changed from hash:/path/to/aliases (or
+ dbm:/path/to/aliases) to $default_database_type:/path/to/aliases.
+ This simplifies the migration away from Berkeley DB. File:
+ util/sys_defs.h.
+
+20260221
+
+ Testing: factored out the mock cdb and lmdb code to make
+ more tests independent of whether the build includes support
+ for cdb and lmdb. Files: global/Makefile.in,
+ global/nbdb_redirect_test.c, global/nbdb_util_test.c,
+ nbdb_reindexd/Makefile.in, nbdb_reindexd/nbdb_index_as_test.c,
+ nbdb_reindexd/nbdb_process_test.c, testing/Makefile.in,
+ testing/mock_dict.c, testing/mock_dict.h.
+
+20260222
+
+ Cleanup: migration service name word-smithing. Files:
+ mantools/postlink, proto/postconf.proto, global/mail_params.h.
+
+ Documentation: missing DEF_SHLIB_DIR in INSTALL. File:
+ proto/install.html.
+
+20260225
+
+ Documentation: examples now use lmdb plus text about implicit
+ types with "postmap /path/to/file" and available explicit types.
+ Files: proto/INSTALL.html, proto/SASL_README.html,
+ proto/STANDARD_CONFIGURATION_README.html, proto/UUCP_README.html,
+ proto/VIRTUAL_README.html.
+
+ Workaround: as of Postfix 3.11, the default alias_maps value
+ contains $default_database_type:/path/to/aliases, instead
+ of a hard-coded type hash. If default_database_type was
+ changed from hash to lmdb (or cdb), then the indexed file
+ /path/to/aliases.lmdb (or /path/to/aliases.cdb) will likely
+ not exist.
+
+ Unfortunately, if $default_database_type has changed from
+ hash to lmdb (or cdb) Postfix will not try to use
+ hash:/path/to/aliases, and will not trigger compatibility
+ workarounds that are implemented with "enable-redirect" or
+ "enable-reindex". This would be a gap in migration coverage.
+
+ To avoid this, synthesize a stand-alone re-indexing request.
+ Files: conf/postfix-script, proto/NON_BERKELEYDB_README.html.
+ This is needed only for databases specified in alias_maps.
+
+ Postfix works on Linux 7.x kernels. Frank Scheiner. Files:
+ makedefs, util/sys_defs.h.
+
+20260226
+
+ Documentation: update postconf(5) examples: all examples
+ show "lmdb", and mention cdb, hash, etc. as alternatives.
+ File: proto/postconf.proto.
+
+ Cleanup: wordsmithing of recently-edited README files.
+ proto/SASL_README.html, proto/STANDARD_CONFIGURATION_README.html,
+ proto/UUCP_README.html.
+
+ Cleanup: fix HTML validator complaint. File:
+ proto/postconf.html.prolog
+
+ Cleanup: make only one attempt to generate an indexed file
+ for $alias_maps. This creates a status file
+ $config_directory/check-alias-maps-migration-done. File:
+ conf/postfix-script.
+
+20260227
+
+ Documentation: new Appendix with Mailman migration
+ instructions. File: proto/NON_BERKELEYDB_README.html.
+
+ Cleanup: missing #include , reported on Solaris 11.4.
+ File: nbdb_reindexd/nbdb_reindexd.c.
+
+ Cleanup: log a fatal error instead of dereferencing a null
+ pointer. Fedor Vorobev. File: util/dict_db.c.
+
+ Bitrot: patches in anticipation of OpenSSL 4. Viktor Dukhovni.
+ Files: posttls-finger/posttls-finger.c, tls/tls_client.c,
+ tls/tls.h, tls/tls_misc.c, tls/tls_verify.c.
diff --git a/postfix/INSTALL b/postfix/INSTALL
index 4bd762bea..58519cc9d 100644
--- a/postfix/INSTALL
+++ b/postfix/INSTALL
@@ -432,7 +432,7 @@ postconf.5 | less").
|_____________________|____________________|
|config_directory |/etc/postfix |
|_____________________|____________________|
- |default_database_type|lmdb or hash |
+ |default_database_type|lmdb, cdb, or hash |
|_____________________|____________________|
|default_cache_db_type|lmdb or btree |
|_____________________|____________________|
@@ -486,7 +486,7 @@ postconf.5 | less").
|_________________|_____________________|____________________|
|DEF_CONFIG_DIR |config_directory |/etc/postfix |
|_________________|_____________________|____________________|
- |DEF_DB_TYPE |default_database_type|lmdb or hash |
+ |DEF_DB_TYPE |default_database_type|lmdb, cdb, or hash |
|_________________|_____________________|____________________|
|DEF_CACHE_DB_TYPE|default_cache_db_type|lmdb or btree |
|_________________|_____________________|____________________|
@@ -508,9 +508,12 @@ postconf.5 | less").
|_________________|_____________________|____________________|
|DEF_SENDMAIL_PATH|sendmail_path |/usr/sbin/sendmail |
|_________________|_____________________|____________________|
+ |DEF_SHLIB_DIR |shlib_directory |/usr/lib/postfix |
+ |_________________|_____________________|____________________|
Note: the data_directory parameter (for caches and pseudo-random numbers) was
-introduced with Postfix version 2.5.
+introduced with Postfix version 2.5; shlib_directory (for shared-library
+objects and database plugins) with Postfix version 3.0.
4.7 - Overriding other compile-time features
@@ -542,8 +545,8 @@ The following is an extensive list of names and values.
|_______________________________|_____________________________________________|
|| |Do not build with Berkeley DB support. By |
|| |default, Berkeley DB support is compiled in |
-|| |on platforms that are known to support this |
-||-DNO_DB |feature. If you override this, then you |
+|| |on platforms that have historically supported|
+||-DNO_DB |this feature. If you override this, then you |
|| |probably should also override |
|| |default_database_type or DEF_DB_TYPE as |
|| |described in section 4.6. |
@@ -1080,7 +1083,7 @@ alias_maps" will tell you the exact location of the text file.
First, be sure to update the text file with aliases for root, postmaster and
"postfix" that forward mail to a real person. Postfix has a sample aliases file
-/etc/postfix/aliases that you can adapt to local conditions.
+/etc/postfix/aliases that you can copy and adapt to local conditions. /p>
/etc/aliases:
root: you
@@ -1097,6 +1100,13 @@ Finally, build the indexed aliases file with one of the following commands:
# sendmail -bi
# postalias /etc/aliases (pathname is system dependent!)
+The form "postalias /etc/aliases" builds a default-type indexed file. Use
+"postalias type:/etc/aliases" to specify an explicit type (it should match the
+type in the output from "postconf -x alias_maps").
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "postconf -m".
+
11 - To chroot or not to chroot
Postfix daemon processes can be configured (via master.cf) to run in a chroot
diff --git a/postfix/Makefile.in b/postfix/Makefile.in
index a436f7325..8d7501ada 100644
--- a/postfix/Makefile.in
+++ b/postfix/Makefile.in
@@ -12,10 +12,11 @@ DIRS = src/util src/global src/dns src/tls src/xsasl src/master src/milter \
src/postsuper src/qmqpd src/spawn src/flush src/verify \
src/virtual src/proxymap src/anvil src/scache src/discard src/tlsmgr \
src/postmulti src/postscreen src/dnsblog src/tlsproxy \
- src/posttls-finger src/postlogd src/testing
+ src/posttls-finger src/postlogd src/nbdb_reindexd src/testing
MANDIRS = proto man html
LIBEXEC = libexec/post-install libexec/postfix-script libexec/postfix-wrapper \
- libexec/postmulti-script libexec/postfix-tls-script
+ libexec/postmulti-script libexec/postfix-non-bdb-script \
+ libexec/postfix-tls-script
PLUGINS = meta/dynamicmaps.cf
META = meta/main.cf.proto meta/master.cf.proto meta/postfix-files \
meta/makedefs.out $(PLUGINS)
@@ -86,6 +87,9 @@ meta/postfix-files: conf/postfix-files conf/makedefs.out Makefile
libexec/postfix-script: conf/postfix-script
rm -f $@ && ln -f $? $@
+libexec/postfix-non-bdb-script: conf/postfix-non-bdb-script
+ rm -f $@ && ln -f $? $@
+
libexec/postfix-tls-script: conf/postfix-tls-script
rm -f $@ && ln -f $? $@
diff --git a/postfix/README_FILES/AAAREADME b/postfix/README_FILES/AAAREADME
index 12c1b2579..c3c83da7d 100644
--- a/postfix/README_FILES/AAAREADME
+++ b/postfix/README_FILES/AAAREADME
@@ -50,6 +50,7 @@ SSMMTTPP RReellaayy aanndd aacccceessss ccoonnttrrooll
LLooookkuupp ttaabblleess ((ddaattaabbaasseess))
* DATABASE_README: Lookup table overview
+ * NON_BERKELEYDB_README: Non-Berkeley-DB migration
* DB_README: Berkeley DB Howto
* CDB_README: CDB Howto
* LDAP_README: LDAP Howto
diff --git a/postfix/README_FILES/INSTALL b/postfix/README_FILES/INSTALL
index cd175c735..3de4474cf 100644
--- a/postfix/README_FILES/INSTALL
+++ b/postfix/README_FILES/INSTALL
@@ -432,7 +432,7 @@ postconf.5 | less").
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|config_directory |/etc/postfix |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
- |default_database_type|lmdb or hash |
+ |default_database_type|lmdb, cdb, or hash |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|default_cache_db_type|lmdb or btree |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
@@ -486,7 +486,7 @@ postconf.5 | less").
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|DEF_CONFIG_DIR |config_directory |/etc/postfix |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
- |DEF_DB_TYPE |default_database_type|lmdb or hash |
+ |DEF_DB_TYPE |default_database_type|lmdb, cdb, or hash |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|DEF_CACHE_DB_TYPE|default_cache_db_type|lmdb or btree |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
@@ -508,9 +508,12 @@ postconf.5 | less").
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|DEF_SENDMAIL_PATH|sendmail_path |/usr/sbin/sendmail |
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
+ |DEF_SHLIB_DIR |shlib_directory |/usr/lib/postfix |
+ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
Note: the data_directory parameter (for caches and pseudo-random numbers) was
-introduced with Postfix version 2.5.
+introduced with Postfix version 2.5; shlib_directory (for shared-library
+objects and database plugins) with Postfix version 3.0.
44..77 -- OOvveerrrriiddiinngg ootthheerr ccoommppiillee--ttiimmee ffeeaattuurreess
@@ -542,8 +545,8 @@ The following is an extensive list of names and values.
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|| |Do not build with Berkeley DB support. By |
|| |default, Berkeley DB support is compiled in |
-|| |on platforms that are known to support this |
-||-DNO_DB |feature. If you override this, then you |
+|| |on platforms that have historically supported|
+||-DNO_DB |this feature. If you override this, then you |
|| |probably should also override |
|| |default_database_type or DEF_DB_TYPE as |
|| |described in section 4.6. |
@@ -1080,7 +1083,7 @@ alias_maps" will tell you the exact location of the text file.
First, be sure to update the text file with aliases for root, postmaster and
"postfix" that forward mail to a real person. Postfix has a sample aliases file
-/etc/postfix/aliases that you can adapt to local conditions.
+/etc/postfix/aliases that you can copy and adapt to local conditions. /p>
/etc/aliases:
root: you
@@ -1097,6 +1100,13 @@ Finally, build the indexed aliases file with one of the following commands:
# sendmail -bi
# postalias /etc/aliases (pathname is system dependent!)
+The form "postalias /etc/aliases" builds a default-type indexed file. Use
+"postalias type:/etc/aliases" to specify an explicit type (it should match the
+type in the output from "postconf -x alias_maps").
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
+
1111 -- TToo cchhrroooott oorr nnoott ttoo cchhrroooott
Postfix daemon processes can be configured (via master.cf) to run in a chroot
diff --git a/postfix/README_FILES/NON_BERKELEYDB_README b/postfix/README_FILES/NON_BERKELEYDB_README
new file mode 100644
index 000000000..cad0cfe93
--- /dev/null
+++ b/postfix/README_FILES/NON_BERKELEYDB_README
@@ -0,0 +1,476 @@
+PPoossttffiixx NNoonn--BBeerrkkeelleeyy--DDBB mmiiggrraattiioonn
+
+-------------------------------------------------------------------------------
+
+TTaabbllee ooff ccoonntteennttss
+
+ * Introduction
+ * Background
+ * Skip this if not building Postfix from source, or if your system still
+ supports Berkeley DB
+ * Migration support level overview
+ * Level 'disable': manual migration
+ * Level 'enable-redirect': database aliasing
+ * Level 'enable-reindex': redirect and automatically generate non-Berkeley-DB
+ indexed files
+ * Addressing errors with automatic indexed file generation
+ * Appendix: Mailman integration
+
+IInnttrroodduuccttiioonn
+
+(Please see the Appendix for Mailman integration tips.)
+
+After running the same Postfix configuration for a decade or more, there is a
+rude awakening when you update the OS to a newer version that has deleted its
+support for Berkeley DB. Postfix programs fail to open all hash: and btree:
+tables with messages like this:
+
+ Berkeley DB support for 'hash:/etc/postfix/virtual' is not available
+ for this build; see https://www.postfix.org/NON_BERKELEYDB_README.html
+ for alternatives
+
+This document comes to the rescue, with strategies to migrate an existing
+Postfix configuration that uses Berkeley DB hash: and btree: database files, to
+an OS distribution that has removed Berkeley DB support, with a Postfix
+configuration that uses lmdb: (or a combination of cdb: and lmdb:).
+
+By the way, you don't have to wait until Berkeley DB support is removed; your
+can proactively use the steps described here on a system that still has
+Berkeley DB, to migrate a Postfix configuration from Berkeley DB to lmdb: (or a
+combination of cdb: and lmdb:).
+
+BBaacckkggrroouunndd
+
+Historically, Postfix has used Berkeley DB hash: and btree: for key-value
+stores, as indicated in the "With Berkeley DB" table column below. In a world
+without Berkeley DB, good replacements are cdb: and lmdb: as indicated in the
+"No Berkeley DB" column.
+
+ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
+ |PPuurrppoossee |WWiitthh BBeerrkkeelleeyy DDBB |NNoo BBeerrkkeelleeyy DDBB |
+ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
+ |Mostly-static data| |default_database_type=lmdb|
+ |such as aliases, |default_database_type=hash |or |
+ |transport_maps, | |default_database_type=cdb |
+ |access tables | | |
+ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
+ |Dynamic caches | | |
+ |maintained by | | |
+ |postscreen(8), |default_cache_db_type=btree|default_cache_db_type=lmdb|
+ |verify(8), tlsmgr | | |
+ |(8) | | |
+ |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
+
+The default values for default_database_type and default_cache_db_type may be
+specified at build time (see the section below, and they may be changed later
+by editing main.cf, for example with the postconf(1) command.)
+
+The sections that follow present three migration strategies with different
+levels of assistance by tooling that was developed for Postfix 3.11 and later.
+
+SSkkiipp tthhiiss iiff nnoott bbuuiillddiinngg PPoossttffiixx ffrroomm ssoouurrccee,, oorr iiff yyoouurr ssyysstteemm ssttiillll ssuuppppoorrttss
+BBeerrkkeelleeyy DDBB..
+
+Click here to skip to the next section.
+
+On systems that have removed Berkeley DB support, run "make makefiles" with a
+CCARGS value that (also) contains "-DNO_DB", and specify appropriate values for
+default_database_type (lmdb or cdb) and default_cache_db_type (lmdb).
+
+In the examples below, the "..." are place holders any dependencies that you
+build Postfix with, such as CDB, LDAP, LMDB, MySQL/MariaDB, OpenSSL, SASL, and
+so on.
+
+Example 1: use lmdb: for both default_database_type (read-mostly lookup tables)
+and default_cache_db_type (read-write caches). Terminal input is bboolldd, output
+is normal font.
+
+ $ mmaakkee mmaakkeeffiilleess CCCCAARRGGSS==""--DDNNOO__DDBB ......"" \\
+ ddeeffaauulltt__ddaattaabbaassee__ttyyppee==llmmddbb \\
+ ddeeffaauulltt__ccaacchhee__ddbb__ttyyppee==llmmddbb ...... \\
+ AAUUXXLLIIBBSS......
+
+Example 2: alternative form that produces the same result.
+
+ $ eexxppoorrtt CCCCAARRGGSS==""--DDNNOO__DDBB ......""
+ $ eexxppoorrtt ddeeffaauulltt__ddaattaabbaassee__ttyyppee==llmmddbb
+ $ eexxppoorrtt ddeeffaauulltt__ccaacchhee__ddbb__ttyyppee==llmmddbb
+ $ eexxppoorrtt AAUUXXLLIIBBSS......
+ ...
+ $ mmaakkee mmaakkeeffiilleess
+
+Another alternative is to use cdb for default_database_type (read-mostly lookup
+tables) and lmdb for default_cache_db_type (read-write caches).
+
+MMiiggrraattiioonn ssuuppppoorrtt lleevveell oovveerrvviieeww
+
+The goal of the migration is clear: stop using hash: and btree:, and use lmdb:
+or cdb: instead. If your configuration is simple or if you are familiar with
+Postfix configuration, a few "grep" commands will find all the problems, and a
+few edits will be easy to make.
+
+If, on the other hand, you are not familiar with the details of your Postfix
+configuration, then this document provides options where Postfix can help.
+
+Postfix 3.11 introduces multiple levels of migration support. You can use the
+command "postfix non-bdb status" to view the migration support level. This is
+what the default should look like (terminal input is bboolldd, output is normal
+font):
+
+ # ppoossttffiixx nnoonn--bbddbb ssttaattuuss
+ disable
+
+In increasing order, the support levels are:
+
+disable (manual migration)
+ You start up Postfix, watch the logging when Postfix programs fail to open
+ a hash: or btree: table, edit Postfix configuration files to use lmdb: or
+ cdb:, then run postmap(1) or postalias(1) commands to create lmdb: or cdb:
+ indexed database files. Use this option if you are familiar with Postfix
+ configuration.
+
+ This will not fix the integration with Mailman versions from before gitlab
+ commit 8fa56b72 (May 2025) and other software that are broken when they
+ want to use "postmap hash:/path/to/file". Mailman uses this to maintain a
+ table with mailing list contact addresses. For that, you need to use the
+ next-up level.
+
+enable-redirect (database aliasing)
+ This level implicitly redirects a request to access hash:/path/to/file to
+ $default_database_type:/path/to/file, and redirects a request to access a
+ btree:/path/to/file to $default_cache_db_type:/path/to/file.
+
+ This still requires manually running postmap(1) or postalias(1) commands,
+ but "fixes" the integration with Mailman versions from before gitlab commit
+ 8fa56b72 (May 2025) and other software when they want to use "postmap hash:
+ /path/to/file", and Berkeley DB support is not available. Such commands
+ will implicitly create a new lmdb: or cdb: indexed database file, depending
+ on the default_database_type value.
+
+enable-reindex (aliasing, plus running postmap(1) or postalias(1))
+ This level implements "enable-redirect (database aliasing)", and also runs
+ the postmap(1) or postalias(1) command to create a new lmdb or cdb indexed
+ database file. This uses the nbdb_reindexd(8) daemon.
+
+The levels enable-redirect and enable-reindex leave some technical debt:
+configurations that still say hash: or btree: (even if they use lmdb: or cdb:
+behind the scene).
+
+ * Using these levels gives you extra time to prepare for a long-term
+ configuration change that replaces hard-coded instances of hash: with the
+ value of default_database_type, and that replaces btree: with the value of
+ default_cache_db_type.
+
+ * Depending on your use of other software that wants to use postmap(1) or
+ postalias(1) commands, you may have to permanently the leave the enable-
+ redirect level active.
+
+After this overview, the sections that follow will go into more detail.
+
+LLeevveell ''ddiissaabbllee'':: mmaannuuaall mmiiggrraattiioonn
+
+To disable all non-Berkeley-DB migration features use the "postfix non-bdb"
+command:
+
+ # ppoossttffiixx nnoonn--bbddbb ddiissaabbllee
+ # ppoossttffiixx rreellooaadd
+
+This will edit main.cf to remove a non_bdb_migration_level setting and the
+level revert to its implicit default (disable), and will edit master.cf to
+remove an entry for the reindex service.
+
+This setting will cause problems with Mailman versions from before gitlab
+commit 8fa56b72 (May 2025) and other software that wants to use "postmap hash:/
+path/to/file" (or similar postalias commands), and Berkeley DB support is no
+longer available. In that case, you will need the "enable-redirect" migration
+support level.
+
+A manual migration process goes like this:
+
+ * Stop Postfix.
+
+ * Make lmdb: the default for both default_database_type (read-mostly lookup
+ tables) and default_cache_db_type (read-write caches):
+
+ # ppoossttccoonnff ddeeffaauulltt__ddaattaabbaassee__ttyyppee==llmmddbb ddeeffaauulltt__ccaacchhee__ddbb__ttyyppee==llmmddbb
+
+ * Alternatively, make cdb: the default for default_database_type (read-mostly
+ lookup tables) and lmdb: the default for default_cache_db_type (read-write
+ caches):
+
+ # ppoossttccoonnff ddeeffaauulltt__ddaattaabbaassee__ttyyppee==ccddbb ddeeffaauulltt__ccaacchhee__ddbb__ttyyppee==llmmddbb
+
+ * Look for hash: and btree: references in Postfix configuration files.
+ Instead of /etc/postfix use the pathname in the output from "postconf -
+ x config_directory".
+
+ # ggrreepp --EE --rr ''((hhaasshh||bbttrreeee)):://'' //eettcc//ppoossttffiixx
+
+ * For each instance in the "grep" output :
+
+ o Edit the configuration file and replace "hash" with "lmdb" or "cdb"
+ (use the same value as the output from "ppoossttccoonnff --hhxx
+ ddeeffaauulltt__ddaattaabbaassee__ttyyppee") and replace "btree" with "lmdb".
+
+ o If this instance has no source file (only the ".db" file exists),
+ proceed with the next instance of "grep" output.
+
+ o If this instance appears in the output from "ppoossttccoonnff --hhPPPPxx ''**//**//
+ aalliiaass__mmaappss'' || ssoorrtt --uu", run the postalias(1) command. If this instance
+ is like "lmdb:/path/to/source":
+
+ # ppoossttaalliiaass llmmddbb:://ppaatthh//ttoo//ssoouurrccee
+
+ Instead of "lmdb:" use "cdb:" if the instance is like "cdb:/path/to/
+ source".
+
+ o Otherwise, run the postmap(1) command. If this instance is like "lmdb:/
+ path/to/source":
+
+ # ppoossttmmaapp llmmddbb:://ppaatthh//ttoo//ssoouurrccee
+
+ Instead of "lmdb:" use "cdb:" if this instance is like "cdb:/path/to/
+ source".
+
+ * Start Postfix, watch the log for warnings about files that cannot be
+ opened, find the configuration file that still uses "hash" or "btree", and
+ repeat the steps above.
+
+ * It is now safe to delete the unused ".db" files.
+
+LLeevveell ''eennaabbllee--rreeddiirreecctt'':: ddaattaabbaassee aalliiaassiinngg
+
+To enable this migration support level, use:
+
+ # ppoossttffiixx nnoonn--bbddbb eennaabbllee--rreeddiirreecctt
+ # ppoossttffiixx rreellooaadd
+
+This postfix non-bdb" command edits main.cf to enable redirection (aliasing)
+from Berkeley DB types "hash" and "btree" to the non-Berkeley-DB types
+specified with $default_database_type and $default_cache_db_type. Custom
+redirection may be configured with non_bdb_custom_mapping. This command also
+edits master.cf to remove an unused nbdb_reindex service entry.
+
+This migration support level will not automatically create non-Berkeley-DB
+indexed database files. Instead, Postfix programs will log an error as they
+fail to open an indexed database file, and will leave it to the system
+administrator to run postmap(1) or postalias(1) to create that file.
+
+For each instance of "hash:/path/to/source" or "btree:/path/to/source" that
+requires manually running postmap(1) or postalias(1):
+
+ * If this instance appears in the output from "ppoossttccoonnff --hhPPPPxx ''**//**//
+ aalliiaass__mmaappss'' || ssoorrtt --uu", run the postalias(1) command. If this instance is
+ like "lmdb:/path/to/source":
+
+ # ppoossttaalliiaass llmmddbb:://ppaatthh//ttoo//ssoouurrccee
+
+ Instead of "lmdb:" use "cdb:" if the instance is like "cdb:/path/to/
+ source".
+
+ * Otherwise, run the postmap(1) command. If this instance is like "lmdb:/
+ path/to/source":
+
+ # ppoossttmmaapp llmmddbb:://ppaatthh//ttoo//ssoouurrccee
+
+ Instead of "lmdb:" use "cdb:" if this instance is like "cdb:/path/to/
+ source".
+
+This migration support level will fix problems with Mailman versions from
+before May 2025 and other software that wants to use "postmap hash:/path/to/
+file". With database redirection, such commands will implicitly create an
+indexed file for $default_database_type:/path/to/file (similar aliasing happens
+for postalias commands).
+
+The command "postfix non-bdb enable-redirect" will refuse to make any changes
+when default_database_type or default_cache_db_type specify a hash: or btree:
+type.
+
+LLeevveell ''eennaabbllee--rreeiinnddeexx'':: rreeddiirreecctt aanndd aauuttoommaattiiccaallllyy ggeenneerraattee nnoonn--BBeerrkkeelleeyy--DDBB
+iinnddeexxeedd ffiilleess
+
+NOTE: this level should be used only temporarily to generate most of the non-
+Berkeley-DB indexed files that Postfix needs. Leaving this enabled may expose
+the system to privilege-escalation attacks. There are no security concerns for
+using enable-redirect.
+
+To enable this migration support level, use:
+
+ # ppoossttffiixx nnoonn--bbddbb eennaabbllee--rreeiinnddeexx
+ # ppoossttffiixx rreellooaadd
+
+This postfix non-bdb command edits main.cf to set the non-Berkeley-DB migration
+support level, and master.cf to add or replace an nbdb-reindex service entry.
+
+The resulting configuration implements not only the functionality of enable-
+redirect, but also automatically creates a non-Berkeley-DB indexed database
+file when a daemon program wants to access a file that does not exist. This
+uses the nbdb_reindexd(8) daemon to run postmap(1) or postalias(1) commands for
+databases that satisfy basic requirements to block privilege-escalation
+attacks. The number of requirements is large, but mainly, database files and
+their parent directory must not allow write access for group or other users,
+and their pathnames must match a list of trusted directory prefixes. The
+complete list of requirements is documented in nbdb_reindexd(8).
+
+This command immediately generates non-Berkeley-DB indexed files for command-
+line programs that lack privileges to send requests to the nbdb_reindexd(8)
+indexing server. This applies to "hash:" and "btree:" tables that are used by
+postqueue(1) and sendmail(1) as configured with authorized_flush_users and
+authorized_mailq_users, and used by sendmail(1) and postdrop(1) as configured
+with authorized_submit_users and local_login_sender_maps.
+
+The command "postfix non-bdb enable-reindex" will refuse to make any changes
+when default_database_type or default_cache_db_type specify a hash: or btree:
+type.
+
+The nbdb_reindexd(8) daemon will log when it successfully runs a postmap(1) or
+postalias(1) command. Examples, for a system with "default_database_type =
+lmdb":
+
+ successfully executed 'postmap lmdb:/etc/postfix/transport' as uid 0
+ successfully executed 'postalias lmdb:/etc/aliases' as uid 0
+
+See the section "Addressing errors with automatic indexed file generation" for
+the most likely errors that Postfix programs may log.
+
+Once there are no more errors from Postfix programs for about 24 hours, turn
+off automatic index generation by reducing the support level to enable-redirect
+with:
+
+ # postfix non-bdb enable-redirect
+ # postfix reload
+
+AAddddrreessssiinngg eerrrroorrss wwiitthh aauuttoommaattiicc iinnddeexxeedd ffiillee ggeenneerraattiioonn
+
+UUnneexxppeecctteedd ppaatthhnnaammee eerrrroorrss
+
+Depending on the location of your Postfix lookup tables, Postfix programs may
+log a request to add a trusted directory to the directories listed with
+non_bdb_migration_allow_root_prefixes or non_bdb_migration_allow_user_prefixes.
+
+Example, with line breaks added for readability:
+
+ could not execute command 'postmap lmdb:/path/to/file': table
+ /path/to/file has an unexpected pathname;
+
+ to allow automatic indexing as root, append its parent directory
+ to the non_bdb_migration_allow_root_prefixes setting (current setting
+ is: "/etc /usr/local/etc");
+
+ alternatively, execute the failed command by hand
+
+You have two options:
+
+ 1. If you think that the suggested change is safe, update the setting as
+ proposed and execute "postfix reload".
+
+ 2. Alternatively, you can execute the failed postmap(1) or postalias(1)
+ command by hand, and Postfix will not log the same error again.
+
+A similar request may be logged when a file needs to be indexed as a non-root
+user.
+
+UUnneexxppeecctteedd ffiillee oorr ddiirreeccttoorryy oowwnneerr oorr ppeerrmmiissssiioonnss
+
+Other errors may be logged when a database file or directory has an unexpected
+owner, or when it is writable by group or by other users.
+
+Example with line breaks added for readability:
+
+ could not execute command 'postmap lmdb:/path/to/file': legacy
+ indexed file '/path/to/file.db' is owned by uid '0', but parent
+ directory '/path/to' is owned or writable by other user;
+
+ to allow automatic indexing, correct the ownership or permissions;
+
+ alternatively, execute the failed command by hand
+
+Again, you have two options:
+
+ 1. Fix the ownership or permission error.
+
+ 2. Execute the failed postmap(1) or postalias(1) command by hand, and Postfix
+ will not log the same error again.
+
+Once there are no more errors from Postfix programs for about 24 hours, turn
+off automatic index generation by reducing the support level to enable-redirect
+with:
+
+ # postfix non-bdb enable-redirect
+ # postfix reload
+
+AAppppeennddiixx:: MMaaiillmmaann iinntteeggrraattiioonn
+
+This section has instructions to migrate an existing Mailman configuration that
+wants to use commands like "postmap hash:/path/to/file". Mailman uses such
+commands to maintain tables with mailing list contact addresses and domain
+names. This will break on systems that no longer have Berkeley DB support.
+
+Solutions:
+
+ * (Not recommended) Upgrade to a Mailman version that contains gitlab commit
+ 8fa56b72 (May 2025). Unfortunately, this has not yet been widely adopted by
+ OS distributions.
+
+ * Avoid Mailman changes, and use Postfix migration support described below.
+ In a nutshell, the postmap command will execute the command "postmap hash:/
+ path/to/file" as if the command specifies lmdb:/path/to/file (or cdb:,
+ depending on Postfix configuration).
+
+With Mailman3 the integration with Postfix using LMTP may look like:
+
+ /var/lib/mailman3/data/postfix_domains (domain names)
+ /var/lib/mailman3/data/postfix_domains.db (Berkeley DB hash file)
+ /var/lib/mailman3/data/postfix_lmtp (transport map)
+ /var/lib/mailman3/data/postfix_lmtp.db (Berkeley DB hash file)
+
+ Caution: the data directory may contain other files with names ending in
+ ".db" that are not part of the Mailman-Postfix integration. Do not tamper
+ with the other files.
+
+The relevant Postfix migration levels are:
+
+enable-redirect (redirect hash: to lmdb: or cdb:)
+ Command: # ppoossttffiixx nnoonn--bbddbb eennaabbllee--rreeddiirreecctt
+
+ This will fix the problem that Mailman wants to use commands like "postmap
+ hash:/path/to/postfix_domains" and "postmap hash:/path/to/postfix_lmtp".
+
+ Instead of complaining about an unsupported database type, these postmap
+ commands will implicitly create ".lmdb" indexed files like (lmdb:/path/to/
+ postfix_domains or lmdb:/path/to/postfix_lmtp, or their cdb: versions
+ depending on the Postfix default_database_type setting).
+
+ This will not fix the problem that Postfix wants to use databases like
+ hash:/path/to/postfix_domains and hash::/path/to/postfix_lmtp. With enable-
+ redirect, these will redirect to ".lmdb" indexed files (good) but those
+ files do not yet exist (bad). You will need to create them by hand with
+ commands like:
+
+ # ppoossttmmaapp llmmddbb:://ppaatthh//ttoo//ppoossttffiixx__ddoommaaiinnss
+ # ppoossttmmaapp llmmddbb:://ppaatthh//ttoo//ppoossttffiixx__llmmttpp
+
+ After this, no further human action will be needed. When Mailman needs to
+ update these files, it will invoke postmap commands that will work as
+ promised above. Leave the Postfix migration level at enable-reindex until
+ you can upgrade to a newer Mailman version that supports Postfix with non-
+ Berkeley databases.
+
+enable-reindex (also automatically run postmap commands)
+ Command: # ppoossttffiixx nnoonn--bbddbb eennaabbllee--rreeddiirreecctt
+
+ In addition to "enable-redirect", Postfix will also try to run commands
+ like "postmap lmdb:/path/to/postfix_domains" and "postmap lmdb:/path/to/
+ postfix_lmtp". There will be some delay depending on the amount of mailing
+ list traffic; you may want to post a test message to make the postmap
+ commands happen sooner.
+
+ Postfix will log the postmap commands (or will log a request to make some
+ configuration changes; see "Addressing errors with automatic indexed file
+ generation" above).
+
+ Note: once these "postmap" commands have completed, you should reduce the
+ migration support level with the command "ppoossttffiixx nnoonn--bbddbb eennaabbllee--rreeddiirreecctt".
+ For security reasons the enable-reindex level should not be permanently
+ enabled.
+
diff --git a/postfix/README_FILES/SASL_README b/postfix/README_FILES/SASL_README
index 2eb657e60..9d0c3ccab 100644
--- a/postfix/README_FILES/SASL_README
+++ b/postfix/README_FILES/SASL_README
@@ -841,7 +841,8 @@ addresses and SASL login names, the Postfix SMTP server can decide if the SASL
authenticated client is allowed to use a particular envelope sender address:
/etc/postfix/main.cf:
- ssmmttppdd__sseennddeerr__llooggiinn__mmaappss == hhaasshh:://eettcc//ppoossttffiixx//ccoonnttrroolllleedd__eennvveellooppee__sseennddeerrss
+ ssmmttppdd__sseennddeerr__llooggiinn__mmaappss ==
+ llmmddbb:://eettcc//ppoossttffiixx//ccoonnttrroolllleedd__eennvveellooppee__sseennddeerrss
smtpd_recipient_restrictions =
...
@@ -860,6 +861,16 @@ envelope address and the SASL login names that own that address:
@example.net barney, fred, john@example.com,
mary@example.com
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ccoonnttrroolllleedd__eennvveellooppee__sseennddeerrss" after
+you change the controlled_envelope_senders file, to (re)build a default-type
+indexed file. Execute "ppoossttmmaapp ttyyppee:://eettcc//ppoossttffiixx//ccoonnttrroolllleedd__eennvveellooppee__sseennddeerrss"
+to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
+
With this, the reject_sender_login_mismatch restriction above will reject the
sender address in the MAIL FROM command if smtpd_sender_login_maps does not
specify the SMTP client's login name as an owner of that address.
@@ -884,7 +895,7 @@ credentials have been compromised.
/etc/postfix/main.cf:
smtpd_recipient_restrictions =
permit_mynetworks
- check_sasl_access hash:/etc/postfix/sasl_access
+ check_sasl_access lmdb:/etc/postfix/sasl_access
permit_sasl_authenticated
...
@@ -894,6 +905,15 @@ credentials have been compromised.
# Use this when smtpd_sasl_local_domain=example.com.
username@example.com HOLD
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ssaassll__aacccceessss" after you change the
+sasl_access file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp
+ttyyppee:://eettcc//ppoossttffiixx//ssaassll__aacccceessss" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
+
DDeeffaauulltt aauutthheennttiiccaattiioonn ddoommaaiinn
Postfix can append a domain name (or any other string) to a SASL login name
@@ -1043,7 +1063,7 @@ username/password information.
relayhost = [mail.isp.example]
# Alternative form:
# relayhost = [mail.isp.example]:submission
- smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
+ smtp_sasl_password_maps = lmdb:/etc/postfix/sasl_passwd
* The smtp_sasl_auth_enable setting enables client-side authentication. We
will configure the client's username and password information in the second
@@ -1094,8 +1114,15 @@ username/password information.
SASL client passwords. It opens the file as user root before it drops
privileges, and before entering an optional chroot jail.
- * Use the postmap command whenever you change the /etc/postfix/sasl_passwd
- file.
+ Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+ * Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ssaassll__ppaasssswwdd" after changing the
+ sasl_passwd file, to (re)build a default-type indexed file. Execute
+ "ppoossttmmaapp ttyyppee:://eettcc//ppoossttffiixx//ssaassll__ppaasssswwdd" to specify an explicit type.
+
+ The default indexed file type is configured with the default_database_type
+ parameter. To list available explicit types, execute the command "ppoossttccoonnff
+ --mm".
* If you specify the "[" and "]" in the relayhost destination, then you must
use the same form in the smtp_sasl_password_maps file.
@@ -1120,9 +1147,10 @@ final resort.
/etc/postfix/main.cf:
smtp_sender_dependent_authentication = yes
- sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
+ sender_dependent_relayhost_maps =
+ lmdb:/etc/postfix/sender_relay
smtp_sasl_auth_enable = yes
- smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
+ smtp_sasl_password_maps = lmdb:/etc/postfix/sasl_passwd
relayhost = [mail.isp.example]
# Alternative form:
# relayhost = [mail.isp.example]:submission
@@ -1141,19 +1169,23 @@ final resort.
user1@example.com [mail.example.com]:submission
user2@example.net [mail.example.net]
+ Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
* If you are creative, then you can try to combine the two tables into one
single MySQL database, and configure different Postfix queries to extract
the appropriate information.
- * Specify ddbbmm instead of hhaasshh if your system uses ddbbmm files instead of ddbb
- files. To find out what lookup tables Postfix supports, use the command
- "ppoossttccoonnff --mm".
+ * Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ssaassll__ppaasssswwdd" after you change the
+ sasl_passwd file, to (re)build a default-type indexed file. Execute
+ "ppoossttmmaapp ttyyppee:://eettcc//ppoossttffiixx//ssaassll__ppaasssswwdd" to specify an explicit type.
- * Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ssaassll__ppaasssswwdd" whenever you change
- the sasl_passwd table.
+ The default indexed file type is configured with the default_database_type
+ parameter. To list available explicit types, execute the command "ppoossttccoonnff
+ --mm".
- * Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//sseennddeerr__rreellaayy" whenever you change
- the sender_relay table.
+ * Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//sseennddeerr__rreellaayy" after you change
+ the sender_relay file, to (re)build a default-type indexed file. Execute
+ "ppoossttmmaapp ttyyppee:://eettcc//ppoossttffiixx//sseennddeerr__rreellaayy" to specify an explicit type.
PPoossttffiixx SSMMTTPP//LLMMTTPP cclliieenntt ppoolliiccyy -- SSAASSLL mmeecchhaanniissmm pprrooppeerrttiieess
diff --git a/postfix/README_FILES/SOHO_README b/postfix/README_FILES/SOHO_README
index b88e4a35b..8c5b538c4 100644
--- a/postfix/README_FILES/SOHO_README
+++ b/postfix/README_FILES/SOHO_README
@@ -77,7 +77,7 @@ this with basic configuration information as discussed in the first half of
this document.
1 /etc/postfix/main.cf:
- 2 smtp_generic_maps = hash:/etc/postfix/generic
+ 2 smtp_generic_maps = lmdb:/etc/postfix/generic
3
4 /etc/postfix/generic:
5 his@localdomain.local hisaccount@hisisp.example
@@ -94,11 +94,14 @@ When mail is sent to a remote host via SMTP:
extension of +local (this example assumes that the ISP supports "+" style
address extensions).
-Specify ddbbmm instead of hhaasshh if your system uses ddbbmm files instead of ddbb files.
-To find out what lookup tables Postfix supports, use the command "ppoossttccoonnff --mm".
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ggeenneerriicc" whenever you change the
-generic table.
+generic file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp ttyyppee:://
+eettcc//ppoossttffiixx//ggeenneerriicc" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
SSoolluuttiioonn 22:: PPoossttffiixx vveerrssiioonn 22..11 aanndd eeaarrlliieerr
@@ -116,9 +119,9 @@ this document.
2 myhostname = hostname.localdomain
3 mydomain = localdomain
4
- 5 canonical_maps = hash:/etc/postfix/canonical
+ 5 canonical_maps = lmdb:/etc/postfix/canonical
6
- 7 virtual_alias_maps = hash:/etc/postfix/virtual
+ 7 virtual_alias_maps = lmdb:/etc/postfix/virtual
8
9 /etc/postfix/canonical:
10 your-login-name your-account@your-isp.com
@@ -140,14 +143,18 @@ Translation:
instead of sending it to the ISP. This part is not required but is
convenient.
-Specify ddbbmm instead of hhaasshh if your system uses ddbbmm files instead of ddbb files.
-To find out what lookup tables Postfix supports, use the command "ppoossttccoonnff --mm".
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ccaannoonniiccaall" whenever you change the
-canonical table.
+canonical file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp
+ttyyppee:://eettcc//ppoossttffiixx//ccaannoonniiccaall" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//vviirrttuuaall" whenever you change the
-virtual table.
+virtual file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp ttyyppee:://
+eettcc//ppoossttffiixx//vviirrttuuaall" to specify an explicit type.
EEnnaabblliinngg SSAASSLL aauutthheennttiiccaattiioonn iinn tthhee PPoossttffiixx SSMMTTPP//LLMMTTPP cclliieenntt
@@ -174,7 +181,7 @@ username/password information.
relayhost = [mail.isp.example]
# Alternative form:
# relayhost = [mail.isp.example]:submission
- smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
+ smtp_sasl_password_maps = lmdb:/etc/postfix/sasl_passwd
* The smtp_sasl_auth_enable setting enables client-side authentication. We
will configure the client's username and password information in the second
@@ -225,8 +232,15 @@ username/password information.
SASL client passwords. It opens the file as user root before it drops
privileges, and before entering an optional chroot jail.
- * Use the postmap command whenever you change the /etc/postfix/sasl_passwd
- file.
+ Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+ * Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ssaassll__ppaasssswwdd" after changing the
+ sasl_passwd file, to (re)build a default-type indexed file. Execute
+ "ppoossttmmaapp ttyyppee:://eettcc//ppoossttffiixx//ssaassll__ppaasssswwdd" to specify an explicit type.
+
+ The default indexed file type is configured with the default_database_type
+ parameter. To list available explicit types, execute the command "ppoossttccoonnff
+ --mm".
* If you specify the "[" and "]" in the relayhost destination, then you must
use the same form in the smtp_sasl_password_maps file.
@@ -251,9 +265,10 @@ final resort.
/etc/postfix/main.cf:
smtp_sender_dependent_authentication = yes
- sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
+ sender_dependent_relayhost_maps =
+ lmdb:/etc/postfix/sender_relay
smtp_sasl_auth_enable = yes
- smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
+ smtp_sasl_password_maps = lmdb:/etc/postfix/sasl_passwd
relayhost = [mail.isp.example]
# Alternative form:
# relayhost = [mail.isp.example]:submission
@@ -272,17 +287,21 @@ final resort.
user1@example.com [mail.example.com]:submission
user2@example.net [mail.example.net]
+ Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
* If you are creative, then you can try to combine the two tables into one
single MySQL database, and configure different Postfix queries to extract
the appropriate information.
- * Specify ddbbmm instead of hhaasshh if your system uses ddbbmm files instead of ddbb
- files. To find out what lookup tables Postfix supports, use the command
- "ppoossttccoonnff --mm".
+ * Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ssaassll__ppaasssswwdd" after you change the
+ sasl_passwd file, to (re)build a default-type indexed file. Execute
+ "ppoossttmmaapp ttyyppee:://eettcc//ppoossttffiixx//ssaassll__ppaasssswwdd" to specify an explicit type.
- * Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ssaassll__ppaasssswwdd" whenever you change
- the sasl_passwd table.
+ The default indexed file type is configured with the default_database_type
+ parameter. To list available explicit types, execute the command "ppoossttccoonnff
+ --mm".
- * Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//sseennddeerr__rreellaayy" whenever you change
- the sender_relay table.
+ * Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//sseennddeerr__rreellaayy" after you change
+ the sender_relay file, to (re)build a default-type indexed file. Execute
+ "ppoossttmmaapp ttyyppee:://eettcc//ppoossttffiixx//sseennddeerr__rreellaayy" to specify an explicit type.
diff --git a/postfix/README_FILES/STANDARD_CONFIGURATION_README b/postfix/README_FILES/STANDARD_CONFIGURATION_README
index 592c4a563..8f751c2c0 100644
--- a/postfix/README_FILES/STANDARD_CONFIGURATION_README
+++ b/postfix/README_FILES/STANDARD_CONFIGURATION_README
@@ -226,7 +226,7 @@ address] as well. All the mail to these two accounts is forwarded to an inside
address.
1 /etc/postfix/main.cf:
- 2 virtual_alias_maps = hash:/etc/postfix/virtual
+ 2 virtual_alias_maps = lmdb:/etc/postfix/virtual
3
4 /etc/postfix/virtual:
5 postmaster postmaster@example.com
@@ -261,8 +261,8 @@ purpose of the firewall email function.
9b permit_mynetworks reject_unauth_destination
10b ...spam blocking rules....
- 11 relay_recipient_maps = hash:/etc/postfix/relay_recipients
- 12 transport_maps = hash:/etc/postfix/transport
+ 11 relay_recipient_maps = lmdb:/etc/postfix/relay_recipients
+ 12 transport_maps = lmdb:/etc/postfix/transport
13
14 /etc/postfix/relay_recipients:
15 user1@example.com x
@@ -293,14 +293,22 @@ Translation:
"relay" delivery transport, instead of competing with other SMTP deliveries
for SMTP clients from the default "smtp" delivery transport.
-Specify ddbbmm instead of hhaasshh if your system uses ddbbmm files instead of ddbb files.
-To find out what lookup tables Postfix supports, use the command "ppoossttccoonnff --mm".
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//vviirrttuuaall" whenever you change the
+virtual file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp ttyyppee:://
+eettcc//ppoossttffiixx//vviirrttuuaall" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//rreellaayy__rreecciippiieennttss" whenever you change
-the relay_recipients table.
+the relay_recipients file, to (re)build a default-type indexed file. Execute
+"ppoossttmmaapp ttyyppee:://eettcc//ppoossttffiixx//rreellaayy__rreecciippiieennttss" to specify an explicit type.
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ttrraannssppoorrtt" whenever you change the
-transport table.
+transport file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp
+ttyyppee:://eettcc//ppoossttffiixx//ttrraannssppoorrtt" to specify an explicit type.
In some installations, there may be separate instances of Postfix processing
inbound and outbound mail on a multi-homed firewall. The inbound Postfix
@@ -325,7 +333,7 @@ is also sent to the central mailhost. In order to deliver such accounts
locally, you can set up virtual aliases as follows:
1 /etc/postfix/main.cf:
- 2 virtual_alias_maps = hash:/etc/postfix/virtual
+ 2 virtual_alias_maps = lmdb:/etc/postfix/virtual
3
4 /etc/postfix/virtual:
5 root root@localhost
@@ -338,7 +346,14 @@ Translation:
listed in $mydestination, or when it matches $inet_interfaces or
$proxy_interfaces.
-Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//vviirrttuuaall" after editing the file.
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//vviirrttuuaall" after editing the virtual
+file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp ttyyppee:://eettcc//
+ppoossttffiixx//vviirrttuuaall" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
RRuunnnniinngg PPoossttffiixx bbeehhiinndd aa ffiirreewwaallll
@@ -356,7 +371,7 @@ this with basic configuration information as discussed in the first half of
this document.
1 /etc/postfix/main.cf:
- 2 transport_maps = hash:/etc/postfix/transport
+ 2 transport_maps = lmdb:/etc/postfix/transport
3 relayhost =
4 # Optional for a machine that isn't "always on"
5 #fallback_relay = [gateway.example.com]
@@ -381,11 +396,14 @@ Translation:
is turned off. Postfix tries to deliver mail directly, and gives
undeliverable mail to a gateway.
-Specify ddbbmm instead of hhaasshh if your system uses ddbbmm files instead of ddbb files.
-To find out what lookup tables Postfix supports, use the command "ppoossttccoonnff --mm".
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ttrraannssppoorrtt" whenever you edit the
-transport table.
+transport file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp
+ttyyppee:://eettcc//ppoossttffiixx//ttrraannssppoorrtt" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
CCoonnffiigguurriinngg PPoossttffiixx aass pprriimmaarryy oorr bbaacckkuupp MMXX hhoosstt ffoorr aa rreemmoottee ssiittee
@@ -416,7 +434,7 @@ When your system is SECONDARY MX host for a remote site this is all you need:
11 # You must specify your NAT/proxy external address.
12 #proxy_interfaces = 1.2.3.4
13
- 14 relay_recipient_maps = hash:/etc/postfix/relay_recipients
+ 14 relay_recipient_maps = lmdb:/etc/postfix/relay_recipients
15
16 /etc/postfix/relay_recipients:
17 user1@the.backed-up.domain.tld x
@@ -426,7 +444,7 @@ When your system is SECONDARY MX host for a remote site this is all you need:
When your system is PRIMARY MX host for a remote site you need the above, plus:
20 /etc/postfix/main.cf:
- 21 transport_maps = hash:/etc/postfix/transport
+ 21 transport_maps = lmdb:/etc/postfix/transport
22
23 /etc/postfix/transport:
24 the.backed-up.domain.tld relay:[their.mail.host.tld]
@@ -454,11 +472,18 @@ Important notes:
* Line 24: The [] forces Postfix to do no MX lookup.
-Specify ddbbmm instead of hhaasshh if your system uses ddbbmm files instead of ddbb files.
-To find out what lookup tables Postfix supports, use the command "ppoossttccoonnff --mm".
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//rreellaayy__rreecciippiieennttss" whenever you change
+the relay_recipients file, to (re)build a default-type indexed file. Execute
+"ppoossttmmaapp ttyyppee:://eettcc//ppoossttffiixx//rreellaayy__rreecciippiieennttss" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ttrraannssppoorrtt" whenever you change the
-transport table.
+transport file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp
+ttyyppee:://eettcc//ppoossttffiixx//ttrraannssppoorrtt" to specify an explicit type.
NOTE for Postfix < 2.2: Do not use the fallback_relay feature when relaying
mail for a backup or primary MX domain. Mail would loop between the Postfix MX
@@ -563,7 +588,7 @@ this with basic configuration information as discussed in the first half of
this document.
1 /etc/postfix/main.cf:
- 2 smtp_generic_maps = hash:/etc/postfix/generic
+ 2 smtp_generic_maps = lmdb:/etc/postfix/generic
3
4 /etc/postfix/generic:
5 his@localdomain.local hisaccount@hisisp.example
@@ -580,11 +605,14 @@ When mail is sent to a remote host via SMTP:
extension of +local (this example assumes that the ISP supports "+" style
address extensions).
-Specify ddbbmm instead of hhaasshh if your system uses ddbbmm files instead of ddbb files.
-To find out what lookup tables Postfix supports, use the command "ppoossttccoonnff --mm".
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ggeenneerriicc" whenever you change the
-generic table.
+generic file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp ttyyppee:://
+eettcc//ppoossttffiixx//ggeenneerriicc" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
SSoolluuttiioonn 22:: PPoossttffiixx vveerrssiioonn 22..11 aanndd eeaarrlliieerr
@@ -602,9 +630,9 @@ this document.
2 myhostname = hostname.localdomain
3 mydomain = localdomain
4
- 5 canonical_maps = hash:/etc/postfix/canonical
+ 5 canonical_maps = lmdb:/etc/postfix/canonical
6
- 7 virtual_alias_maps = hash:/etc/postfix/virtual
+ 7 virtual_alias_maps = lmdb:/etc/postfix/virtual
8
9 /etc/postfix/canonical:
10 your-login-name your-account@your-isp.com
@@ -626,12 +654,16 @@ Translation:
instead of sending it to the ISP. This part is not required but is
convenient.
-Specify ddbbmm instead of hhaasshh if your system uses ddbbmm files instead of ddbb files.
-To find out what lookup tables Postfix supports, use the command "ppoossttccoonnff --mm".
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ccaannoonniiccaall" whenever you change the
-canonical table.
+canonical file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp
+ttyyppee:://eettcc//ppoossttffiixx//ccaannoonniiccaall" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//vviirrttuuaall" whenever you change the
-virtual table.
+virtual file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp ttyyppee:://
+eettcc//ppoossttffiixx//vviirrttuuaall" to specify an explicit type.
diff --git a/postfix/README_FILES/UUCP_README b/postfix/README_FILES/UUCP_README
index 219ba6a93..c9c9e433e 100644
--- a/postfix/README_FILES/UUCP_README
+++ b/postfix/README_FILES/UUCP_README
@@ -49,6 +49,11 @@ for the other side of the story.
executes the uuuuxx command without assistance from the shell, so there are no
problems with shell meta characters in command-line parameters.
+ * Enable ttrraannssppoorrtt table lookups:
+
+ /etc/postfix/main.cf:
+ transport_maps = lmdb:/etc/postfix/transport
+
* Specify that mail for example.com, should be delivered via UUCP, to a host
named uucp-host:
@@ -56,19 +61,17 @@ for the other side of the story.
example.com uucp:uucp-host
.example.com uucp:uucp-host
+ Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
See the transport(5) manual page for more details.
* Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ttrraannssppoorrtt" whenever you change
- the ttrraannssppoorrtt file.
-
- * Enable ttrraannssppoorrtt table lookups:
-
- /etc/postfix/main.cf:
- transport_maps = hash:/etc/postfix/transport
+ the ttrraannssppoorrtt file, to (re)build a default-type indexed file. Execute
+ "ppoossttmmaapp ttyyppee:://eettcc//ppoossttffiixx//ttrraannssppoorrtt" to specify an explicit type.
- Specify ddbbmm instead of hhaasshh if your system uses ddbbmm files instead of ddbb
- files. To find out what map types Postfix supports, use the command
- "ppoossttccoonnff --mm".
+ The default indexed file type is configured with the default_database_type
+ parameter. To list available explicit types, execute the command "ppoossttccoonnff
+ --mm".
* Add example.com to the list of domains that your site is willing to relay
mail for.
diff --git a/postfix/README_FILES/VIRTUAL_README b/postfix/README_FILES/VIRTUAL_README
index e693a0ceb..de453bca6 100644
--- a/postfix/README_FILES/VIRTUAL_README
+++ b/postfix/README_FILES/VIRTUAL_README
@@ -22,8 +22,7 @@ The following topics are covered:
* Postfix virtual MAILBOX example: separate domains, non-UNIX accounts
* Non-Postfix mailbox store: separate domains, non-UNIX accounts
* Mail forwarding domains
- * Mailing lists
- * Autoreplies
+ * Hosted mailing list domains
CCaannoonniiccaall vveerrssuuss hhoosstteedd vveerrssuuss ootthheerr ddoommaaiinnss
@@ -56,16 +55,25 @@ ADDRESS_CLASS_README file.
LLooccaall ffiilleess vveerrssuuss nneettwwoorrkk ddaattaabbaasseess
-The examples in this text use table lookups from local files such as DBM or
-Berkeley DB. These are easy to debug with the ppoossttmmaapp command:
+The examples in this text use table lookups from local files such as lmdb:,
+cdb:, hash:, or dbm:. These are easy to debug with the ppoossttmmaapp command:
- Example: postmap -q info@example.com hash:/etc/postfix/virtual
+ Example: postmap -q info@example.com /etc/postfix/virtual
-See the documentation in LDAP_README, MYSQL_README and PGSQL_README for how to
-replace local files by databases. The reader is strongly advised to make the
-system work with local files before migrating to network databases, and to use
-the ppoossttmmaapp command to verify that network database lookups produce the exact
-same results as local file lookup.
+The above example assumes that the database is configured in main.cf as
+$default_database_type:/etc/postfix/virtual. Otherwise, use the command
+instead:
+
+ Example: postmap -q info@example.com type:/etc/postfix/virtual
+
+and specify the explicit type that this table uses in main.cf.
+
+You can replace local file lookups with networked (LDAP, SQL etc.) lookups. See
+the documentation in LDAP_README, MYSQL_README, PGSQL_README, etc., for
+examples. The reader is strongly advised to make Postfix work with local files
+before migrating to network databases, and to use the ppoossttmmaapp command to verify
+that network database lookups produce the exact same results as local file
+lookup.
Example: postmap -q info@example.com ldap:/etc/postfix/virtual.cf
@@ -105,7 +113,7 @@ mechanism for the example.com domain.
1 /etc/postfix/main.cf:
2 virtual_alias_domains = example.com ...other hosted domains...
- 3 virtual_alias_maps = hash:/etc/postfix/virtual
+ 3 virtual_alias_maps = lmdb:/etc/postfix/virtual
4
5 /etc/postfix/virtual:
6 postmaster@example.com postmaster
@@ -139,8 +147,16 @@ Notes:
receive many spam messages, and many bounces for spam messages that were
sent in the name of anything@example.com.
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//vviirrttuuaall" after changing the virtual
-file, and execute the command "ppoossttffiixx rreellooaadd" after changing the main.cf file.
+file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp ttyyppee:://eettcc//
+ppoossttffiixx//vviirrttuuaall" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
+
+Execute the command "ppoossttffiixx rreellooaadd" after changing the main.cf file.
Note: virtual aliases can resolve to a local address or to a remote address, or
both. They don't have to resolve to UNIX system accounts on your machine.
@@ -179,11 +195,11 @@ Here is an example of a virtual mailbox domain "example.com":
1 /etc/postfix/main.cf:
2 virtual_mailbox_domains = example.com ...more domains...
3 virtual_mailbox_base = /var/mail/vhosts
- 4 virtual_mailbox_maps = hash:/etc/postfix/vmailbox
+ 4 virtual_mailbox_maps = lmdb:/etc/postfix/vmailbox
5 virtual_minimum_uid = 100
6 virtual_uid_maps = static:5000
7 virtual_gid_maps = static:5000
- 8 virtual_alias_maps = hash:/etc/postfix/virtual
+ 8 virtual_alias_maps = lmdb:/etc/postfix/virtual
9
10 /etc/postfix/vmailbox:
11 info@example.com example.com/info
@@ -242,9 +258,20 @@ Notes:
explicit domain name on the right-hand side of the virtual alias table
entries or else mail will go to the wrong domain.
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//vviirrttuuaall" after changing the virtual
-file, execute "ppoossttmmaapp //eettcc//ppoossttffiixx//vvmmaaiillbbooxx" after changing the vmailbox file,
-and execute the command "ppoossttffiixx rreellooaadd" after changing the main.cf file.
+file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp ttyyppee:://eettcc//
+ppoossttffiixx//vviirrttuuaall" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
+
+Execute "ppoossttmmaapp //eettcc//ppoossttffiixx//vvmmaaiillbbooxx" after changing the vmailbox file, to
+(re)build a default-type indexed file. Execute "ppoossttmmaapp ttyyppee:://eettcc//ppoossttffiixx//
+vvmmaaiillbbooxx" to specify an explicit type.
+
+Execute the command "ppoossttffiixx rreellooaadd" after changing the main.cf file.
Note: mail delivery happens with the recipient's UID/GID privileges specified
with virtual_uid_maps and virtual_gid_maps. Postfix 2.0 and earlier will not
@@ -279,8 +306,8 @@ Postfix delivery agent:
1 /etc/postfix/main.cf:
2 virtual_transport = ...see below...
3 virtual_mailbox_domains = example.com ...more domains...
- 4 virtual_mailbox_maps = hash:/etc/postfix/vmailbox
- 5 virtual_alias_maps = hash:/etc/postfix/virtual
+ 4 virtual_mailbox_maps = lmdb:/etc/postfix/vmailbox
+ 5 virtual_alias_maps = lmdb:/etc/postfix/virtual
6
7 /etc/postfix/vmailbox:
8 info@example.com whatever
@@ -348,9 +375,20 @@ Notes:
explicit domain name on the right-hand side of the virtual alias table
entries or else mail will go to the wrong domain.
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//vviirrttuuaall" after changing the virtual
-file, execute "ppoossttmmaapp //eettcc//ppoossttffiixx//vvmmaaiillbbooxx" after changing the vmailbox file,
-and execute the command "ppoossttffiixx rreellooaadd" after changing the main.cf file.
+file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp ttyyppee:://eettcc//
+ppoossttffiixx//vviirrttuuaall" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
+
+Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//vvmmaaiillbbooxx" after changing the vmailbox
+file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp ttyyppee:://eettcc//
+ppoossttffiixx//vvmmaaiillbbooxx" to specify an explicit type.
+
+Execute the command "ppoossttffiixx rreellooaadd" after changing the main.cf file.
MMaaiill ffoorrwwaarrddiinngg ddoommaaiinnss
@@ -360,7 +398,7 @@ example shows how to set up example.com as a mail forwarding domain:
1 /etc/postfix/main.cf:
2 virtual_alias_domains = example.com ...other hosted domains...
- 3 virtual_alias_maps = hash:/etc/postfix/virtual
+ 3 virtual_alias_maps = lmdb:/etc/postfix/virtual
4
5 /etc/postfix/virtual:
6 postmaster@example.com postmaster
@@ -394,13 +432,26 @@ Notes:
receive many spam messages, and many bounces for spam messages that were
sent in the name of anything@example.com.
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//vviirrttuuaall" after changing the virtual
-file, and execute the command "ppoossttffiixx rreellooaadd" after changing the main.cf file.
+file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp ttyyppee:://eettcc//
+ppoossttffiixx//vviirrttuuaall" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
+
+Execute the command "ppoossttffiixx rreellooaadd" after changing the main.cf file.
More details about the virtual alias file are given in the virtual(5) manual
page, including multiple addresses on the right-hand side.
-MMaaiilliinngg lliissttss
+HHoosstteedd mmaaiilliinngg lliisstt ddoommaaiinnss
+
+Note: this section presents a historical approach to run a mailing list based
+on local aliases(5). This approach may still be useful for small mailing lists
+that are managed by hand or with the software like Majordomo. For a more
+contemporary and more scalable approach, see GNU Mailman.
The examples that were given above already show how to direct mail for virtual
postmaster addresses to a local postmaster. You can use the same method to
@@ -412,18 +463,29 @@ set up virtual aliases that direct virtual addresses to the local delivery
agent:
/etc/postfix/main.cf:
- virtual_alias_maps = hash:/etc/postfix/virtual
+ virtual_alias_maps = lmdb:/etc/postfix/virtual
+ virtual_mailbox_domains = example.com
/etc/postfix/virtual:
listname-request@example.com listname-request
listname@example.com listname
owner-listname@example.com owner-listname
+ postmaster@example.com postmaster
/etc/aliases:
listname: "|/some/where/majordomo/wrapper ..."
owner-listname: ...
listname-request: ...
+Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//vviirrttuuaall" after changing the virtual
+file, to (re)build a default-type indexed file. Execute "ppoossttmmaapp ttyyppee:://eettcc//
+ppoossttffiixx//vviirrttuuaall" to specify an explicit type.
+
+The default indexed file type is configured with the default_database_type
+parameter. To list available explicit types, execute the command "ppoossttccoonnff --mm".
+
This example assumes that in main.cf, $myorigin is listed under the
mydestination parameter setting. If that is not the case, specify an explicit
domain name on the right-hand side of the virtual alias table entries or else
@@ -437,47 +499,8 @@ transport mapping? The reason is that mail for the virtual mailing list would
be rejected with "User unknown". In order to make the transport mapping work
one would still need a bunch of virtual alias or virtual mailbox table entries.
- * In case of a virtual alias domain, there would need to be one identity
- mapping from each mailing list address to itself.
- * In case of a virtual mailbox domain, there would need to be a dummy mailbox
- for each mailing list address.
-
-AAuuttoorreepplliieess
-
-In order to set up an autoreply for virtual recipients while still delivering
-mail as normal, set up a rule in a virtual alias table:
-
- /etc/postfix/main.cf:
- virtual_alias_maps = hash:/etc/postfix/virtual
-
- /etc/postfix/virtual:
- user@domain.tld user@domain.tld, user@domain.tld@autoreply.mydomain.tld
-
-This delivers mail to the recipient, and sends a copy of the mail to the
-address that produces automatic replies. The address can be serviced on a
-different machine, or it can be serviced locally by setting up a transport map
-entry that pipes all mail for autoreply.mydomain.tld into some script that
-sends an automatic reply back to the sender.
-
-DO NOT list autoreply.mydomain.tld in mydestination!
-
- /etc/postfix/main.cf:
- transport_maps = hash:/etc/postfix/transport
-
- /etc/postfix/transport:
- autoreply.mydomain.tld autoreply:
-
- /etc/postfix/master.cf:
- # =============================================================
- # service type private unpriv chroot wakeup maxproc command
- # (yes) (yes) (yes) (never) (100)
- # =============================================================
- autoreply unix - n n - - pipe
- flags= user=nobody argv=/path/to/autoreply $sender $mailbox
-
-This invokes /path/to/autoreply with the sender address and the user@domain.tld
-recipient address on the command line.
-
-For more information, see the pipe(8) manual page, and the comments in the
-Postfix master.cf file.
+ * In the case of a virtual alias DOMAIN, there would need to be an identity
+ mapping from each mailing list address to an address in a different domain.
+ * In the case of a virtual mailbox DOMAIN, there would need to be a dummy
+ virtual_mailbox_maps for each mailing list address.
diff --git a/postfix/RELEASE_NOTES-3.11 b/postfix/RELEASE_NOTES-3.11
index 4bbf74e93..65baf51e3 100644
--- a/postfix/RELEASE_NOTES-3.11
+++ b/postfix/RELEASE_NOTES-3.11
@@ -29,47 +29,27 @@ IPL can continue with that license.
Major changes - database
------------------------
-[Infrastructure 20251226] Tooling to help with the migration away
-from Berkeley DB.
-
-The new parameter default_cache_db_type controls the default database
-type for address_verify_map and postscreen_cache_map, and can
-eliminate a few hard-coded database types in main.cf. This parameter
-defaults to 'lmdb' if the default_database_type value equals 'lmdb',
-otherwise it assumes the historical value 'btree'.
-
-Sites that build without Berkeley DB are suggested to use one of the
-following commands in their build process:
-
-1 - Make lmdb the default for both default_database_type
- and default_cache_db_type.
-
- make makefiles CCARGS="-DNO_DB ..." default_database_type=lmdb \
- default_cache_db_type=lmdb
+[Incompat 20260220] The alias_maps and alias_database parameter
+default values have changed from hash:/path/to/aliases (or
+dbm:/path/to/aliases) to $default_database_type:/path/to/aliases.
+This simplifies the migration away from Berkeley DB.
-2 - Make cdb the default for default_database_type, and make
- lmdb the default for default_cache_db_type.
+[Infrastructure 20260219] Support to migrate a Postfix configuration
+that uses Berkeley DB hash: or btree: tables, to a configuration
+that uses lmdb: or a combination of cdb: and lmdb:. This is needed
+for (Linux) OS distributions that have removed Berkeley DB support.
+See NON_BERKELEYDB_README for manual and atomatic migratom support.
- make makefiles CCARGS="-DNO_DB ..." default_database_type=cdb \
- default_cache_db_type=lmdb
+Postfix already supports CDB and LMDB for more than 10 years. It
+may be a good idea to do the migration before you need to upgrade
+to an OS distribution that no longer supports Berkeley DB.
-Postfix hash and btree files can easily be migrated when the source
-file (without the '.db name suffix) is available. Just run
-
- postmap lmdb:/path/to/file
-
-That does not work for address_verify_map, postscreen_cache_map,
-and the optional smtp_sasl_auth_cache_name. These have no source
-file because they are managed by Postfix daemon processes.
-
-You can either ignore these files (they will be populated again
-over time), or you can copy the existing entries from the existing
-'.db' file to a new '.lmdb' . file. But that is possible only if
-Berkeley DB support is still available. Execute as root:
+[Infrastructure 20251226] Tooling to help with the migration away
+from Berkeley DB.
- rm -f /path/to/file.lmdb
- postmap -s btree:/path/to/file | postmap -i lmdb:/path/to/file
- chown postfix /path/to/file.lmdb
+The new parameter default_cache_db_type controls the default database
+type for address_verify_map, postscreen_cache_map, and
+smtp_sasl_auth_cache_name, previously hard-coded as 'btree'.
[Feature 20250321] Safety: the SQLite client now logs a warning
when a query uses double quotes instead of the Postfix-recommended
diff --git a/postfix/TESTING b/postfix/TESTING
new file mode 100644
index 000000000..1e821ffcd
--- /dev/null
+++ b/postfix/TESTING
@@ -0,0 +1,17 @@
+Testing is a work in progress.
+
+- As of Postfix 3.11 most new code is covered by tests.
+
+- Many Postfix tests require building with shared=yes and dynamicmaps=no.
+The shared=yes is needed so that test code can overrride internal
+dependencies with mocks; the dynamicmaps=no is needed until there
+is an easy way way to tell dynamicmaps support to not use the system
+dynamicmaps.cf file.
+
+- Historically, many tests in src/util, src/dns, and src/smtpd
+are non-hermetic: they have dependencies on DNS or on local system
+configuration.
+
+- The PTEST test framework needs to be integrated; this fixed many many
+non-hermetic tests in src/util and src/dns. That development stalled
+after postfix-3.8-20220816-nonprod.
diff --git a/postfix/conf/access b/postfix/conf/access
index 00ab742c3..39b1c0fb5 100644
--- a/postfix/conf/access
+++ b/postfix/conf/access
@@ -19,15 +19,23 @@
# messages.
#
# Normally, the access(5) table is specified as a text file
-# that serves as input to the postmap(1) command. The
-# result, an indexed file in dbm or db format, is used for
-# fast searching by the mail system. Execute the command
-# "postmap /etc/postfix/access" to rebuild an indexed file
-# after changing the corresponding text file.
-#
-# When the table is provided via other means such as NIS,
-# LDAP or SQL, the same lookups are done as for ordinary
-# indexed files.
+# that serves as input to the postmap(1) command to create
+# an indexed file for fast lookup.
+#
+# Execute the command "postmap /etc/postfix/access" to
+# rebuild a default-type indexed file after changing the
+# text file, or execute "postmap type:/etc/postfix/access"
+# to specify an explicit type.
+#
+# The default indexed file type is configured with the
+# default_database_type parameter. Depending on the platform
+# this may be one of lmdb:, cdb:, hash:, or dbm: (without
+# the trailing ':').
+#
+# When the table is provided via other means such as NIS,
+# LDAP or SQL, the same lookups are done as for ordinary
+# indexed files. Managing such databases is outside the
+# scope of Postfix.
#
# Alternatively, the table can be provided as a regu-
# lar-expression map where patterns are given as regular
diff --git a/postfix/conf/aliases b/postfix/conf/aliases
index f4b853c03..85dac1bbd 100644
--- a/postfix/conf/aliases
+++ b/postfix/conf/aliases
@@ -60,20 +60,30 @@ decode: root
# (including domain).
#
# Normally, the aliases(5) table is specified as a text file
-# that serves as input to the postalias(1) command. The
-# result, an indexed file in dbm or db format, is used for
-# fast lookup by the mail system. Execute the command
-# newaliases in order to rebuild the indexed file after
-# changing the Postfix alias database.
+# that serves as input to the postalias(1) command to create
+# an indexed file for fast lookup. The location of this file
+# is system-dependent. This text will use /path/to/aliases.
+#
+# Execute the command "newaliases to rebuild the indexed
+# file after changing the text file. Execute "postalias -q
+# name /path/to/aliases" to query a default-type indexed
+# file, or execute "postalias -q name type:/path/to/aliases"
+# to specify an explicit type.
+#
+# The default indexed file type is configured with the
+# default_database_type parameter. Depending on the platform
+# this may be one of lmdb:, cdb:, hash:, or dbm: (without
+# the trailing ':').
#
# When the table is provided via other means such as NIS,
# LDAP or SQL, the same lookups are done as for ordinary
-# indexed files.
+# indexed files. Managing such databases is outside the
+# scope of Postfix.
#
-# Alternatively, the table can be provided as a regu-
-# lar-expression map where patterns are given as regular
-# expressions. In this case, the lookups are done in a
-# slightly different way as described below under "REGULAR
+# Alternatively, the table can be provided as a regu-
+# lar-expression map where patterns are given as regular
+# expressions. In this case, the lookups are done in a
+# slightly different way as described below under "REGULAR
# EXPRESSION TABLES".
#
# Users can control delivery of their own mail by setting up
@@ -87,63 +97,63 @@ decode: root
#
# name: value1, value2, ...
#
-# o Empty lines and whitespace-only lines are ignored,
-# as are lines whose first non-whitespace character
+# o Empty lines and whitespace-only lines are ignored,
+# as are lines whose first non-whitespace character
# is a `#'.
#
-# o A logical line starts with non-whitespace text. A
-# line that starts with whitespace continues a logi-
+# o A logical line starts with non-whitespace text. A
+# line that starts with whitespace continues a logi-
# cal line.
#
-# The name is a local address (no domain part). Use double
-# quotes when the name contains any special characters such
-# as whitespace, `#', `:', or `@'. The name is folded to
+# The name is a local address (no domain part). Use double
+# quotes when the name contains any special characters such
+# as whitespace, `#', `:', or `@'. The name is folded to
# lowercase, in order to make database lookups case insensi-
# tive.
#
-# In addition, when an alias exists for owner-name, this
-# will override the envelope sender address, so that deliv-
+# In addition, when an alias exists for owner-name, this
+# will override the envelope sender address, so that deliv-
# ery diagnostics are directed to owner-name, instead of the
-# originator of the message (for details, see
-# owner_request_special, expand_owner_alias and
-# reset_owner_alias). This is typically used to direct
-# delivery errors to the maintainer of a mailing list, who
+# originator of the message (for details, see
+# owner_request_special, expand_owner_alias and
+# reset_owner_alias). This is typically used to direct
+# delivery errors to the maintainer of a mailing list, who
# is in a better position to deal with mailing list delivery
# problems than the originator of the undelivered mail.
#
# The value contains one or more of the following:
#
# address
-# Mail is forwarded to address, which is compatible
+# Mail is forwarded to address, which is compatible
# with the RFC 822 standard.
#
# /file/name
-# Mail is appended to /file/name. For details on how
-# a file is written see the sections "EXTERNAL FILE
-# DELIVERY" and "DELIVERY RIGHTS" in the local(8)
-# documentation. Delivery is not limited to regular
-# files. For example, to dispose of unwanted mail,
+# Mail is appended to /file/name. For details on how
+# a file is written see the sections "EXTERNAL FILE
+# DELIVERY" and "DELIVERY RIGHTS" in the local(8)
+# documentation. Delivery is not limited to regular
+# files. For example, to dispose of unwanted mail,
# deflect it to /dev/null.
#
# |command
-# Mail is piped into command. Commands that contain
-# special characters, such as whitespace, should be
-# enclosed between double quotes. For details on how
-# a command is executed see "EXTERNAL COMMAND DELIV-
+# Mail is piped into command. Commands that contain
+# special characters, such as whitespace, should be
+# enclosed between double quotes. For details on how
+# a command is executed see "EXTERNAL COMMAND DELIV-
# ERY" and "DELIVERY RIGHTS" in the local(8) documen-
# tation.
#
# When the command fails, a limited amount of command
-# output is mailed back to the sender. The file
-# /usr/include/sysexits.h defines the expected exit
-# status codes. For example, use "|exit 67" to simu-
-# late a "user unknown" error, and "|exit 0" to
+# output is mailed back to the sender. The file
+# /usr/include/sysexits.h defines the expected exit
+# status codes. For example, use "|exit 67" to simu-
+# late a "user unknown" error, and "|exit 0" to
# implement an expensive black hole.
#
# :include:/file/name
-# Mail is sent to the destinations listed in the
+# Mail is sent to the destinations listed in the
# named file. Lines in :include: files have the same
-# syntax as the right-hand side of aliases(5)
+# syntax as the right-hand side of aliases(5)
# entries.
#
# A destination can be any destination that is
@@ -154,12 +164,12 @@ decode: root
#
# ADDRESS EXTENSION
# When alias database search fails, and the recipient local-
-# part contains the optional recipient delimiter (e.g.,
-# user+foo), the search is repeated for the unextended
+# part contains the optional recipient delimiter (e.g.,
+# user+foo), the search is repeated for the unextended
# address (e.g., user).
#
-# The propagate_unmatched_extensions parameter controls
-# whether an unmatched address extension (+foo) is propa-
+# The propagate_unmatched_extensions parameter controls
+# whether an unmatched address extension (+foo) is propa-
# gated to the result of table lookup.
#
# CASE FOLDING
@@ -167,88 +177,88 @@ decode: root
# to lowercase before database lookup.
#
# REGULAR EXPRESSION TABLES
-# This section describes how the table lookups change when
+# This section describes how the table lookups change when
# the table is given in the form of regular expressions. For
-# a description of regular expression lookup table syntax,
-# see regexp_table(5) or pcre_table(5). NOTE: these formats
+# a description of regular expression lookup table syntax,
+# see regexp_table(5) or pcre_table(5). NOTE: these formats
# do not use ":" at the end of a pattern.
#
-# Each regular expression is applied to the entire search
-# string. Thus, a search string user+foo is not broken up
+# Each regular expression is applied to the entire search
+# string. Thus, a search string user+foo is not broken up
# into user and foo.
#
-# Regular expressions are applied in the order as specified
-# in the table, until a regular expression is found that
+# Regular expressions are applied in the order as specified
+# in the table, until a regular expression is found that
# matches the search string.
#
-# Lookup results are the same as with indexed file lookups.
-# For security reasons there is no support for $1, $2 etc.
+# Lookup results are the same as with indexed file lookups.
+# For security reasons there is no support for $1, $2 etc.
# substring interpolation.
#
# SECURITY
-# The local(8) delivery agent disallows regular expression
-# substitution of $1 etc. in alias_maps, because that would
+# The local(8) delivery agent disallows regular expression
+# substitution of $1 etc. in alias_maps, because that would
# open a security hole.
#
-# The local(8) delivery agent will silently ignore requests
-# to use the proxymap(8) server within alias_maps. Instead
-# it will open the table directly. Before Postfix version
-# 2.2, the local(8) delivery agent will terminate with a
+# The local(8) delivery agent will silently ignore requests
+# to use the proxymap(8) server within alias_maps. Instead
+# it will open the table directly. Before Postfix version
+# 2.2, the local(8) delivery agent will terminate with a
# fatal error.
#
# CONFIGURATION PARAMETERS
-# The following main.cf parameters are especially relevant.
-# The text below provides only a parameter summary. See
+# The following main.cf parameters are especially relevant.
+# The text below provides only a parameter summary. See
# postconf(5) for more details including examples.
#
# alias_database (see 'postconf -d' output)
-# The alias databases for local(8) delivery that are
+# The alias databases for local(8) delivery that are
# updated with "newaliases" or with "sendmail -bi".
#
# alias_maps (see 'postconf -d' output)
-# Optional lookup tables that are searched only with
-# an email address localpart (no domain) and that
-# apply only to local(8) recipients; this is unlike
-# virtual_alias_maps that are often searched with a
-# full email address (including domain) and that
-# apply to all recipients: local(8), virtual, and
+# Optional lookup tables that are searched only with
+# an email address localpart (no domain) and that
+# apply only to local(8) recipients; this is unlike
+# virtual_alias_maps that are often searched with a
+# full email address (including domain) and that
+# apply to all recipients: local(8), virtual, and
# remote.
#
# allow_mail_to_commands (alias, forward)
-# Restrict local(8) mail delivery to external com-
+# Restrict local(8) mail delivery to external com-
# mands.
#
# allow_mail_to_files (alias, forward)
-# Restrict local(8) mail delivery to external files.
+# Restrict local(8) mail delivery to external files.
#
# expand_owner_alias (no)
# When delivering to an alias "aliasname" that has an
# "owner-aliasname" companion alias, set the envelope
-# sender address to the expansion of the
+# sender address to the expansion of the
# "owner-aliasname" alias.
#
# propagate_unmatched_extensions (canonical, virtual)
-# What address lookup tables copy an address exten-
+# What address lookup tables copy an address exten-
# sion from the lookup key to the lookup result.
#
# owner_request_special (yes)
# Enable special treatment for owner-listname entries
# in the aliases(5) file, and don't split owner-list-
-# name and listname-request address localparts when
+# name and listname-request address localparts when
# the recipient_delimiter is set to "-".
#
# recipient_delimiter (empty)
-# The set of characters that can separate an email
-# address localpart, user name, or a .forward file
+# The set of characters that can separate an email
+# address localpart, user name, or a .forward file
# name from its extension.
#
# Available in Postfix version 2.3 and later:
#
# frozen_delivered_to (yes)
-# Update the local(8) delivery agent's idea of the
-# Delivered-To: address (see prepend_deliv-
-# ered_header) only once, at the start of a delivery
-# attempt; do not update the Delivered-To: address
+# Update the local(8) delivery agent's idea of the
+# Delivered-To: address (see prepend_deliv-
+# ered_header) only once, at the start of a delivery
+# attempt; do not update the Delivered-To: address
# while expanding aliases or .forward files.
#
# STANDARDS
@@ -261,12 +271,12 @@ decode: root
# postconf(5), configuration parameters
#
# README FILES
-# Use "postconf readme_directory" or "postconf html_direc-
+# Use "postconf readme_directory" or "postconf html_direc-
# tory" to locate this information.
# DATABASE_README, Postfix lookup table overview
#
# LICENSE
-# The Secure Mailer license must be distributed with this
+# The Secure Mailer license must be distributed with this
# software.
#
# AUTHOR(S)
diff --git a/postfix/conf/canonical b/postfix/conf/canonical
index 894fd5bcd..5785abaa1 100644
--- a/postfix/conf/canonical
+++ b/postfix/conf/canonical
@@ -17,15 +17,23 @@
# the queue. The address mapping is recursive.
#
# Normally, the canonical(5) table is specified as a text
-# file that serves as input to the postmap(1) command. The
-# result, an indexed file in dbm or db format, is used for
-# fast searching by the mail system. Execute the command
-# "postmap /etc/postfix/canonical" to rebuild an indexed
-# file after changing the corresponding text file.
-#
-# When the table is provided via other means such as NIS,
-# LDAP or SQL, the same lookups are done as for ordinary
-# indexed files.
+# file that serves as input to the postmap(1) command to
+# create an indexed file for fast lookup.
+#
+# Execute the command "postmap /etc/postfix/canonical" to
+# rebuild a default-type indexed file after changing the
+# text file, or execute "postmap type:/etc/postfix/canoni-
+# cal" to specify an explicit type.
+#
+# The default indexed file type is configured with the
+# default_database_type parameter. Depending on the platform
+# this may be one of lmdb:, cdb:, hash:, or dbm: (without
+# the trailing ':').
+#
+# When the table is provided via other means such as NIS,
+# LDAP or SQL, the same lookups are done as for ordinary
+# indexed files. Managing such databases is outside the
+# scope of Postfix.
#
# Alternatively, the table can be provided as a regu-
# lar-expression map where patterns are given as regular
diff --git a/postfix/conf/generic b/postfix/conf/generic
index 508e44a42..4ebe3dd11 100644
--- a/postfix/conf/generic
+++ b/postfix/conf/generic
@@ -30,15 +30,23 @@
# that are used in SMTP protocol commands).
#
# Normally, the generic(5) table is specified as a text file
-# that serves as input to the postmap(1) command. The
-# result, an indexed file in dbm or db format, is used for
-# fast searching by the mail system. Execute the command
-# "postmap /etc/postfix/generic" to rebuild an indexed file
-# after changing the corresponding text file.
-#
-# When the table is provided via other means such as NIS,
-# LDAP or SQL, the same lookups are done as for ordinary
-# indexed files.
+# that serves as input to the postmap(1) command to create
+# an indexed file for fast lookup.
+#
+# Execute the command "postmap /etc/postfix/generic" to
+# rebuild a default-type indexed file after changing the
+# text file, or execute "postmap type:/etc/postfix/generic"
+# to specify an explicit type.
+#
+# The default indexed file type is configured with the
+# default_database_type parameter. Depending on the platform
+# this may be one of lmdb:, cdb:, hash:, or dbm: (without
+# the trailing ':').
+#
+# When the table is provided via other means such as NIS,
+# LDAP or SQL, the same lookups are done as for ordinary
+# indexed files. Managing such databases is outside the
+# scope of Postfix.
#
# Alternatively, the table can be provided as a regu-
# lar-expression map where patterns are given as regular
diff --git a/postfix/conf/postfix-files b/postfix/conf/postfix-files
index 0d3ae7946..88c337161 100644
--- a/postfix/conf/postfix-files
+++ b/postfix/conf/postfix-files
@@ -99,6 +99,7 @@ $daemon_directory/local:f:root:-:755
$daemon_directory/main.cf:f:root:-:644:o
$daemon_directory/master.cf:f:root:-:644:o
$daemon_directory/master:f:root:-:755
+$daemon_directory/nbdb_reindexd:f:root:-:755
$daemon_directory/oqmgr:f:root:-:755
$daemon_directory/pickup:f:root:-:755
$daemon_directory/pipe:f:root:-:755
@@ -107,6 +108,7 @@ $daemon_directory/post-install:f:root:-:755
#$daemon_directory/postfix-files:f:root:-:644:o
#$daemon_directory/postfix-files.d:d:root:-:755:o
$daemon_directory/postfix-script:f:root:-:755
+$daemon_directory/postfix-non-bdb-script:f:root:-:755
$daemon_directory/postfix-tls-script:f:root:-:755
$daemon_directory/postfix-wrapper:f:root:-:755
$daemon_directory/postmulti-script:f:root:-:755
@@ -172,6 +174,7 @@ $manpage_directory/man1/postalias.1:f:root:-:644
$manpage_directory/man1/postcat.1:f:root:-:644
$manpage_directory/man1/postconf.1:f:root:-:644
$manpage_directory/man1/postdrop.1:f:root:-:644
+$manpage_directory/man1/postfix-non-bdb.1:f:root:-:644
$manpage_directory/man1/postfix-tls.1:f:root:-:644
$manpage_directory/man1/postfix.1:f:root:-:644
$manpage_directory/man1/postkick.1:f:root:-:644
@@ -220,6 +223,7 @@ $manpage_directory/man8/flush.8:f:root:-:644
$manpage_directory/man8/lmtp.8:f:root:-:644
$manpage_directory/man8/local.8:f:root:-:644
$manpage_directory/man8/master.8:f:root:-:644
+$manpage_directory/man8/nbdb_reindexd.8:f:root:-:644
$manpage_directory/man8/nqmgr.8:f:root:-:644:o
$manpage_directory/man8/oqmgr.8:f:root:-:644:
$manpage_directory/man8/pickup.8:f:root:-:644
@@ -310,6 +314,7 @@ $readme_directory/MYSQL_README:f:root:-:644
$readme_directory/SMTPUTF8_README:f:root:-:644
$readme_directory/SQLITE_README:f:root:-:644
$readme_directory/NFS_README:f:root:-:644
+$readme_directory/NON_BERKELEYDB_README:f:root:-:644
$readme_directory/OVERVIEW:f:root:-:644
$readme_directory/PACKAGE_README:f:root:-:644
$readme_directory/PCRE_README:f:root:-:644
@@ -375,6 +380,7 @@ $html_directory/MYSQL_README.html:f:root:-:644
$html_directory/SMTPUTF8_README.html:f:root:-:644
$html_directory/SQLITE_README.html:f:root:-:644
$html_directory/NFS_README.html:f:root:-:644
+$html_directory/NON_BERKELEYDB_README.html:f:root:-:644
$html_directory/OVERVIEW.html:f:root:-:644
$html_directory/PACKAGE_README.html:f:root:-:644
$html_directory/PCRE_README.html:f:root:-:644
@@ -433,6 +439,7 @@ $html_directory/mysql_table.5.html:f:root:-:644
$html_directory/sqlite_table.5.html:f:root:-:644
$html_directory/nisplus_table.5.html:f:root:-:644
$html_directory/newaliases.1.html:h:$html_directory/mailq.1.html:-:644
+$html_directory/nbdb_reindexd.8.html:f:root:-:644
$html_directory/oqmgr.8.html:f:root:-:644
$html_directory/pcre_table.5.html:f:root:-:644
$html_directory/pgsql_table.5.html:f:root:-:644
@@ -445,6 +452,7 @@ $html_directory/postconf.5.html:f:root:-:644
$html_directory/postdrop.1.html:f:root:-:644
$html_directory/postfix-logo.jpg:f:root:-:644
$html_directory/postfix-manuals.html:f:root:-:644
+$html_directory/postfix-non-bdb.1.html:f:root:-:644
$html_directory/postfix-tls.1.html:f:root:-:644
$html_directory/postfix-wrapper.5.html:f:root:-:644
$html_directory/postfix.1.html:f:root:-:644
diff --git a/postfix/conf/postfix-non-bdb-script b/postfix/conf/postfix-non-bdb-script
new file mode 100644
index 000000000..f3b938c27
--- /dev/null
+++ b/postfix/conf/postfix-non-bdb-script
@@ -0,0 +1,237 @@
+#!/bin/sh
+
+#++
+# NAME
+# postfix-non-bdb 1
+# SUMMARY
+# Postfix non-Berkeley-DB migration
+# SYNOPSIS
+# \fBpostfix non-bdb\fR \fIsubcommand\fR
+# DESCRIPTION
+# The "\fBpostfix non-bdb \fIsubcommand\fR" feature edits main.cf
+# and master.cf, to manage the migration of an existing Postfix
+# configuration that uses Berkeley DB type "hash:" or "btree:"
+# tables (which are no longer supported on some OS distributions),
+# to supported types such as "cdb:" or "lmdb:".
+#
+# The following subcommands are available:
+# .IP \fBstatus\fR
+# Reports the non-Berkeley-DB migration status, without making
+# any changes.
+# .IP \fBdisable\fR
+# Edits main.cf and master.cf, to turn off the \fBenable-redirect\fR
+# and \fBenable-reindex\fR features.
+# .sp
+# This will break integration with other software such as
+# mailman versions from before May 2025 when they want to
+# use "postmap hash:/path/to/file", for example, to update a
+# mailman-maintained table.
+# .IP "\fBenable-redirect\fR (aliasing)"
+# Edits main.cf and master.cf, to enable redirection (aliasing)
+# from Berkeley DB types "hash" and "btree" to the non-Berkeley-DB
+# types specified with $default_database_type and
+# $default_cache_db_type. Custom redirection may be configured
+# with non_bdb_custom_mapping.
+# .sp
+# This configuration will not automatically create non-Berkeley-DB
+# indexed database files. Instead, Postfix programs will log an
+# error as they fail to open an indexed database file, and will
+# leave it to the system administrator to run postmap(1) or
+# postalias(1) to create that file.
+# .sp
+# This will fix integration with other software such as mailman
+# versions from before May 2025 when they want to use "postmap
+# hash:/path/to/file", for example, to update a mailman-maintained
+# table.
+# .sp
+# This subcommand will not make any changes when
+# default_database_type or default_cache_db_type specify a hash:
+# or btree: type.
+# .IP \fBenable-reindex\fR
+# Edits main.cf and master.cf, to implement \fBenable-redirect\fR,
+# and to automatically create a non-Berkeley-DB indexed database
+# file when a daemon program wants to access a file that does not
+# yet exist. This uses the nbdb_reindexd(8) daemon to run postmap(1)
+# or postalias(1) as described in "SECURITY" below.
+# .sp
+# This subcommand immediately generates non-Berkeley-DB indexed
+# files for unprivileged command-line programs that cannot send
+# requests to the nbdb_reindexd(8) daemon server. This involves
+# "hash:" and "btree:" tables that are used by postqueue(1) and
+# sendmail(1) as specified in authorized_flush_users and
+# authorized_mailq_users, and by sendmail(1) and postdrop(1)
+# as specified in authorized_submit_users and
+# local_login_sender_maps.
+# .sp
+# This subcommand will not make any changes when
+# default_database_type or default_cache_db_type specify a hash:
+# or btree: type.
+# .sp
+# \fINOTE: \fBenable-reindex\fI should be used only temporarily
+# to generate most of the non-Berkeley-DB indexed files that Postfix
+# needs. Leaving this enabled may expose the system to
+# privilege-escalation attacks. There are no security
+# concerns for using \fBenable-redirect\fR.
+# SECURITY
+# .ad
+# .fi
+# The nbdb_reindexd(8) daemon automatically generates a
+# non-Berkeley-DB indexed file only if the database pathname matches
+# the directory prefixes specified with
+# non_bdb_migration_allow_root_prefixes (for files that must be
+# owned by root), or with non_bdb_migration_allow_user_prefixes
+# (for files that must be owned by a non-root user). Additional
+# restrictions on file and directory ownership and permissions
+# are documented in nbdb_reindexd(8).
+# CONFIGURATION PARAMETERS
+# .ad
+# .fi
+# The "\fBpostfix non-bdb \fIsubcommand\fR" feature
+# updates the following configuration parameter:
+# .IP "\fBnon_bdb_migration_level (disable)\fR"
+# The non-Berkeley-DB migration service level.
+# .PP
+# Other relevant parameters:
+# .IP "\fBnon_bdb_custom_mapping (empty)\fR"
+# When non-Berkeley-DB migration is enabled, an optional mapping
+# from a hash: or btree: type to a non-Berkeley-DB type.
+# .IP "\fBnon_bdb_migration_allow_root_prefixes (see 'postconf -d non_bdb_migration_allow_root_prefixes' output)\fR"
+# A list of trusted pathname prefixes that must be matched when
+# the non-Berkeley-DB migration service (\fBnbdb_reindexd\fR(8)) needs to
+# run \fBpostmap\fR(1) or \fBpostalias\fR(1) commands with "root" privilege.
+# .IP "\fBnon_bdb_migration_allow_user_prefixes (see 'postconf -d non_bdb_migration_allow_user_prefixes' output)\fR"
+# A list of trusted pathname prefixes that must be matched when
+# the non-Berkeley-DB migration service (\fBnbdb_reindexd\fR(8)) needs to
+# run \fBpostmap\fR(1) or \fBpostalias\fR(1) commands with non-root privilege.
+# SEE ALSO
+# nbdb_reindexd(8) reindexing service
+# README FILES
+# .ad
+# .fi
+# Use "\fBpostconf readme_directory\fR" or
+# "\fBpostconf html_directory\fR" to locate this information.
+# .na
+# .nf
+# NON_BERKELEYDB_README, migration guide
+# LICENSE
+# .ad
+# .fi
+# The Secure Mailer license must be distributed with this software.
+# HISTORY
+# The "\fBpostfix non-bdb\fR" command was introduced with Postfix
+# version 3.11.
+# AUTHOR(S)
+# Wietse Venema
+# porcupine.org
+#--
+
+umask 022
+SHELL=/bin/sh
+
+case $command_directory in
+"") echo This script must be run by the postfix command. 1>&2
+ echo Do not run directly. 1>&2 exit 1;; esac
+
+cd $command_directory || {
+ # Let's hope there's a "postlog" somewhere on the PATH
+ FATAL="postlog -p fatal -t $MAIL_LOGTAG/postfix-tls-script"
+ msg="no Postfix command directory '${command_directory}'"
+ $FATAL "$msg" || { echo "$msg" >&2; sleep 1; }
+ exit 1
+}
+
+postconf=$command_directory/postconf
+LOGGER="$command_directory/postlog -t $MAIL_LOGTAG/postfix-non-bdb-script"
+INFO="$LOGGER -p info"
+WARN="$LOGGER -p warn"
+ERROR="$LOGGER -p error"
+FATAL="$LOGGER -p fatal"
+
+REINDEX_SVC=nbdb_reindex
+REINDEX_BIN=nbdb_reindexd
+
+# Helper functions.
+
+reindex_for_non_daemons() {
+ # The following tables are needed by unprivileged command-line
+ # tools that cannot send requests to the reindexing service unless
+ # they are run by root.
+ for type_name in `$postconf -h authorized_flush_users \
+ authorized_mailq_users authorized_submit_users \
+ local_login_sender_maps`; \
+ do
+ case $type_name in
+ hash:*|btree:*)
+ $INFO Proactively reindexing $type_name
+ postmap $type_name || exit 1;;
+ esac
+ done
+}
+
+validate_redirect_targets() {
+ # By default, the Berkeley DB type 'hash' will redirect to
+ # $default_database_type, and type 'btree' will redirect to
+ # $default_cache_db_type. Require that the targets are not
+ # Berkeley DB types.
+ for param in default_database_type default_cache_db_type
+ do
+ eval type="`$postconf -h $param`"
+ case $type in
+ hash|btree)
+ $FATAL "parameter $param specifies a Berkeley DB type: '$type'"
+ exit 1;;
+ esac
+ done
+}
+
+# Subcommand implementations.
+
+status() {
+ $postconf -h non_bdb_migration_level
+}
+
+disable_all() {
+ $postconf -X non_bdb_migration_level
+ $postconf -MX ${REINDEX_SVC}/unix
+}
+
+enable_redirect() {
+ validate_redirect_targets
+ $postconf -MX ${REINDEX_SVC}/unix
+ $postconf non_bdb_migration_level=enable-redirect || exit 1
+}
+
+enable_reindex() {
+ validate_redirect_targets
+ reindex_for_non_daemons
+ $postconf -M \
+ ${REINDEX_SVC}/unix="${REINDEX_SVC} unix y n n - 1 ${REINDEX_BIN}" || exit 1
+ $postconf non_bdb_migration_level=enable-reindex || exit 1
+}
+
+usage() {
+ $FATAL "usage: postfix non-bdb enable-redirect (or enable-reindex, or disable)"
+ exit 1
+}
+
+#
+# Parse JCL
+#
+case $# in
+ 1) ;;
+ *) usage;;
+esac
+
+case "$1" in
+enable-redirect)
+ enable_redirect;;
+enable-reindex)
+ enable_reindex;;
+disable)
+ disable_all;;
+status)
+ status;;
+*) usage
+esac
+
+exit 0
diff --git a/postfix/conf/postfix-script b/postfix/conf/postfix-script
index de86d382b..e19591a4d 100755
--- a/postfix/conf/postfix-script
+++ b/postfix/conf/postfix-script
@@ -142,6 +142,7 @@ start|start-fg)
}
# Foreground this so it can be stopped. All inodes are cached.
$daemon_directory/postfix-script check-warn
+ $daemon_directory/postfix-script check-alias-maps-migration
fi
$INFO starting the Postfix mail system || exit 1
case $1 in
@@ -245,6 +246,7 @@ flush)
check)
$daemon_directory/postfix-script check-fatal || exit 1
+ $daemon_directory/postfix-script check-alias-maps-migration
$daemon_directory/postfix-script check-warn
exit 0
;;
@@ -298,6 +300,34 @@ check-fatal)
exit 0
;;
+check-alias-maps-migration)
+ # This command is NOT part of the public interface.
+
+ # As of Postfix 3.11, the default alias_maps value
+ # contains $default_database_type:/path/to/aliases. When
+ # default_database_type is changed to lmdb or cdb, Postfix
+ # will not generate hash:/path/to/aliases requests that can
+ # be resolved dynamically with enable-redirect or enable-reindex.
+ #
+ # To avoid this, craft a one-time stand-alone re-indexing request.
+ test -f $config_directory/check-alias-maps-migration-done && exit 0
+ BACKUP_IFS="$IFS"
+ for map in `$command_directory/postconf -hx alias_maps`
+ do
+ echo "$map" | (
+ IFS=: read type path; IFS="$BACKUP_IFS"
+ case "$type" in
+ cdb|lmdb)
+ test ! -f "$path.$type" -a -f "$path" -a -f "$path.db" && {
+ $daemon_directory/nbdb_reindexd -S "hash:$path" ||
+ $WARN "See https://www.postfix.org/NON_BERKELEYDB_README.html for suggestions"
+ }
+ esac
+ )
+ done
+ touch $config_directory/check-alias-maps-migration-done
+ ;;
+
check-warn)
# This command is NOT part of the public interface.
@@ -408,9 +438,9 @@ post-install)
$daemon_directory/post-install "$@"
;;
-tls)
- shift
- $daemon_directory/postfix-tls-script "$@"
+tls|non-bdb)
+ cmd=$1; shift
+ $daemon_directory/postfix-$cmd-script "$@"
;;
/*)
@@ -452,7 +482,7 @@ logrotate)
;;
*)
- $FATAL "unknown command: '$1'. Usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration, logrotate)"
+ $FATAL "unknown command: '$1'. Usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration, logrotate, tls, non-bdb)"
exit 1
;;
diff --git a/postfix/conf/relocated b/postfix/conf/relocated
index 891021fa6..e82225b59 100644
--- a/postfix/conf/relocated
+++ b/postfix/conf/relocated
@@ -12,15 +12,23 @@
# messages.
#
# Normally, the relocated(5) table is specified as a text
-# file that serves as input to the postmap(1) command. The
-# result, an indexed file in dbm or db format, is used for
-# fast searching by the mail system. Execute the command
-# "postmap /etc/postfix/relocated" to rebuild an indexed
-# file after changing the corresponding relocated table.
-#
-# When the table is provided via other means such as NIS,
-# LDAP or SQL, the same lookups are done as for ordinary
-# indexed files.
+# file that serves as input to the postmap(1) command to
+# create an indexed file for fast lookup.
+#
+# Execute the command "postmap /etc/postfix/relocated" to
+# rebuild a default-type indexed file after changing the
+# text file, or execute "postmap type:/etc/postfix/relo-
+# cated" to specify an explicit type.
+#
+# The default indexed file type is configured with the
+# default_database_type parameter. Depending on the platform
+# this may be one of lmdb:, cdb:, hash:, or dbm: (without
+# the trailing ':').
+#
+# When the table is provided via other means such as NIS,
+# LDAP or SQL, the same lookups are done as for ordinary
+# indexed files. Managing such databases is outside the
+# scope of Postfix.
#
# Alternatively, the table can be provided as a regu-
# lar-expression map where patterns are given as regular
diff --git a/postfix/conf/transport b/postfix/conf/transport
index f624da5e0..ea6d92556 100644
--- a/postfix/conf/transport
+++ b/postfix/conf/transport
@@ -59,15 +59,23 @@
# relayhost, or from the recipient domain.
#
# Normally, the transport(5) table is specified as a text
-# file that serves as input to the postmap(1) command. The
-# result, an indexed file in dbm or db format, is used for
-# fast searching by the mail system. Execute the command
-# "postmap /etc/postfix/transport" to rebuild an indexed
-# file after changing the corresponding transport table.
-#
-# When the table is provided via other means such as NIS,
-# LDAP or SQL, the same lookups are done as for ordinary
-# indexed files.
+# file that serves as input to the postmap(1) command to
+# create an indexed file for fast lookup.
+#
+# Execute the command "postmap /etc/postfix/transport" to
+# rebuild a default-type indexed file after changing the
+# text file, or execute "postmap type:/etc/postfix/trans-
+# port" to specify an explicit type.
+#
+# The default indexed file type is configured with the
+# default_database_type parameter. Depending on the platform
+# this may be one of lmdb:, cdb:, hash:, or dbm: (without
+# the trailing ':').
+#
+# When the table is provided via other means such as NIS,
+# LDAP or SQL, the same lookups are done as for ordinary
+# indexed files. Managing such databases is outside the
+# scope of Postfix.
#
# Alternatively, the table can be provided as a regu-
# lar-expression map where patterns are given as regular
diff --git a/postfix/conf/virtual b/postfix/conf/virtual
index 63799778c..87b46df2c 100644
--- a/postfix/conf/virtual
+++ b/postfix/conf/virtual
@@ -45,15 +45,23 @@
# addresses in general.
#
# Normally, the virtual(5) alias table is specified as a
-# text file that serves as input to the postmap(1) command.
-# The result, an indexed file in dbm or db format, is used
-# for fast searching by the mail system. Execute the command
-# "postmap /etc/postfix/virtual" to rebuild an indexed file
-# after changing the corresponding text file.
-#
-# When the table is provided via other means such as NIS,
-# LDAP or SQL, the same lookups are done as for ordinary
-# indexed files.
+# text file that serves as input to the postmap(1) command
+# to create an indexed file for fast lookup.
+#
+# Execute the command "postmap /etc/postfix/virtual" to
+# rebuild a default-type indexed file after changing the
+# text file, or execute "postmap type:/etc/postfix/virtual"
+# to specify an explicit type.
+#
+# The default indexed file type is configured with the
+# default_database_type parameter. Depending on the platform
+# this may be one of lmdb:, cdb:, hash:, or dbm: (without
+# the trailing ':').
+#
+# When the table is provided via other means such as NIS,
+# LDAP or SQL, the same lookups are done as for ordinary
+# indexed files. Managing such databases is outside the
+# scope of Postfix.
#
# Alternatively, the table can be provided as a regu-
# lar-expression map where patterns are given as regular
diff --git a/postfix/html/INSTALL.html b/postfix/html/INSTALL.html
index 7446b7877..62f178e82 100644
--- a/postfix/html/INSTALL.html
+++ b/postfix/html/INSTALL.html
@@ -671,7 +671,7 @@ listed below. See the postconf(5) manpage for a de
@@ -816,7 +821,7 @@ off Postfix features at compile time:
-DNO_DB
Do not build with Berkeley
DB support. By default, Berkeley DB support is compiled in on
-platforms that are known to support this feature. If you override
+platforms that have historically supported this feature. If you override
this, then you probably should also override default_database_type
or DEF_DB_TYPE as described in section 4.6.
@@ -1550,8 +1555,8 @@ the exact location of the text file.
First, be sure to update the text file with aliases for root,
postmaster and "postfix" that forward mail to a real person. Postfix
-has a sample aliases file /etc/postfix/aliases that you can adapt
-to local conditions.
+has a sample aliases file /etc/postfix/aliases that you can copy
+and adapt to local conditions. /p>
@@ -1577,6 +1582,15 @@ following commands:
+
The form "postalias /etc/aliases" builds a default-type indexed
+file. Use "postalias type:/etc/aliases" to specify an explicit
+type (it should match the type in the output from "postconf -x
+alias_maps").
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
(Please see the Appendix for Mailman
+integration tips.)
+
+
After running the same Postfix configuration for a decade or
+more, there is a rude awakening when you update the OS to a newer
+version that has deleted its support for Berkeley DB. Postfix
+programs fail to open all hash: and btree: tables with messages
+like this:
+
+
+
+Berkeley DB support for 'hash:/etc/postfix/virtual' is not available
+for this build; see https://www.postfix.org/NON_BERKELEYDB_README.html
+for alternatives
+
+
+
+
This document comes to the rescue, with strategies to migrate
+an existing Postfix configuration that uses Berkeley DB hash: and
+btree: database files, to an OS distribution that has removed
+Berkeley DB support, with a Postfix configuration that uses lmdb: (or
+a combination of cdb: and lmdb:).
+
+
By the way, you don't have to wait until Berkeley DB support
+is removed; your can proactively use the steps described here on a
+system that still has Berkeley DB, to migrate a Postfix configuration
+from Berkeley DB to lmdb: (or a combination of cdb: and lmdb:).
+
+
Historically, Postfix has used Berkeley DB hash: and btree: for
+key-value stores, as indicated in the "With Berkeley DB" table
+column below. In a world without Berkeley DB, good replacements are
+cdb: and lmdb: as indicated in the "No Berkeley DB" column.
+
+
+
+
+
+
Purpose
With Berkeley DB
No Berkeley
+DB
+
+
Mostly-static data such as aliases, transport_maps,
+access tables
The sections that follow present three migration strategies
+with different levels of assistance by tooling that was developed
+for Postfix 3.11 and later.
On systems that have removed Berkeley DB support, run "make
+makefiles" with a CCARGS value that (also) contains "-DNO_DB",
+and specify appropriate values for default_database_type (lmdb or cdb)
+and default_cache_db_type (lmdb).
+
+
In the examples below, the "..." are place holders any
+dependencies that you build Postfix with, such as CDB, LDAP, LMDB,
+MySQL/MariaDB, OpenSSL, SASL, and so on.
+
+
The goal of the migration is clear: stop using hash: and btree:,
+and use lmdb: or cdb: instead. If your configuration is simple or
+if you are familiar with Postfix configuration, a few "grep"
+commands will find all the problems, and a few edits will be easy
+to make.
+
+
If, on the other hand, you are not familiar with the details of your
+Postfix configuration, then this document provides options where Postfix
+can help.
+
+
Postfix 3.11 introduces multiple levels of migration support.
+You can use the command "postfix non-bdb status" to view
+the migration support level. This is what the default should look
+like (terminal input is bold, output is normal
+font):
You start up Postfix, watch the logging when Postfix
+programs fail to open a hash: or btree: table, edit Postfix
+configuration files to use lmdb: or cdb:, then run postmap(1) or
+postalias(1) commands to create lmdb: or cdb: indexed database
+files. Use this option if you are familiar with Postfix configuration.
+
+
+
This will not fix the integration with Mailman versions from
+before gitlab
+commit 8fa56b72 (May 2025) and other software that are broken
+when they want to use "postmap hash:/path/to/file".
+Mailman uses this to maintain a table with mailing list contact
+addresses. For that, you need to use the next-up level.
This level implicitly redirects a request to access
+hash:/path/to/file to $default_database_type:/path/to/file,
+and redirects a request to access a btree:/path/to/file to
+$default_cache_db_type:/path/to/file.
+
+
This still requires manually running postmap(1) or postalias(1)
+commands, but "fixes" the integration with Mailman versions from
+before gitlab
+commit 8fa56b72 (May 2025) and other software when they want
+to use "postmap hash:/path/to/file", and Berkeley
+DB support is not available. Such commands will implicitly create
+a new lmdb: or cdb: indexed database file, depending on the
+default_database_type value.
This level implements "enable-redirect (database
+aliasing)", and also runs the postmap(1) or postalias(1) command to create
+a new lmdb or cdb indexed database file. This uses the nbdb_reindexd(8)
+daemon.
Using these levels gives you extra time to prepare for a
+long-term configuration change that replaces hard-coded instances of hash:
+with the value of default_database_type, and that replaces btree: with
+the value of default_cache_db_type.
+
+
Depending on your use of other software that wants to use
+postmap(1) or postalias(1) commands, you may have to permanently
+the leave the enable-redirect level
+active.
+
+
+
+
After this overview, the sections that follow will go into more
+detail.
This will edit main.cf to remove a non_bdb_migration_level setting
+and the level revert to its implicit default (disable), and will edit
+master.cf to remove an entry for the reindex service.
+
+
This setting will cause problems with Mailman versions from
+before gitlab
+commit 8fa56b72 (May 2025) and other software that wants to use
+"postmap hash:/path/to/file" (or similar postalias
+commands), and Berkeley DB support is no longer available. In that
+case, you will need the "enable-redirect" migration support
+level.
+
+
Look for hash: and btree: references in Postfix
+configuration files. Instead of /etc/postfix use the pathname
+in the output from "postconf -x config_directory".
+
+
+# grep -E -r '(hash|btree):/' /etc/postfix
+
+
+
For each instance in the "grep" output :
+
+
+
+
Edit the configuration file and replace "hash" with "lmdb"
+or "cdb" (use the same value as the output from "postconf
+-hx default_database_type") and replace "btree" with "lmdb".
+
+
+
If this instance has no source file (only the ".db" file
+exists), proceed with the next instance of "grep" output.
+
+
+
If this instance appears in the output from "postconf
+-hPPx '*/*/alias_maps' | sort -u", run the postalias(1)
+command. If this instance is like "lmdb:/path/to/source":
+
Instead of "lmdb:" use "cdb:" if this instance is like
+"cdb:/path/to/source".
+
+
+
+
Start Postfix, watch the log for warnings about files that
+cannot be opened, find the configuration file that still uses "hash"
+or "btree", and repeat the steps above.
This migration support level will not automatically create
+non-Berkeley-DB indexed database files. Instead, Postfix programs
+will log an error as they fail to open an indexed database file,
+and will leave it to the system administrator to run postmap(1) or
+postalias(1) to create that file.
+
+
For each instance of "hash:/path/to/source" or
+"btree:/path/to/source" that requires manually running
+postmap(1) or postalias(1):
+
+
+
+
If this instance appears in the output from "postconf
+-hPPx '*/*/alias_maps' | sort -u", run the postalias(1)
+command. If this instance is like "lmdb:/path/to/source":
+
Instead of "lmdb:" use "cdb:" if this instance is like
+"cdb:/path/to/source".
+
+
+
+
This migration support level will fix problems with Mailman
+versions from before May 2025 and other software that wants to use
+"postmap hash:/path/to/file". With database
+redirection, such commands will implicitly create an indexed file
+for $default_database_type:/path/to/file (similar aliasing
+happens for postalias commands).
NOTE: this level should be used only temporarily to generate
+most of the non-Berkeley-DB indexed files that Postfix needs.
+Leaving this enabled may expose the system to privilege-escalation
+attacks. There are no security concerns for using enable-redirect.
+
This postfix non-bdb command edits main.cf to set the non-Berkeley-DB
+migration support level, and master.cf to add or replace an
+nbdb-reindex service entry.
+
+
The resulting configuration implements not only the functionality
+of enable-redirect, but also
+automatically creates a non-Berkeley-DB indexed database file when
+a daemon program wants to access a file that does not exist. This
+uses the nbdb_reindexd(8) daemon to run postmap(1) or postalias(1)
+commands for databases that satisfy basic requirements to block
+privilege-escalation attacks. The number of requirements is large,
+but mainly, database files and their parent directory must not allow
+write access for group or other users, and their pathnames must
+match a list of trusted directory prefixes. The complete list of
+requirements is documented in nbdb_reindexd(8).
Once there are no more errors from Postfix programs for about
+24 hours, turn off automatic index generation by reducing the support
+level to enable-redirect with:
+could not execute command 'postmap lmdb:/path/to/file': table
+/path/to/file has an unexpected pathname;
+
+to allow automatic indexing as root, append its parent directory
+to the non_bdb_migration_allow_root_prefixes setting (current setting
+is: "/etc /usr/local/etc");
+
+alternatively, execute the failed command by hand
+
+
+
+
You have two options:
+
+
+
+
If you think that the suggested change is safe, update the
+setting as proposed and execute "postfix reload".
+
+
Alternatively, you can execute the failed postmap(1) or
+postalias(1) command by hand, and Postfix will not log the same error
+again.
+
+
+
+
A similar request may be logged when a file needs to be indexed as
+a non-root user.
+
+
Unexpected file or directory owner or permissions
+
+
Other errors may be logged when a database file or directory
+has an unexpected owner, or when it is writable by group or by other
+users.
+
+
Example with line breaks added for readability:
+
+
+
+could not execute command 'postmap lmdb:/path/to/file': legacy
+indexed file '/path/to/file.db' is owned by uid '0', but parent
+directory '/path/to' is owned or writable by other user;
+
+to allow automatic indexing, correct the ownership or permissions;
+
+alternatively, execute the failed command by hand
+
+
+
+
Again, you have two options:
+
+
+
+
Fix the ownership or permission error.
+
+
Execute the failed postmap(1) or postalias(1) command by
+hand, and Postfix will not log the same error again.
+
+
+
+
Once there are no more errors from Postfix programs for about
+24 hours, turn off automatic index generation by reducing the
+support level to enable-redirect with:
This section has instructions to migrate an existing Mailman
+configuration that wants to use commands like "postmap
+hash:/path/to/file". Mailman uses such commands to maintain
+tables with mailing list contact addresses and domain names. This
+will break on systems that no longer have Berkeley DB support.
+
+
Solutions:
+
+
+
+
(Not recommended) Upgrade to a Mailman version that contains
+gitlab commit 8fa56b72 (May 2025). Unfortunately,
+this has not yet been widely adopted by OS distributions.
+
+
Avoid Mailman changes, and use Postfix migration support
+described below. In a nutshell, the postmap command will execute
+the command "postmap hash:/path/to/file" as if the command
+specifies lmdb:/path/to/file (or cdb:, depending on Postfix
+configuration).
+
+
+
+
With Mailman3 the integration with Postfix using LMTP may look
+like:
+
+
+
+/var/lib/mailman3/data/postfix_domains (domain names)
+/var/lib/mailman3/data/postfix_domains.db (Berkeley DB hash file)
+/var/lib/mailman3/data/postfix_lmtp (transport map)
+/var/lib/mailman3/data/postfix_lmtp.db (Berkeley DB hash file)
+
+
+
+
Caution: the data directory may contain other files
+with names ending in ".db" that are not part of the
+Mailman-Postfix integration. Do not tamper with the other files.
+
This will fix the problem that Mailman wants to use commands like
+"postmap hash:/path/to/postfix_domains" and "postmap
+hash:/path/to/postfix_lmtp".
+
+
Instead of complaining about an unsupported database type, these
+postmap commands will implicitly create ".lmdb" indexed
+files like (lmdb:/path/to/postfix_domains or
+lmdb:/path/to/postfix_lmtp, or their cdb: versions depending
+on the Postfix default_database_type setting).
+
+
This will not fix the problem that Postfix wants to
+use databases like hash:/path/to/postfix_domains
+and hash::/path/to/postfix_lmtp. With enable-redirect, these will redirect to
+".lmdb" indexed files (good) but those files do not yet exist
+(bad). You will need to create them by hand with commands like:
After this, no further human action will be needed. When Mailman
+needs to update these files, it will invoke postmap commands that
+will work as promised above. Leave the Postfix migration level at enable-reindex until you can upgrade to a
+newer Mailman version that supports Postfix with non-Berkeley
+databases.
In addition to "enable-redirect",
+Postfix will also try to run commands like "postmap
+lmdb:/path/to/postfix_domains" and "postmap
+lmdb:/path/to/postfix_lmtp". There will be some delay
+depending on the amount of mailing list traffic; you may want to post
+a test message to make the postmap commands happen sooner.
Note: once these "postmap" commands have completed,
+you should reduce the migration support level with the command
+"postfix non-bdb enable-redirect". For security reasons the enable-reindex level should not be permanently
+enabled.
+
+
+
+
+
+
diff --git a/postfix/html/SASL_README.html b/postfix/html/SASL_README.html
index c47672a50..30dd58f11 100644
--- a/postfix/html/SASL_README.html
+++ b/postfix/html/SASL_README.html
@@ -1377,7 +1377,8 @@ use a particular envelope sender address:
Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+
Execute the command "postmap
+/etc/postfix/controlled_envelope_senders" after you change the
+controlled_envelope_senders file, to (re)build a default-type indexed
+file. Execute "postmap
+type:/etc/postfix/controlled_envelope_senders" to specify
+an explicit type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+
Execute the command "postmap /etc/postfix/sasl_access"
+after you change the sasl_access file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/sasl_access"
+to specify an explicit type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
Use the postmap command whenever you
-change the /etc/postfix/sasl_passwd file.
+
Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+
Execute the command "postmap /etc/postfix/sasl_passwd"
+after changing the sasl_passwd file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/sasl_passwd"
+to specify an explicit type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
If you specify the "[" and "]"
in the relayhost destination, then you must use the
@@ -1785,9 +1818,10 @@ resort.
Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
If you are creative, then you can try to combine the two
tables into one single MySQL database, and configure different
Postfix queries to extract the appropriate information.
-
Specify dbm instead of hash if your system uses
-dbm files instead of db files. To find out what lookup
-tables Postfix supports, use the command "postconf -m".
-
Execute the command "postmap /etc/postfix/sasl_passwd"
-whenever you change the sasl_passwd table.
+after you change the sasl_passwd file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/sasl_passwd"
+to specify an explicit type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
Execute the command "postmap /etc/postfix/sender_relay"
-whenever you change the sender_relay table.
+after you change the sender_relay file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/sender_relay"
+to specify an explicit type.
diff --git a/postfix/html/SOHO_README.html b/postfix/html/SOHO_README.html
index 02d099580..a9fd89f86 100644
--- a/postfix/html/SOHO_README.html
+++ b/postfix/html/SOHO_README.html
@@ -123,7 +123,7 @@ discussed in the first half of this document.
Specify dbm instead of hash if your system uses
-dbm files instead of db files. To find out what lookup
-tables Postfix supports, use the command "postconf -m".
+
Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
Execute the command "postmap /etc/postfix/generic"
-whenever you change the generic table.
+whenever you change the generic file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/generic"
+to specify an explicit type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
Solution 2: Postfix version 2.1 and earlier
@@ -174,9 +178,9 @@ discussed in the first half of this document.
2 myhostname = hostname.localdomain
3 mydomain = localdomain
4
- 5 canonical_maps = hash:/etc/postfix/canonical
+ 5 canonical_maps = lmdb:/etc/postfix/canonical
6
- 7 virtual_alias_maps = hash:/etc/postfix/virtual
+ 7 virtual_alias_maps = lmdb:/etc/postfix/virtual
8
9 /etc/postfix/canonical:
10 your-login-name your-account@your-isp.com
@@ -205,15 +209,21 @@ but is convenient.
-
Specify dbm instead of hash if your system uses
-dbm files instead of db files. To find out what lookup
-tables Postfix supports, use the command "postconf -m".
+
Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
Execute the command "postmap /etc/postfix/canonical"
-whenever you change the canonical table.
+whenever you change the canonical file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/canonical"
+to specify an explicit type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
Execute the command "postmap /etc/postfix/virtual"
-whenever you change the virtual table.
+whenever you change the virtual file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/virtual"
+to specify an explicit type.
@@ -254,7 +264,7 @@ second part sets up the username/password information.
relayhost = [mail.isp.example]
# Alternative form:
# relayhost = [mail.isp.example]:submission
- smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
+ smtp_sasl_password_maps = lmdb:/etc/postfix/sasl_passwd
@@ -328,8 +338,16 @@ and before entering an optional chroot jail.
-
Use the postmap command whenever you
-change the /etc/postfix/sasl_passwd file.
+
Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+
Execute the command "postmap /etc/postfix/sasl_passwd"
+after changing the sasl_passwd file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/sasl_passwd"
+to specify an explicit type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
If you specify the "[" and "]"
in the relayhost destination, then you must use the
@@ -364,9 +382,10 @@ resort.
Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
If you are creative, then you can try to combine the two
tables into one single MySQL database, and configure different
Postfix queries to extract the appropriate information.
-
Specify dbm instead of hash if your system uses
-dbm files instead of db files. To find out what lookup
-tables Postfix supports, use the command "postconf -m".
-
Execute the command "postmap /etc/postfix/sasl_passwd"
-whenever you change the sasl_passwd table.
+after you change the sasl_passwd file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/sasl_passwd"
+to specify an explicit type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
Execute the command "postmap /etc/postfix/sender_relay"
-whenever you change the sender_relay table.
+after you change the sender_relay file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/sender_relay"
+to specify an explicit type.
diff --git a/postfix/html/STANDARD_CONFIGURATION_README.html b/postfix/html/STANDARD_CONFIGURATION_README.html
index 59f996ab4..811a43cd0 100644
--- a/postfix/html/STANDARD_CONFIGURATION_README.html
+++ b/postfix/html/STANDARD_CONFIGURATION_README.html
@@ -326,7 +326,7 @@ All the mail to these two accounts is forwarded to an inside address.
Specify dbm instead of hash if your system uses
-dbm files instead of db files. To find out what lookup
-tables Postfix supports, use the command "postconf -m".
+
Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+
Execute the command "postmap /etc/postfix/virtual"
+whenever you change the virtual file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/virtual"
+to specify an explicit type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
Execute the command "postmap /etc/postfix/relay_recipients"
-whenever you change the relay_recipients table.
+whenever you change the relay_recipients file, to (re)build a
+default-type indexed file. Execute "postmap
+type:/etc/postfix/relay_recipients" to specify an explicit
+type.
Execute the command "postmap /etc/postfix/transport"
-whenever you change the transport table.
+whenever you change the transport file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/transport"
+to specify an explicit type.
In some installations, there may be separate instances of Postfix
processing inbound and outbound mail on a multi-homed firewall. The
@@ -447,7 +459,7 @@ follows:
Execute the command "postmap /etc/postfix/virtual" after
-editing the file.
+editing the virtual file, to (re)build a default-type indexed file.
+Execute "postmap type:/etc/postfix/virtual" to specify
+an explicit type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
@@ -489,7 +509,7 @@ discussed in the first half of this document.
1 /etc/postfix/main.cf:
- 2 transport_maps = hash:/etc/postfix/transport
+ 2 transport_maps = lmdb:/etc/postfix/transport
3 relayhost =
4 # Optional for a machine that isn't "always on"
5 #fallback_relay = [gateway.example.com]
@@ -522,12 +542,17 @@ directly, and gives undeliverable mail to a gateway.
-
Specify dbm instead of hash if your system uses
-dbm files instead of db files. To find out what lookup
-tables Postfix supports, use the command "postconf -m".
+
Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+
Execute the command "postmap /etc/postfix/transport"
+whenever you edit the transport file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/transport"
+to specify an explicit type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
-
Execute the command "postmap /etc/postfix/transport" whenever
-you edit the transport table.
@@ -561,7 +586,7 @@ is all you need:
11 # You must specify your NAT/proxy external address.
12 #proxy_interfaces = 1.2.3.4
13
-14 relay_recipient_maps = hash:/etc/postfix/relay_recipients
+14 relay_recipient_maps = lmdb:/etc/postfix/relay_recipients
15
16 /etc/postfix/relay_recipients:
17 user1@the.backed-up.domain.tld x
@@ -576,7 +601,7 @@ need the above, plus:
Specify dbm instead of hash if your system uses
-dbm files instead of db files. To find out what lookup
-tables Postfix supports, use the command "postconf -m".
+
Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
+
+
Execute the command "postmap /etc/postfix/relay_recipients"
+whenever you change the relay_recipients file, to (re)build a
+default-type indexed file. Execute "postmap
+type:/etc/postfix/relay_recipients" to specify an explicit
+type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
Execute the command "postmap /etc/postfix/transport"
-whenever you change the transport table.
+whenever you change the transport file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/transport"
+to specify an explicit type.
NOTE for Postfix < 2.2: Do not use the fallback_relay feature
when relaying mail
@@ -760,7 +795,7 @@ discussed in the first half of this document.
Specify dbm instead of hash if your system uses
-dbm files instead of db files. To find out what lookup
-tables Postfix supports, use the command "postconf -m".
+
Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
Execute the command "postmap /etc/postfix/generic"
-whenever you change the generic table.
+whenever you change the generic file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/generic"
+to specify an explicit type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
Solution 2: Postfix version 2.1 and earlier
@@ -811,9 +850,9 @@ discussed in the first half of this document.
2 myhostname = hostname.localdomain
3 mydomain = localdomain
4
- 5 canonical_maps = hash:/etc/postfix/canonical
+ 5 canonical_maps = lmdb:/etc/postfix/canonical
6
- 7 virtual_alias_maps = hash:/etc/postfix/virtual
+ 7 virtual_alias_maps = lmdb:/etc/postfix/virtual
8
9 /etc/postfix/canonical:
10 your-login-name your-account@your-isp.com
@@ -842,15 +881,21 @@ but is convenient.
-
Specify dbm instead of hash if your system uses
-dbm files instead of db files. To find out what lookup
-tables Postfix supports, use the command "postconf -m".
+
Instead of lmdb:, some systems use cdb:, hash:, or dbm:.
Execute the command "postmap /etc/postfix/canonical"
-whenever you change the canonical table.
+whenever you change the canonical file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/canonical"
+to specify an explicit type.
+
+
The default indexed file type is configured with the
+default_database_type parameter. To list available explicit types,
+execute the command "postconf -m".
Execute the command "postmap /etc/postfix/virtual"
-whenever you change the virtual table.
+whenever you change the virtual file, to (re)build a default-type
+indexed file. Execute "postmap type:/etc/postfix/virtual"
+to specify an explicit type.