##################################################
# The Exim mail transport agent #
##################################################
-# Copyright (c) The Exim Maintainers 2022 - 2023
+# Copyright (c) The Exim Maintainers 2022 - 2024
# SPDX-License-Identifier: GPL-2.0-or-later
# This is the template for Exim's main build-time configuration file. It
# compile the Exim monitor utility. Exim itself does not use X11.
# Another area of variability between systems is the type and location of the
-# DBM library package. Exim has support for ndbm, gdbm, tdb, and Berkeley DB.
+# DBM library package. Exim has support for ndbm, gdbm, tdb, Berkeley DB and
+# sqlite3.
# By default the code assumes ndbm; this often works with gdbm or DB, provided
# they are correctly installed, via their compatibility interfaces. However,
# Exim can also be configured to use the native calls for Berkeley DB (obsolete
# It has also to be configured in the run time configuration file. By
# commenting out those you know you don't want to use, you can make the binary
# a bit smaller. If you are unsure, leave all of these included for now.
+#
+# If set to "2" instead of "yes" then the corresponding driver will be
+# built as a module and must be installed into LOOKUP_MODULE_DIR (the name
+# is historic).
+# You need to add -export-dynamic -rdynamic to EXTRALIBS. You may also need to
+# add -ldl to EXTRALIBS so that dlopen() is available to Exim. You need to
+# define CFLAGS_DYNAIC and LOOKUP_MODULE_DIR below so the builds are done right,
+# and so the exim binary actually loads dynamic lookup modules.
+# MANUALROUTE cannot currently be built as a module.
ROUTER_ACCEPT=yes
ROUTER_DNSLOOKUP=yes
# file. By commenting out those you know you don't want to use, you can make
# the binary a bit smaller. If you are unsure, leave all of these included for
# now.
+#
+# If set to "2" instead of "yes" then the corresponding driver will be
+# built as a module and must be installed into LOOKUP_MODULE_DIR (the name
+# is historic).
+# You need to add -export-dynamic -rdynamic to EXTRALIBS. You may also need to
+# add -ldl to EXTRALIBS so that dlopen() is available to Exim. You need to
+# define CFLAGS_DYNAIC and LOOKUP_MODULE_DIR below so the builds are done right,
+# and so the exim binary actually loads dynamic lookup modules.
+# The smtp transport cannot be built as a module.
TRANSPORT_APPENDFILE=yes
TRANSPORT_AUTOREPLY=yes
# (where * is the name as given here in this list). That ensures that only
# the dynamic library and not the exim binary will be linked against the
# library.
+#
# NOTE: LDAP cannot be built as a module!
+# JSON cannot (yet).
+# Also, PASSWD, DBM and DNSDB can but there is little point since the accesses
+# are always needed by the Exim core.
#
# For Redis you need to have hiredis installed on your system
# (https://github.com/redis/hiredis).
# If your system has pkg-config then the _INCLUDE/_LIBS setting can be
# handled for you automatically by also defining the _PC variable to reference
-# the name of the pkg-config package, if such is available.
+# the name of the pkg-config package, if such is available. This should not
+# be done for module builds.
LOOKUP_DBM=yes
LOOKUP_LSEARCH=yes
# LOOKUP_NWILDLSEARCH=yes
-# Some platforms may need this for LOOKUP_NIS:
-# LIBS += -lnsl
#------------------------------------------------------------------------------
-# If you have set LOOKUP_LDAP=yes, you should set LDAP_LIB_TYPE to indicate
+# If you have set LOOKUP_LDAP, you should set LDAP_LIB_TYPE to indicate
# which LDAP library you have. Unfortunately, though most of their functions
# are the same, there are minor differences. Currently Exim knows about four
# LDAP libraries: the one from the University of Michigan (also known as
# is for Redis, -ljansson for JSON.
#
# You do not need to use this for any lookup information added via pkg-config.
+#
+# Libraries being built as modules should be added to respective
+# LOOKUP_*_INCLUDE and LOOKUP_*_LIBS rather than the the ones for the
+# core exim build. This gets them linked with the module instead
+#
+# LSEARCH, DSEARCH & CDB have no external library needs.
+# DNSDB needs the resolver library which the core uses anyway.
# LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include
# LOOKUP_INCLUDE +=-I /usr/local/include
# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds -lsqlite3 -llmdb
+# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber
+# Some platforms may need this for LOOKUP_NIS:
+#LOOKUP_LIBS += -lnsl
+#LOOKUP_LIBS += -ljansson
+#LOOKUP_LIBS += -lhiredis
+
#------------------------------------------------------------------------------
# If you included LOOKUP_LMDB above you will need the library. Depending
# on where installed you may also need an include directory
# USE_DB = yes
# DBMLIB = -ldb
+# sqlite
+# USE_SQLITE = yes
+# DBMLIB = -lsqlite3
+
#------------------------------------------------------------------------------
# Although Exim is normally a setuid program, owned by root, it refuses to run
# you must uncomment at least one of the following, so that appropriate code is
# included in the Exim binary. You will then need to set up the run time
# configuration to make use of the mechanism(s) selected.
+#
+# If set to "2" instead of "yes" then the corresponding driver will be
+# built as a module and must be installed into LOOKUP_MODULE_DIR (the name
+# is historic).
+# You need to add -export-dynamic -rdynamic to EXTRALIBS. You may also need to
+# add -ldl to EXTRALIBS so that dlopen() is available to Exim. You need to
+# define CFLAGS_DYNAIC and LOOKUP_MODULE_DIR below so the builds are done right,
+# and so the exim binary actually loads dynamic lookup modules.
+#
+# Libraries being built as modules should be added to respective
+# LOOKUP_*_INCLUDE and LOOKUP_*_LIBS rather than the the ones for the
+# core exim build. This gets them linked with the module instead
+# Only the cram_md5, cyrus_sasl, dovecot, external and tls builds for modules
+# are known to work. The heimdal does build, but we have no test coverage.
# AUTH_CRAM_MD5=yes
# AUTH_CYRUS_SASL=yes