Cleanup: port for ancient Solaris9 revealed some non-portability.
Files: master/Makefile.in, makedefs, sys_defs.h.
+
+20140524
+
+ Cleanup: specify database library dependencies with variables
+ named AUXLIBS_CDB, AUXLIBS_LDAP, etc. The global AUXLIBS
+ variable is still supported, but the new variables are
+ required when building dynamically-loadable building database
+ plugins. Files: RELEASE_NOTES, INSTALL.html, CDB_README.html,
+ LDAP_README.html, LMDB_README.html, MYSQL_README.html,
+ PCRE_README.html, PGSQL_README.html, SQLITE_README.html,
+ makedefs, util/Makefile.in, global/Makefile.in.
+
+ Workaround: reportedly, MacOS can fail to move a symlink
+ with a relative target across file system boundaries, because
+ it examines the symlink with stat() instead of lstat().
+ Files: makedefs, Makefile.in.
+
+ Cleanup: use readlink to verify symlink target. File:
+ postfix-install.
version is the same as for Postfix shared libraries. The installed
dynamicmaps.cf configuration file is given a suffix with the same version.
+NOTE: Postfix 2.12 expects that you specify database library dependencies with
+variables named AUXLIBS_CDB, AUXLIBS_LDAP, etc. The old AUXLIBS variable is
+still supported, but the new variables are required when building database
+plugins.
+
To override the default location or shared-library version, specify, for
example:
_____________________________________________________________________________
|Name/Value |Description |
|______________________________|______________________________________________|
-|AUXLIBS="object_library..." |Specifies one or more non-default object |
-| |libraries. |
+| |Specifies one or more non-default object |
+| |libraries. Postfix 2,12 and later specify some|
+| |of their database library dependencies with |
+|AUXLIBS="object_library..." |AUXLIBS_CDB, AUXLIBS_LDAP, AUXLIBS_LMDB, |
+| |AUXLIBS_MYSQL, AUXLIBS_PCRE, AUXLIBS_PGSQL, |
+| |AUXLIBS_SDBM, and AUXLIBS_SQLITE, |
+| |respectively. |
|______________________________|______________________________________________|
|CC=compiler_command |Specifies a non-default compiler. On many |
| |systems, the default is gcc. |
libexec/postfix-files: conf/postfix-files conf/makedefs.out Makefile
rm -f $@
- if [ "${SHLIB_DIR}" = "no" -o "${SHLIB_DIR}" = "" ]; then \
+ (if [ "${SHLIB_DIR}" = "no" -o "${SHLIB_DIR}" = "" ]; then \
sed -e '/^\$$shlib_directory/d' \
- -e '/^\$$plugin_directory/d' conf/postfix-files >$@; \
+ -e '/^\$$plugin_directory/d' conf/postfix-files; \
elif [ "${PLUGIN_DIR}" = "no" -o "${PLUGIN_DIR}" = "" ]; then \
- sed -e '/^\$$plugin_directory/d' conf/postfix-files | $(EXPAND) >$@; \
+ sed -e '/^\$$plugin_directory/d' conf/postfix-files | $(EXPAND); \
else \
- $(EXPAND) conf/postfix-files >$@; \
- fi
+ $(EXPAND) conf/postfix-files; \
+ fi) | case "$(MAKE_FIX)" in \
+ *cant-move-relative-symlink*) sed 's/:l:dynamic/:h:dynamic/';; \
+ *) cat;; \
+ esac > $@
libexec/postfix-script: conf/postfix-script
rm -f $@ && ln -f $? $@
rm -f README_FILES/RELEASE_NOTES
ln -s ../RELEASE_NOTES README_FILES
rm -f bin/[!CRS]* lib/[!CRS]* include/[!CRS]* libexec/[!CRS]* plugins/[!CRS]* \
+ src/*/libpostfix-*.so.* src/*/libpostfix-*.dylib.* \
src/*/postfix-*.so.* src/*/postfix-*.dylib.* \
junk */junk */*/junk \
*core */*core */*/*core \
% make tidy
% CDB=../../../tinycdb-0.5
% make -f Makefile.init makefiles "CCARGS=-DHAS_CDB -I$CDB" \
- "AUXLIBS=$CDB/libcdb.a"
+ "AUXLIBS_CDB=$CDB/libcdb.a"
% make
Alternatively, for the D.J.B. version of CDB:
% make tidy
% CDB=../../../cdb-0.75
% make -f Makefile.init makefiles "CCARGS=-DHAS_CDB -I$CDB" \
- "AUXLIBS=$CDB/cdb.a $CDB/alloc.a $CDB/buffer.a $CDB/unix.a $CDB/byte.a"
+ "AUXLIBS_CDB=$CDB/cdb.a $CDB/alloc.a $CDB/buffer.a $CDB/unix.a $CDB/
+ byte.a"
% make
+Postfix versions before 2.12 should use AUXLIBS instead of AUXLIBS_CDB. Postfix
+2.12 and later still support the old global AUXLIBS variable, but AUXLIBS_CDB
+is required when building dynamically-loadable database plugins.
+
After Postfix has been built with cdb support, you can use "cdb" tables
wherever you can use read-only "hash", "btree" or "dbm" tables. However, the
"p\bpo\bos\bst\btm\bma\bap\bp -\b-i\bi" (incremental record insertion) and "p\bpo\bos\bst\btm\bma\bap\bp -\b-d\bd" (incremental
version is the same as for Postfix shared libraries. The installed
dynamicmaps.cf configuration file is given a suffix with the same version.
+NOTE: Postfix 2.12 expects that you specify database library dependencies with
+variables named AUXLIBS_CDB, AUXLIBS_LDAP, etc. The old AUXLIBS variable is
+still supported, but the new variables are required when building database
+plugins.
+
To override the default location or shared-library version, specify, for
example:
_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b
|N\bNa\bam\bme\be/\b/V\bVa\bal\blu\bue\be |D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn |
|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
-|AUXLIBS="object_library..." |Specifies one or more non-default object |
-| |libraries. |
+| |Specifies one or more non-default object |
+| |libraries. Postfix 2,12 and later specify some|
+| |of their database library dependencies with |
+|AUXLIBS="object_library..." |AUXLIBS_CDB, AUXLIBS_LDAP, AUXLIBS_LMDB, |
+| |AUXLIBS_MYSQL, AUXLIBS_PCRE, AUXLIBS_PGSQL, |
+| |AUXLIBS_SDBM, and AUXLIBS_SQLITE, |
+| |respectively. |
|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b|_\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b _\b |
|CC=compiler_command |Specifies a non-default compiler. On many |
| |systems, the default is gcc. |
B\bBu\bui\bil\bld\bdi\bin\bng\bg P\bPo\bos\bst\btf\bfi\bix\bx w\bwi\bit\bth\bh L\bLD\bDA\bAP\bP s\bsu\bup\bpp\bpo\bor\brt\bt
-[Note: instructions to build as a dynamicmaps.cf-style plugin will be added
-later.]
-
These instructions assume that you build Postfix from source code as described
in the INSTALL document. Some modification may be required if you build Postfix
from a vendor-specific source package.
% make tidy
% make makefiles CCARGS="-I/usr/local/include -DHAS_LDAP" \
- AUXLIBS="-L/usr/local/lib -lldap -L/usr/local/lib -llber"
+ AUXLIBS_LDAP="-L/usr/local/lib -lldap -L/usr/local/lib -llber"
+
+Postfix versions before 2.12 should use AUXLIBS instead of AUXLIBS_LDAP.
+Postfix 2.12 and later still support the old global AUXLIBS variable, but
+AUXLIBS_LDAP is required when building dynamically-loadable database plugins.
On Solaris 2.x you may have to specify run-time link information, otherwise
ld.so will not find some of the shared libraries:
% make tidy
% make makefiles CCARGS="-I/usr/local/include -DHAS_LDAP" \
- AUXLIBS="-L/usr/local/lib -R/usr/local/lib -lldap \
+ AUXLIBS_LDAP="-L/usr/local/lib -R/usr/local/lib -lldap \
-L/usr/local/lib -R/usr/local/lib -llber"
The 'make tidy' command is needed only if you have previously built Postfix
B\bBu\bui\bil\bld\bdi\bin\bng\bg P\bPo\bos\bst\btf\bfi\bix\bx w\bwi\bit\bth\bh L\bLM\bMD\bDB\bB s\bsu\bup\bpp\bpo\bor\brt\bt
-[Note: instructions to build as a dynamicmaps.cf-style plugin will be added
-later.]
-
Postfix normally does not enable LMDB support. To build Postfix with LMDB
support, use something like:
% make makefiles CCARGS="-DHAS_LMDB -I/usr/local/include" \
- AUXLIBS="-L/usr/local/lib -llmdb"
+ AUXLIBS_LMDB="-L/usr/local/lib -llmdb"
% make
+Postfix versions before 2.12 should use AUXLIBS instead of AUXLIBS_LMDB.
+Postfix 2.12 and later still support the old global AUXLIBS variable, but
+AUXLIBS_LMDB is required when building dynamically-loadable database plugins.
+
Solaris may need this:
% make makefiles CCARGS="-DHAS_LMDB -I/usr/local/include" \
- AUXLIBS="-R/usr/local/lib -L/usr/local/lib -llmdb"
+ AUXLIBS_LMDB="-R/usr/local/lib -L/usr/local/lib -llmdb"
% make
The exact pathnames depend on how LMDB was installed.
Add the "-lpthread" library to the "make makefiles" command.
- % make makefiles .... AUXLIBS="... -lpthread"
+ % make makefiles .... AUXLIBS_LMDB="... -lpthread"
C\bCo\bon\bnf\bfi\big\bgu\bur\bri\bin\bng\bg L\bLM\bMD\bDB\bB s\bse\bet\btt\bti\bin\bng\bgs\bs
B\bBu\bui\bil\bld\bdi\bin\bng\bg P\bPo\bos\bst\btf\bfi\bix\bx w\bwi\bit\bth\bh M\bMy\byS\bSQ\bQL\bL s\bsu\bup\bpp\bpo\bor\brt\bt
-[Note: instructions to build as a dynamicmaps.cf-style plugin will be added
-later.]
-
These instructions assume that you build Postfix from source code as described
in the INSTALL document. Some modification may be required if you build Postfix
from a vendor-specific source package.
In order to build Postfix with mysql map support, you will need to add -
DHAS_MYSQL and -I for the directory containing the mysql headers, and the
-mysqlclient library (and libm) to AUXLIBS, for example:
+mysqlclient library (and libm) to AUXLIBS_MYSQL, for example:
make -f Makefile.init makefiles \
'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include' \
- 'AUXLIBS=-L/usr/local/mysql/lib -lmysqlclient -lz -lm'
+ 'AUXLIBS_MYSQL=-L/usr/local/mysql/lib -lmysqlclient -lz -lm'
+
+Postfix versions before 2.12 should use AUXLIBS instead of AUXLIBS_MYSQL.
+Postfix 2.12 and later still support the old global AUXLIBS variable, but
+AUXLIBS_MYSQL is required when building dynamically-loadable database plugins.
On Solaris, use this instead:
make -f Makefile.init makefiles \
'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include' \
- 'AUXLIBS=-L/usr/local/mysql/lib -R/usr/local/mysql/lib \
+ 'AUXLIBS_MYSQL=-L/usr/local/mysql/lib -R/usr/local/mysql/lib \
-lmysqlclient -lz -lm'
Then, just run 'make'. This requires libz, the compression library. Older mysql
B\bBu\bui\bil\bld\bdi\bin\bng\bg P\bPo\bos\bst\btf\bfi\bix\bx w\bwi\bit\bth\bh P\bPC\bCR\bRE\bE s\bsu\bup\bpp\bpo\bor\brt\bt
-[Note: instructions to build as a dynamicmaps.cf-style plugin will be added
-later.]
-
These instructions assume that you build Postfix from source code as described
in the INSTALL document. Some modification may be required if you build Postfix
from a vendor-specific source package.
In order to build Postfix with PCRE support you need to add -DHAS_PCRE and a -
I for the PCRE include file to CCARGS, and add the path to the PCRE library to
-AUXLIBS, for example:
+AUXLIBS_PCRE, for example:
make -f Makefile.init makefiles \
"CCARGS=-DHAS_PCRE -I/usr/local/include" \
- "AUXLIBS=-L/usr/local/lib -lpcre"
+ "AUXLIBS_PCRE=-L/usr/local/lib -lpcre"
+
+Postfix versions before 2.12 should use AUXLIBS instead of AUXLIBS_PCRE.
+Postfix 2.12 and later still support the old global AUXLIBS variable, but
+AUXLIBS_PCRE is required when building dynamically-loadable database plugins.
Solaris needs run-time path information too:
make -f Makefile.init makefiles \
"CCARGS=-DHAS_PCRE -I/usr/local/include" \
- "AUXLIBS=-L/usr/local/lib -R/usr/local/lib -lpcre"
+ "AUXLIBS_PCRE=-L/usr/local/lib -R/usr/local/lib -lpcre"
T\bTh\bhi\bin\bng\bgs\bs t\bto\bo k\bkn\bno\bow\bw
B\bBu\bui\bil\bld\bdi\bin\bng\bg P\bPo\bos\bst\btf\bfi\bix\bx w\bwi\bit\bth\bh P\bPo\bos\bst\btg\bgr\bre\beS\bSQ\bQL\bL s\bsu\bup\bpp\bpo\bor\brt\bt
-[Note: instructions to build as a dynamicmaps.cf-style plugin will be added
-later.]
-
These instructions assume that you build Postfix from source code as described
in the INSTALL document. Some modification may be required if you build Postfix
from a vendor-specific source package.
% make tidy
% make -f Makefile.init makefiles \
'CCARGS=-DHAS_PGSQL -I/usr/local/include/pgsql' \
- 'AUXLIBS=-L/usr/local/lib -lpq'
+ 'AUXLIBS_PGSQL=-L/usr/local/lib -lpq'
+
+Postfix versions before 2.12 should use AUXLIBS instead of AUXLIBS_PGSQL.
+Postfix 2.12 and later still support the old global AUXLIBS variable, but
+AUXLIBS_PGSQL is required when building dynamically-loadable database plugins.
Then just run 'make'.
B\bBu\bui\bil\bld\bdi\bin\bng\bg P\bPo\bos\bst\btf\bfi\bix\bx w\bwi\bit\bth\bh S\bSQ\bQL\bLi\bit\bte\be s\bsu\bup\bpp\bpo\bor\brt\bt
-[Note: instructions to build as a dynamicmaps.cf-style plugin will be added
-later.]
-
The Postfix SQLite client utilizes the sqlite3 library, which can be obtained
from:
make -f Makefile.init makefiles \
'CCARGS=-DHAS_SQLITE -I/usr/local/include' \
- 'AUXLIBS=-L/usr/local/lib -lsqlite3 -lpthread'
+ 'AUXLIBS_SQLITE=-L/usr/local/lib -lsqlite3 -lpthread'
+
+Postfix versions before 2.12 should use AUXLIBS instead of AUXLIBS_SQLITE.
+Postfix 2.12 and later still support the old global AUXLIBS variable, but
+AUXLIBS_SQLITE is required when building dynamically-loadable database plugins.
Then, just run 'make'.
If you upgrade from Postfix 2.10 or earlier, read RELEASE_NOTES-2.11
before proceeding.
-Major changes with snapshot 20140522
+Incompatible changes with snapshot 20140524
+===========================================
+
+Postfix 2.12 expects that you specify database library dependencies
+with variables named AUXLIBS_CDB, AUXLIBS_LDAP, etc. The old AUXLIBS
+variable is still supported, but the new variables are required
+when building dynamically-loadable database plugins. See CDB_README,
+LDAP_README, etc. for details.
+
+Major changes with snapshot 20140524
====================================
Support to build Postfix with Postfix shared libraries, and with
-support for database plugins. Postfix shared libraries introduce
-minor runtime overhead and result in smaller Postfix executable
-files. Postfix database plugins are useful primarily for people
-who distribute pre-compiled packages.
+dynamically-loadable database plugins. Postfix shared libraries
+introduce minor runtime overhead and result in smaller Postfix
+executable files. Dynamically-loadable database plugins are useful
+primarily for people who install pre-compiled packages.
This is based on Debian code by LaMont Jones, and based on a port
by Viktor Dukhovni. Currently, support exists for recent versions
-of Linux, FreeBSD and MacOS X.
+of Linux, FreeBSD and MacOS X, as well as ancient Solaris 9.
-Postfix shared libraries and database plugins require changes in
-the Postix build procedure (specifically, the makedefs and Makefile.in
-files). These changes are introduced early in the annual Postfix
+Postfix shared libraries and dynamically-loadable database plugins
+require changes in the Postfix build procedure (specifically, the
+makedefs and Makefile.in files, and scripts that install or update
+Postfix). These changes are introduced early in the annual Postfix
development cycle to give down-stream maintainers sufficient time
to prepare their build systems for the next stable Postfix release.
+Building with Postfix shared libraries and database plugins
+-----------------------------------------------------------
+
+Please see the INSTALL section "Building with Postfix shared libraries
+and database plugins" for fine-tuning details.
+
+To build with Postfix shared libraries (libpostfix-*.so.*), use:
+
+% make makefiles shared=yes ...other arguments...
+
+To build with dynamicmaps.cf support and dynamically-loadable
+database plugins (postfix-*.so.*), use:
+
+% make makefiles dynamicmaps=yes ...other arguments...
+
+This implicitly enables support for libpostfix-*.so.* shared
+libraries. Database plugin support is available for CDB, LDAP, LMDB,
+MySQL, PCRE, PGSQL, SDBM, and SQLITE.
+
+NOTE: Postfix 2.12 expects that you specify database library
+dependencies with variables named AUXLIBS_CDB, AUXLIBS_LDAP, etc.
+The old AUXLIBS variable is still supported, but the new variables
+are required when building dynamically-loadable database plugins.
+See CDB_README, LDAP_README, etc. for details.
+
Differences with Debian
-----------------------
-Besides changes to the Postfix "build" system as described below,
+Besides changes to the Postfix "build" system as described above,
the user-visible changes with respect to Debian are:
- The new shlib_directory parameter specifies the location of the
among all Postfix instances just like postfix-files and other
files. Files in /etc are meant to be instance-specific.
-Building with Postfix shared libraries and database plugins
------------------------------------------------------------
-
-Please see the INSTALL section "Building with Postfix shared libraries
-and database plugins".
-
-Fuurther information
+Further information
--------------------
Maintainers may also benefit from the makedefs documentation
# it is a good idea to "u" all the files that have special ownership or
# permissions, so that running "make install" fixes any glitches.
#
+# Note: order matters. Update shared libraries and database plugins
+# before daemon/command-line programs.
$config_directory:d:root:-:755:u
$data_directory:d:$mail_owner:-:700:uc
$daemon_directory:d:root:-:755:u
$queue_directory/pid:d:root:-:755:uc
$queue_directory/saved:d:$mail_owner:-:700:ucr
$queue_directory/trace:d:$mail_owner:-:700:ucr
+# Update shared libraries before daemon or command-line programs.
$shlib_directory/lib${LIB_PREFIX}util${LIB_SUFFIX}:f:root:-:755
$shlib_directory/lib${LIB_PREFIX}global${LIB_SUFFIX}:f:root:-:755
$shlib_directory/lib${LIB_PREFIX}dns${LIB_SUFFIX}:f:root:-:755
$shlib_directory/lib${LIB_PREFIX}tls${LIB_SUFFIX}:f:root:-:755
$shlib_directory/lib${LIB_PREFIX}master${LIB_SUFFIX}:f:root:-:755
+# Update database plugins before daemon or command-line programs.
$plugin_directory/${LIB_PREFIX}cdb${LIB_SUFFIX}:f:root:-:755
$plugin_directory/${LIB_PREFIX}ldap${LIB_SUFFIX}:f:root:-:755
$plugin_directory/${LIB_PREFIX}lmdb${LIB_SUFFIX}:f:root:-:755
% make tidy
% CDB=../../../tinycdb-0.5
% make -f Makefile.init makefiles "CCARGS=-DHAS_CDB -I$CDB" \
- "AUXLIBS=$CDB/libcdb.a"
+ "<a href="CDB_README.html">AUXLIBS_CDB</a>=$CDB/libcdb.a"
% make
</pre>
</blockquote>
% make tidy
% CDB=../../../cdb-0.75
% make -f Makefile.init makefiles "CCARGS=-DHAS_CDB -I$CDB" \
- "AUXLIBS=$CDB/cdb.a $CDB/alloc.a $CDB/buffer.a $CDB/unix.a $CDB/byte.a"
+ "<a href="CDB_README.html">AUXLIBS_CDB</a>=$CDB/cdb.a $CDB/alloc.a $CDB/buffer.a $CDB/unix.a $CDB/byte.a"
% make
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+<a href="CDB_README.html">AUXLIBS_CDB</a>. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but <a href="CDB_README.html">AUXLIBS_CDB</a> is required when building
+dynamically-loadable database plugins. </p>
+
<p> After Postfix has been built with cdb support, you can use
"cdb" tables wherever you can use read-only "hash", "btree" or
"dbm" tables. However, the "<b>postmap -i</b>" (incremental record
dynamicmaps.cf configuration file is given a suffix with the same
version. </p>
+<p> NOTE: Postfix 2.12 expects that you specify database library
+dependencies with variables named <a href="CDB_README.html">AUXLIBS_CDB</a>, <a href="LDAP_README.html">AUXLIBS_LDAP</a>, etc.
+The old AUXLIBS variable is still supported, but the new variables
+are required when building database plugins. </p>
+
<p> To override the default location or shared-library version,
specify, for example: </p>
<tr> <th colspan="2"> Name/Value </th> <th> Description </th> </tr>
<tr> <td colspan="2"> AUXLIBS="object_library..."</td> <td> Specifies
-one or more non-default object libraries. </td> </tr>
+one or more non-default object libraries. Postfix 2,12 and later
+specify some of their database library dependencies with <a href="CDB_README.html">AUXLIBS_CDB</a>,
+<a href="LDAP_README.html">AUXLIBS_LDAP</a>, <a href="LMDB_README.html">AUXLIBS_LMDB</a>, <a href="MYSQL_README.html">AUXLIBS_MYSQL</a>, <a href="PCRE_README.html">AUXLIBS_PCRE</a>, <a href="PGSQL_README.html">AUXLIBS_PGSQL</a>,
+<a href="SDBM_README.html">AUXLIBS_SDBM</a>, and <a href="SQLITE_README.html">AUXLIBS_SQLITE</a>, respectively. </td> </tr>
<tr> <td colspan="2"> CC=compiler_command</td> <td> Specifies a
non-default compiler. On many systems, the default is <tt>gcc</tt>.
<h2><a name="build">Building Postfix with LDAP support</a></h2>
-<p> [Note: instructions to build as a dynamicmaps.cf-style plugin
-will be added later.] </p>
-
<p> These instructions assume that you build Postfix from source
code as described in the <a href="INSTALL.html">INSTALL</a> document. Some modification may
be required if you build Postfix from a vendor-specific source
<pre>
% make tidy
% make makefiles CCARGS="-I/usr/local/include -DHAS_LDAP" \
- AUXLIBS="-L/usr/local/lib -lldap -L/usr/local/lib -llber"
+ <a href="LDAP_README.html">AUXLIBS_LDAP</a>="-L/usr/local/lib -lldap -L/usr/local/lib -llber"
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+<a href="LDAP_README.html">AUXLIBS_LDAP</a>. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but <a href="LDAP_README.html">AUXLIBS_LDAP</a> is required when building
+dynamically-loadable database plugins. </p>
+
<p> On Solaris 2.x you may have to specify run-time link information,
otherwise ld.so will not find some of the shared libraries: </p>
<pre>
% make tidy
% make makefiles CCARGS="-I/usr/local/include -DHAS_LDAP" \
- AUXLIBS="-L/usr/local/lib -R/usr/local/lib -lldap \
+ <a href="LDAP_README.html">AUXLIBS_LDAP</a>="-L/usr/local/lib -R/usr/local/lib -lldap \
-L/usr/local/lib -R/usr/local/lib -llber"
</pre>
</blockquote>
<h2><a name="with_lmdb">Building Postfix with LMDB support</a></h2>
-<p> [Note: instructions to build as a dynamicmaps.cf-style plugin
-will be added later.] </p>
-
<p> Postfix normally does not enable LMDB support. To
build Postfix with LMDB support, use something like: </p>
<blockquote>
<pre>
% make makefiles CCARGS="-DHAS_LMDB -I/usr/local/include" \
- AUXLIBS="-L/usr/local/lib -llmdb"
+ <a href="LMDB_README.html">AUXLIBS_LMDB</a>="-L/usr/local/lib -llmdb"
% make
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+<a href="LMDB_README.html">AUXLIBS_LMDB</a>. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but <a href="LMDB_README.html">AUXLIBS_LMDB</a> is required when building
+dynamically-loadable database plugins. </p>
+
<p> Solaris may need this: </p>
<blockquote>
<pre>
% make makefiles CCARGS="-DHAS_LMDB -I/usr/local/include" \
- AUXLIBS="-R/usr/local/lib -L/usr/local/lib -llmdb"
+ <a href="LMDB_README.html">AUXLIBS_LMDB</a>="-R/usr/local/lib -L/usr/local/lib -llmdb"
% make
</pre>
</blockquote>
<blockquote>
<pre>
-% make makefiles .... AUXLIBS="... -lpthread"
+% make makefiles .... <a href="LMDB_README.html">AUXLIBS_LMDB</a>="... -lpthread"
</pre>
</blockquote>
<h2>Building Postfix with MySQL support</h2>
-<p> [Note: instructions to build as a dynamicmaps.cf-style plugin
-will be added later.] </p>
-
<p> These instructions assume that you build Postfix from source
code as described in the <a href="INSTALL.html">INSTALL</a> document. Some modification may
be required if you build Postfix from a vendor-specific source
<p> In order to build Postfix with mysql map support, you will need to add
-DHAS_MYSQL and -I for the directory containing the mysql headers, and
-the mysqlclient library (and libm) to AUXLIBS, for example: </p>
+the mysqlclient library (and libm) to <a href="MYSQL_README.html">AUXLIBS_MYSQL</a>, for example: </p>
<blockquote>
<pre>
make -f Makefile.init makefiles \
'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include' \
- 'AUXLIBS=-L/usr/local/mysql/lib -lmysqlclient -lz -lm'
+ '<a href="MYSQL_README.html">AUXLIBS_MYSQL</a>=-L/usr/local/mysql/lib -lmysqlclient -lz -lm'
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+<a href="MYSQL_README.html">AUXLIBS_MYSQL</a>. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but <a href="MYSQL_README.html">AUXLIBS_MYSQL</a> is required when building
+dynamically-loadable database plugins. </p>
+
<p> On Solaris, use this instead: </p>
<blockquote>
<pre>
make -f Makefile.init makefiles \
'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include' \
- 'AUXLIBS=-L/usr/local/mysql/lib -R/usr/local/mysql/lib \
+ '<a href="MYSQL_README.html">AUXLIBS_MYSQL</a>=-L/usr/local/mysql/lib -R/usr/local/mysql/lib \
-lmysqlclient -lz -lm'
</pre>
</blockquote>
<h2>Building Postfix with PCRE support</h2>
-<p> [Note: instructions to build as a dynamicmaps.cf-style plugin
-will be added later.] </p>
-
<p> These instructions assume that you build Postfix from source
code as described in the <a href="INSTALL.html">INSTALL</a> document. Some modification may
be required if you build Postfix from a vendor-specific source
<p> In order to build Postfix with PCRE support you need to add
-DHAS_PCRE and a -I for the PCRE include file to CCARGS, and add
-the path to the PCRE library to AUXLIBS, for example: </p>
+the path to the PCRE library to <a href="PCRE_README.html">AUXLIBS_PCRE</a>, for example: </p>
<blockquote>
<pre>
make -f Makefile.init makefiles \
"CCARGS=-DHAS_PCRE -I/usr/local/include" \
- "AUXLIBS=-L/usr/local/lib -lpcre"
+ "<a href="PCRE_README.html">AUXLIBS_PCRE</a>=-L/usr/local/lib -lpcre"
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+<a href="PCRE_README.html">AUXLIBS_PCRE</a>. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but <a href="PCRE_README.html">AUXLIBS_PCRE</a> is required when building
+dynamically-loadable database plugins. </p>
+
<p> Solaris needs run-time path information too: </p>
<blockquote>
<pre>
make -f Makefile.init makefiles \
"CCARGS=-DHAS_PCRE -I/usr/local/include" \
- "AUXLIBS=-L/usr/local/lib -R/usr/local/lib -lpcre"
+ "<a href="PCRE_README.html">AUXLIBS_PCRE</a>=-L/usr/local/lib -R/usr/local/lib -lpcre"
</pre>
</blockquote>
<h2>Building Postfix with PostgreSQL support</h2>
-<p> [Note: instructions to build as a dynamicmaps.cf-style plugin
-will be added later.] </p>
-
<p> These instructions assume that you build Postfix from source
code as described in the <a href="INSTALL.html">INSTALL</a> document. Some modification may
be required if you build Postfix from a vendor-specific source
% make tidy
% make -f Makefile.init makefiles \
'CCARGS=-DHAS_PGSQL -I/usr/local/include/pgsql' \
- 'AUXLIBS=-L/usr/local/lib -lpq'
+ '<a href="PGSQL_README.html">AUXLIBS_PGSQL</a>=-L/usr/local/lib -lpq'
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+<a href="PGSQL_README.html">AUXLIBS_PGSQL</a>. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but <a href="PGSQL_README.html">AUXLIBS_PGSQL</a> is required when building
+dynamically-loadable database plugins. </p>
+
<p> Then just run 'make'. </p>
<h2>Configuring PostgreSQL lookup tables</h2>
<h2>Building Postfix with SQLite support</h2>
-<p> [Note: instructions to build as a dynamicmaps.cf-style plugin
-will be added later.] </p>
-
<p> The Postfix SQLite client utilizes the sqlite3 library,
which can be obtained from: </p>
<pre>
make -f Makefile.init makefiles \
'CCARGS=-DHAS_SQLITE -I/usr/local/include' \
- 'AUXLIBS=-L/usr/local/lib -lsqlite3 -lpthread'
+ '<a href="SQLITE_README.html">AUXLIBS_SQLITE</a>=-L/usr/local/lib -lsqlite3 -lpthread'
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+<a href="SQLITE_README.html">AUXLIBS_SQLITE</a>. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but <a href="SQLITE_README.html">AUXLIBS_SQLITE</a> is required when building
+dynamically-loadable database plugins. </p>
+
<p> Then, just run 'make'.</p>
<h2>Using SQLite tables</h2>
This parameter defaults to "no" when Postfix shared libraries are
disabled at compile time. </p>
+<p> NOTE: You can change the location of these files after Postfix
+is built. However, you may have to run ldconfig if you move the
+libpostfix-*.so.* files to a non-system directory. No ldconfig is
+needed if you keep the libpostfix-*.so.* files in the compiled-in
+default $<a href="postconf.5.html#shlib_directory">shlib_directory</a> location. </p>
+
<p> This feature is available in Postfix 2.12 and later. </p>
# environment variables. Use quotes if variables contain
# whitespace or shell meta characters.
# .IP \fBAUXLIBS=\fIobject_library...\fR
-# Specifies one or more non-default object libraries.
+# Specifies one or more non-default object libraries. Postfix
+# 2,12 and later specify some of their database library
+# dependencies with AUXLIBS_CDB, AUXLIBS_LDAP, AUXLIBS_LMDB,
+# AUXLIBS_MYSQL, AUXLIBS_PCRE, AUXLIBS_PGSQL, AUXLIBS_SDBM,
+# and AUXLIBS_SQLITE, respectively.
# .IP \fBCC=\fIcompiler_command\fR
# Specifies a non-default compiler. On many systems, the default
# is \fBgcc\fR.
# .IP \fBdynamicmaps=yes\fR
# .IP \fBdynamicmaps=no\fR
# Enable (disable) Postfix builds with the configuration file
-# $plugin_directory/dynamicmaps.cf for database plugins
-# typically named postfix-*.so.*. The setting "dynamicmaps=yes"
-# implicitly enables Postfix shared libraries.
+# $plugin_directory/dynamicmaps.cf for dynamically-loadable
+# database plugins typically named postfix-*.so.*. The setting
+# "dynamicmaps=yes" implicitly enables Postfix shared libraries.
# .IP \fIinstallation_parameter\fB=\fIvalue\fR...
# Override the compiled-in default value of the specified
# installation parameter(s). The following parameters are
: ${CC=cc}
CCARGS="$CCARGS"
CCWARN='$(WARN)'
+ MAKE_FIX=cant-move-relative-symlink
# Darwin > 1.3 uses awk and flat_namespace
case $RELEASE in
1.[0-3]) AWK=gawk;;
*) pcre_cflags=`(pcre-config --cflags) 2>/dev/null` &&
pcre_libs=`(pcre-config --libs) 2>/dev/null` && {
CCARGS="$CCARGS -DHAS_PCRE $pcre_cflags"
- AUXLIBS="$AUXLIBS $pcre_libs"
+ AUXLIBS_PCRE="$pcre_libs"
}
;;
esac
shlib_directory_macro=DEF_SHLIB_DIR
# shlib_directory and plugin_directory are checked here because "no"
-# is not a good answer. Instead, build with "shared=no".
+# is not a good answer. Instead, build with "dynamicmaps=no" or
+# "shared=no" as appropriate.
for parm_name in command_directory config_directory daemon_directory \
data_directory mailq_path newaliases_path plugin_directory \
PLUGIN_LD=
;;
-*) error "Specify \"shared=yes\" or \"shared=no\"" 1>&2
+*) error "Specify \"shared=yes\" or \"shared=no\""
;;
esac
END { print names }
'`
-sed 's/ / /g' <<EOF
+# Propagate AUXLIBS_FOO or merge them into global AUXLIBS (i.e. SYSLIBS).
+
+PLUGGABLE_MAPS="CDB LDAP LMDB MYSQL PCRE PGSQL SDBM SQLITE"
+
+case "$plugin_directory" in
+/*) for name in $PLUGGABLE_MAPS
+ do
+ eval test -n "\"\$AUXLIBS_$name\"" &&
+ eval PLUGIN_AUXLIBS="\"\$PLUGIN_AUXLIBS
+AUXLIBS_$name = \$AUXLIBS_$name\""
+ done;;
+ *) for name in $PLUGGABLE_MAPS
+ do
+ eval AUXLIBS="\"\$AUXLIBS \$AUXLIBS_$name\""
+ done;;
+esac
+
+sed 's/ */ /g' <<EOF
# System-dependent settings and compiler/linker overrides.
SYSTYPE = $SYSTYPE
_AR = $_AR
ARFL = $ARFL
_RANLIB = $_RANLIB
-SYSLIBS = $AUXLIBS $SYSLIBS
+SYSLIBS = $AUXLIBS $SYSLIBS $PLUGIN_AUXLIBS
CC = $CC $CCARGS $CCWARN
OPT = $OPT
DEBUG = $DEBUG
AWK = $AWK
STRCASE = $STRCASE
-EXPORT = AUXLIBS='$AUXLIBS' CCARGS='$CCARGS' OPT='$OPT' DEBUG='$DEBUG'
+EXPORT = CCARGS='$CCARGS' OPT='$OPT' DEBUG='$DEBUG'
WARN = $WARN
DEFINED_MAP_TYPES = $DEFINED_MAP_TYPES
+MAKE_FIX = $MAKE_FIX
# Switch between Postfix static and shared libraries.
AR = $AR
RANLIB = $RANLIB
This parameter defaults to "no" when Postfix shared libraries are
disabled at compile time.
.PP
+NOTE: You can change the location of these files after Postfix
+is built. However, you may have to run ldconfig if you move the
+libpostfix-*.so.* files to a non-system directory. No ldconfig is
+needed if you keep the libpostfix-*.so.* files in the compiled-in
+default $shlib_directory location.
+.PP
This feature is available in Postfix 2.12 and later.
.SH show_user_unknown_table_name (default: yes)
Display the name of the recipient table in the "User unknown"
s/\b(lmtp):/<a href="lmtp.8.html">$1<\/a>:/g;
s/\b(local):/<a href="local.8.html">$1<\/a>:/g;
s/([^\/])\b(virtual):/$1<a href="virtual.8.html">$2<\/a>:/g;
+
+ # Database library dependencies.
+
+ s/\b(AUXLIBS_)([A-Z]+)\b/<a href="$2_README.html">$1$2<\/a>/g;
}
continue {
if ($printit)
}
}
+myreadlink() {
+ ls -l -- "$@" | awk '
+ /->/ { print $NF; next }
+ { exit(1) }
+ '
+}
+
compare_or_symlink() {
- (cmp $1 $2 >/dev/null 2>&1 && echo Skipping $2...) || {
+ case $1 in
+ /*) dest=`echo $1 | sed '
+ s;^'$install_root';;
+ s;/\./;/;g
+ s;//*;/;g
+ s;^/;;
+ '`
+ link=`echo $2 | sed '
+ s;^'$install_root';;
+ s;/\./;/;g
+ s;//*;/;g
+ s;^/;;
+ s;/[^/]*$;/;
+ s;[^/]*/;../;g
+ s;$;'$dest';
+ '`
+ ;;
+ *) link=$1
+ ;;
+ esac
+ (test $link = "`myreadlink $2`" >/dev/null 2>&1 && echo Skipping $2...) || {
echo Updating $2...
rm -f $tempdir/junk || exit 1
- case $1 in
- /*) dest=`echo $1 | sed '
- s;^'$install_root';;
- s;/\./;/;g
- s;//*;/;g
- s;^/;;
- '`
- link=`echo $2 | sed '
- s;^'$install_root';;
- s;/\./;/;g
- s;//*;/;g
- s;^/;;
- s;/[^/]*$;/;
- s;[^/]*/;../;g
- s;$;'$dest';
- '`
- ;;
- *) link=$1
- ;;
- esac
ln -s $link $tempdir/junk || exit 1
mv -f $tempdir/junk $2 || {
echo $0: Error: your mv command has trouble renaming symlinks. 1>&2
% make tidy
% CDB=../../../tinycdb-0.5
% make -f Makefile.init makefiles "CCARGS=-DHAS_CDB -I$CDB" \
- "AUXLIBS=$CDB/libcdb.a"
+ "AUXLIBS_CDB=$CDB/libcdb.a"
% make
</pre>
</blockquote>
% make tidy
% CDB=../../../cdb-0.75
% make -f Makefile.init makefiles "CCARGS=-DHAS_CDB -I$CDB" \
- "AUXLIBS=$CDB/cdb.a $CDB/alloc.a $CDB/buffer.a $CDB/unix.a $CDB/byte.a"
+ "AUXLIBS_CDB=$CDB/cdb.a $CDB/alloc.a $CDB/buffer.a $CDB/unix.a $CDB/byte.a"
% make
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+AUXLIBS_CDB. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but AUXLIBS_CDB is required when building
+dynamically-loadable database plugins. </p>
+
<p> After Postfix has been built with cdb support, you can use
"cdb" tables wherever you can use read-only "hash", "btree" or
"dbm" tables. However, the "<b>postmap -i</b>" (incremental record
dynamicmaps.cf configuration file is given a suffix with the same
version. </p>
+<p> NOTE: Postfix 2.12 expects that you specify database library
+dependencies with variables named AUXLIBS_CDB, AUXLIBS_LDAP, etc.
+The old AUXLIBS variable is still supported, but the new variables
+are required when building database plugins. See CDB_README,
+LDAP_README, etc. for details. </p>
+
<p> To override the default location or shared-library version,
specify, for example: </p>
<tr> <th colspan="2"> Name/Value </th> <th> Description </th> </tr>
<tr> <td colspan="2"> AUXLIBS="object_library..."</td> <td> Specifies
-one or more non-default object libraries. </td> </tr>
+one or more non-default object libraries. Postfix 2,12 and later
+specify some of their database library dependencies with AUXLIBS_CDB,
+AUXLIBS_LDAP, AUXLIBS_LMDB, AUXLIBS_MYSQL, AUXLIBS_PCRE, AUXLIBS_PGSQL,
+AUXLIBS_SDBM, and AUXLIBS_SQLITE, respectively. </td> </tr>
<tr> <td colspan="2"> CC=compiler_command</td> <td> Specifies a
non-default compiler. On many systems, the default is <tt>gcc</tt>.
<h2><a name="build">Building Postfix with LDAP support</a></h2>
-<p> [Note: instructions to build as a dynamicmaps.cf-style plugin
-will be added later.] </p>
-
<p> These instructions assume that you build Postfix from source
code as described in the INSTALL document. Some modification may
be required if you build Postfix from a vendor-specific source
<pre>
% make tidy
% make makefiles CCARGS="-I/usr/local/include -DHAS_LDAP" \
- AUXLIBS="-L/usr/local/lib -lldap -L/usr/local/lib -llber"
+ AUXLIBS_LDAP="-L/usr/local/lib -lldap -L/usr/local/lib -llber"
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+AUXLIBS_LDAP. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but AUXLIBS_LDAP is required when building
+dynamically-loadable database plugins. </p>
+
<p> On Solaris 2.x you may have to specify run-time link information,
otherwise ld.so will not find some of the shared libraries: </p>
<pre>
% make tidy
% make makefiles CCARGS="-I/usr/local/include -DHAS_LDAP" \
- AUXLIBS="-L/usr/local/lib -R/usr/local/lib -lldap \
+ AUXLIBS_LDAP="-L/usr/local/lib -R/usr/local/lib -lldap \
-L/usr/local/lib -R/usr/local/lib -llber"
</pre>
</blockquote>
<h2><a name="with_lmdb">Building Postfix with LMDB support</a></h2>
-<p> [Note: instructions to build as a dynamicmaps.cf-style plugin
-will be added later.] </p>
-
<p> Postfix normally does not enable LMDB support. To
build Postfix with LMDB support, use something like: </p>
<blockquote>
<pre>
% make makefiles CCARGS="-DHAS_LMDB -I/usr/local/include" \
- AUXLIBS="-L/usr/local/lib -llmdb"
+ AUXLIBS_LMDB="-L/usr/local/lib -llmdb"
% make
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+AUXLIBS_LMDB. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but AUXLIBS_LMDB is required when building
+dynamically-loadable database plugins. </p>
+
<p> Solaris may need this: </p>
<blockquote>
<pre>
% make makefiles CCARGS="-DHAS_LMDB -I/usr/local/include" \
- AUXLIBS="-R/usr/local/lib -L/usr/local/lib -llmdb"
+ AUXLIBS_LMDB="-R/usr/local/lib -L/usr/local/lib -llmdb"
% make
</pre>
</blockquote>
<blockquote>
<pre>
-% make makefiles .... AUXLIBS="... -lpthread"
+% make makefiles .... AUXLIBS_LMDB="... -lpthread"
</pre>
</blockquote>
<h2>Building Postfix with MySQL support</h2>
-<p> [Note: instructions to build as a dynamicmaps.cf-style plugin
-will be added later.] </p>
-
<p> These instructions assume that you build Postfix from source
code as described in the INSTALL document. Some modification may
be required if you build Postfix from a vendor-specific source
<p> In order to build Postfix with mysql map support, you will need to add
-DHAS_MYSQL and -I for the directory containing the mysql headers, and
-the mysqlclient library (and libm) to AUXLIBS, for example: </p>
+the mysqlclient library (and libm) to AUXLIBS_MYSQL, for example: </p>
<blockquote>
<pre>
make -f Makefile.init makefiles \
'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include' \
- 'AUXLIBS=-L/usr/local/mysql/lib -lmysqlclient -lz -lm'
+ 'AUXLIBS_MYSQL=-L/usr/local/mysql/lib -lmysqlclient -lz -lm'
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+AUXLIBS_MYSQL. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but AUXLIBS_MYSQL is required when building
+dynamically-loadable database plugins. </p>
+
<p> On Solaris, use this instead: </p>
<blockquote>
<pre>
make -f Makefile.init makefiles \
'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include' \
- 'AUXLIBS=-L/usr/local/mysql/lib -R/usr/local/mysql/lib \
+ 'AUXLIBS_MYSQL=-L/usr/local/mysql/lib -R/usr/local/mysql/lib \
-lmysqlclient -lz -lm'
</pre>
</blockquote>
<h2>Building Postfix with PCRE support</h2>
-<p> [Note: instructions to build as a dynamicmaps.cf-style plugin
-will be added later.] </p>
-
<p> These instructions assume that you build Postfix from source
code as described in the INSTALL document. Some modification may
be required if you build Postfix from a vendor-specific source
<p> In order to build Postfix with PCRE support you need to add
-DHAS_PCRE and a -I for the PCRE include file to CCARGS, and add
-the path to the PCRE library to AUXLIBS, for example: </p>
+the path to the PCRE library to AUXLIBS_PCRE, for example: </p>
<blockquote>
<pre>
make -f Makefile.init makefiles \
"CCARGS=-DHAS_PCRE -I/usr/local/include" \
- "AUXLIBS=-L/usr/local/lib -lpcre"
+ "AUXLIBS_PCRE=-L/usr/local/lib -lpcre"
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+AUXLIBS_PCRE. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but AUXLIBS_PCRE is required when building
+dynamically-loadable database plugins. </p>
+
<p> Solaris needs run-time path information too: </p>
<blockquote>
<pre>
make -f Makefile.init makefiles \
"CCARGS=-DHAS_PCRE -I/usr/local/include" \
- "AUXLIBS=-L/usr/local/lib -R/usr/local/lib -lpcre"
+ "AUXLIBS_PCRE=-L/usr/local/lib -R/usr/local/lib -lpcre"
</pre>
</blockquote>
<h2>Building Postfix with PostgreSQL support</h2>
-<p> [Note: instructions to build as a dynamicmaps.cf-style plugin
-will be added later.] </p>
-
<p> These instructions assume that you build Postfix from source
code as described in the INSTALL document. Some modification may
be required if you build Postfix from a vendor-specific source
% make tidy
% make -f Makefile.init makefiles \
'CCARGS=-DHAS_PGSQL -I/usr/local/include/pgsql' \
- 'AUXLIBS=-L/usr/local/lib -lpq'
+ 'AUXLIBS_PGSQL=-L/usr/local/lib -lpq'
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+AUXLIBS_PGSQL. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but AUXLIBS_PGSQL is required when building
+dynamically-loadable database plugins. </p>
+
<p> Then just run 'make'. </p>
<h2>Configuring PostgreSQL lookup tables</h2>
<h2>Building Postfix with SQLite support</h2>
-<p> [Note: instructions to build as a dynamicmaps.cf-style plugin
-will be added later.] </p>
-
<p> The Postfix SQLite client utilizes the sqlite3 library,
which can be obtained from: </p>
<pre>
make -f Makefile.init makefiles \
'CCARGS=-DHAS_SQLITE -I/usr/local/include' \
- 'AUXLIBS=-L/usr/local/lib -lsqlite3 -lpthread'
+ 'AUXLIBS_SQLITE=-L/usr/local/lib -lsqlite3 -lpthread'
</pre>
</blockquote>
+<p> Postfix versions before 2.12 should use AUXLIBS instead of
+AUXLIBS_SQLITE. Postfix 2.12 and later still support the old global
+AUXLIBS variable, but AUXLIBS_SQLITE is required when building
+dynamically-loadable database plugins. </p>
+
<p> Then, just run 'make'.</p>
<h2>Using SQLite tables</h2>
This parameter defaults to "no" when Postfix shared libraries are
disabled at compile time. </p>
+<p> NOTE: You can change the location of these files after Postfix
+is built. However, you may have to run ldconfig if you move the
+libpostfix-*.so.* files to a non-system directory. No ldconfig is
+needed if you keep the libpostfix-*.so.* files in the compiled-in
+default $shlib_directory location. </p>
+
<p> This feature is available in Postfix 2.12 and later. </p>
%PARAM plugin_directory see 'postconf -d' output
.c.o:; $(CC) $(SHLIB_CFLAGS) $(CFLAGS) -c $*.c
-all: $(LIB) $(PLUGIN_MAP_SO) $(PLUGIN_MAP_OBJ)
+all: $(LIB) $(PLUGIN_MAP_SO_MAKE) $(PLUGIN_MAP_OBJ)
$(OBJS) $(PLUGIN_MAP_OBJ): ../../conf/makedefs.out
cp $(LIB) $(LIB_DIR)
$(RANLIB) $(LIB_DIR)/$(LIB)
-plugin_map_so: $(PLUGIN_MAP_SO)
+plugin_map_so_make: $(PLUGIN_MAP_SO)
$(LIB_PREFIX)ldap$(LIB_SUFFIX): dict_ldap.o
- $(PLUGIN_LD) -o $@ dict_ldap.o
+ $(PLUGIN_LD) -o $@ dict_ldap.o $(AUXLIBS_LDAP) $(SYSLIBS)
$(LIB_PREFIX)mysql$(LIB_SUFFIX): dict_mysql.o
- $(PLUGIN_LD) -o $@ dict_mysql.o
+ $(PLUGIN_LD) -o $@ dict_mysql.o $(AUXLIBS_MYSQL) $(SYSLIBS)
$(LIB_PREFIX)pgsql$(LIB_SUFFIX): dict_pgsql.o
- $(PLUGIN_LD) -o $@ dict_pgsql.o
+ $(PLUGIN_LD) -o $@ dict_pgsql.o $(AUXLIBS_PGSQL) $(SYSLIBS)
$(LIB_PREFIX)sqlite$(LIB_SUFFIX): dict_sqlite.o
- $(PLUGIN_LD) -o $@ dict_sqlite.o
+ $(PLUGIN_LD) -o $@ dict_sqlite.o $(AUXLIBS_SQLITE) $(SYSLIBS)
+
+$(LIB_PREFIX)cdb$(LIB_SUFFIX): mkmap_cdb.o $(LIB_DIR)/dict_cdb.o
+ $(PLUGIN_LD) -o $@ mkmap_cdb.o $(LIB_DIR)/dict_cdb.o \
+ $(AUXLIBS_CDB) $(SYSLIBS)
$(LIB_PREFIX)lmdb$(LIB_SUFFIX): mkmap_lmdb.o $(LIB_DIR)/dict_lmdb.o \
- $(LIB_DIR)/slmdb.o
+ $(LIB_DIR)/slmdb.o
$(PLUGIN_LD) -o $@ mkmap_lmdb.o $(LIB_DIR)/dict_lmdb.o \
- $(LIB_DIR)/slmdb.o
-
-$(LIB_PREFIX)cdb$(LIB_SUFFIX): mkmap_cdb.o $(LIB_DIR)/dict_cdb.o
- $(PLUGIN_LD) -o $@ mkmap_cdb.o $(LIB_DIR)/dict_cdb.o
+ $(LIB_DIR)/slmdb.o $(AUXLIBS_LMDB) $(SYSLIBS)
$(LIB_PREFIX)sdbm$(LIB_SUFFIX): mkmap_sdbm.o $(LIB_DIR)/dict_sdbm.o
- $(PLUGIN_LD) -o $@ mkmap_sdbm.o $(LIB_DIR)/dict_sdbm.o
+ $(PLUGIN_LD) -o $@ mkmap_sdbm.o $(LIB_DIR)/dict_sdbm.o \
+ $(AUXLIBS_SDBM) $(SYSLIBS)
update: $(LIB_DIR)/$(LIB) $(HDRS) $(PLUGIN_MAP_SO_UPDATE)
-for i in $(HDRS); \
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20140523"
+#define MAIL_RELEASE_DATE "20140524"
#define MAIL_VERSION_NUMBER "2.12"
#ifdef SNAPSHOT
plugin_map_so_make: $(PLUGIN_MAP_SO)
$(LIB_PREFIX)pcre$(LIB_SUFFIX): dict_pcre.o
- $(PLUGIN_LD) -o $@ dict_pcre.o
+ $(PLUGIN_LD) -o $@ dict_pcre.o $(AUXLIBS_PCRE) $(SYSLIBS)
update: $(LIB_DIR)/$(LIB) $(HDRS) $(PLUGIN_MAP_SO_UPDATE) \
$(PLUGIN_MAP_OBJ_UPDATE)