-TDICT_DB
-TDICT_DBM
-TDICT_DEBUG
+-TDICT_DL_INFO
-TDICT_ENV
-TDICT_FAIL
-TDICT_HT
-TLDAP
-TLDAPMessage
-TLDAP_CONN
+-TLIB_FN
-TLMTP_ATTR
-TLMTP_RESP
-TLMTP_SESSION
smtp/lmtp_params.c, smtp/smtp_params.c, virtual/virtual.c,
global/bounce.c.
+20140323
+
+ Feature: initial merge of Debian-style dynamic linking.
+ Viktor Dukhovni.
+
20140406
Bugfix: when testing session caching, stop reconnecting
reported by Sahil Tandon, predicate error found by Viktor,
redundant connection restore request eliminated by Wietse.
File: smtp/smtp_connect.c.
+
+ Cleanup: the macros that control SMTP connection reuse
+ poorly reflected their purpose. "DEAD" is replaced with
+ "FORBIDDEN" (no I/O allowed) and "BAD" is replaced with
+ "THROTTLED" (anything that causes the queue manager to back
+ off from some destination). Files: smtp.h, smtp_coonnect.c,
+ smtp_proto.c, smtp_trouble.c.
+
+ Cleanup: enable SMTP connection cache lookup by destination
+ name while a surge of mail dries up. File: smtp_connect.c.
+
+20140505
+
+ Bugfix: the postdrop authorized_submit_users feature requires
+ that lookup table support is initialized so that it can use
+ libglobal or dynamicmaps maps. File: postdrop/postdrop.c.
+
+ Cleanup: moved dynamicmaps initialization from parameter
+ inititialization (mail_conf_suck()) to dictionary initialization
+ (mail_dict_init()). A benefit of this is that dynamicmaps.cf
+ is no longer read by programs that don't use Postfix lookup
+ tables. Files: global/mail_conf.[hc], global/mail_dict.c.
+
+ Cleanup: move the mail_dict_init() call after the
+ mail_conf_read() or mail_params_init() call, to prepare for
+ a configurable dynamicmaps.cf directory. Files:
+ master/event_server.c, master/multi_server.c,
+ master/single_server.c, master/trigger_server.c.
+
+20140506
+
+ Cleanup: you can now specify "make makefiles parameter=value"
+ for selected compile-time parameter default overrides. The
+ old "make makefiles 'CCARGS=-DDEF_MUMBLE=\"mumble\"'"
+ approach remains supported. File: makedefs.
+
+20140508
+
+ Cleanup: dynamicmaps.cf is now installed into $daemon_directory
+ because the file is shared among Postfix instances just like
+ postfix-files and other files. Files: conf/dynamicmaps.cf,
+ Makefile.in, conf/postfix-files.
+
+ Cleanup: INSTALL is now plain ASCII instead of README format,
+ to avoid a chicken-and-egg problem (the instructions to
+ print/view README-format files are in the INSTALL file).
+
+ Documentation: updated INSTALL instructions and RELEASE_NOTES.
+++ /dev/null
-README_FILES/INSTALL
\ No newline at end of file
--- /dev/null
+Postfix Installation From Source Code
+
+-------------------------------------------------------------------------------
+
+1 - Purpose of this document
+
+If you are using a pre-compiled version of Postfix, you should start with
+BASIC_CONFIGURATION_README and the general documentation referenced by it.
+INSTALL is only a bootstrap document to get Postfix up and running from scratch
+with the minimal number of steps; it should not be considered part of the
+general documentation.
+
+This document describes how to build, install and configure a Postfix system so
+that it can do one of the following:
+
+ * Send mail only, without changing an existing Sendmail installation.
+ * Send and receive mail via a virtual host interface, still without any
+ change to an existing Sendmail installation.
+ * Run Postfix instead of Sendmail.
+
+Topics covered in this document:
+
+ 1. Purpose of this document
+ 2. Typographical conventions
+ 3. Documentation
+ 4. Building on a supported system
+ 5. Porting Postfix to an unsupported system
+ 6. Installing the software after successful compilation
+ 7. Configuring Postfix to send mail only
+ 8. Configuring Postfix to send and receive mail via virtual interface
+ 9. Running Postfix instead of Sendmail
+10. Mandatory configuration file edits
+11. To chroot or not to chroot
+12. Care and feeding of the Postfix system
+
+2 - Typographical conventions
+
+In the instructions below, a command written as
+
+ # command
+
+should be executed as the superuser.
+
+A command written as
+
+ $ command
+
+should be executed as an unprivileged user.
+
+3 - Documentation
+
+Documentation is available as README files (start with the file README_FILES/
+AAAREADME), as HTML web pages (point your browser to "html/index.html") and as
+UNIX-style manual pages.
+
+You should view the README files with a pager such as more(1) or less(1),
+because the files use backspace characters in order to produce bold font. To
+print a README file without backspace characters, use the col(1) command. For
+example:
+
+ $ col -bx <file | lpr
+
+In order to view the manual pages before installing Postfix, point your MANPATH
+environment variable to the "man" subdirectory; be sure to use an absolute
+path.
+
+ $ export MANPATH; MANPATH="`pwd`/man:$MANPATH"
+ $ setenv MANPATH "`pwd`/man:$MANPATH"
+
+Of particular interest is the postconf(5) manual page that lists all the 500+
+configuration parameters. The HTML version of this text makes it easy to
+navigate around.
+
+All Postfix source files have their own built-in manual page. Tools to extract
+those embedded manual pages are available in the mantools directory.
+
+4 - Building on a supported system
+
+At some point in time, a version of Postfix was supported on:
+
+ AIX 3.2.5, 4.1.x, 4.2.0, 4.3.x, 5.2
+ BSD/OS 2.x, 3.x, 4.x
+ FreeBSD 2.x .. 9.x
+ HP-UX 9.x, 10.x, 11.x
+ IRIX 5.x, 6.x
+ Linux Debian 1.3.1 and later
+ Linux RedHat 3.x (January 2004) and later
+ Linux Slackware 3.x and later
+ Linux SuSE 5.x and later
+ Linux Ubuntu 4.10 and later
+ Mac OS X
+ NEXTSTEP 3.x
+ NetBSD 1.x and later
+ OPENSTEP 4.x
+ OSF1.V3 - OSF1.V5 (Digital UNIX)
+ Reliant UNIX 5.x
+ SunOS 4.1.4 (March 2007)
+ SunOS 5.4 - 5.10 (Solaris 2.4..10)
+ Ultrix 4.x (well, that was long ago)
+
+or something closely resemblant.
+
+4.1 - Getting started
+
+On Solaris, the "make" command and other utilities for software development are
+in /usr/ccs/bin, so you MUST have /usr/ccs/bin in your command search path. If
+these files do not exist, install the development packages first. See the
+Solaris FAQ item "Which packages do I need to install to support a C
+compiler?".
+
+If you need to build Postfix for multiple architectures, use the "lndir"
+command to build a shadow tree with symbolic links to the source files. "lndir"
+is part of X11R6.
+
+If at any time in the build process you get messages like: "make: don't know
+how to ..." you should be able to recover by running the following command from
+the Postfix top-level directory:
+
+ $ make -f Makefile.init makefiles
+
+If you copied the Postfix source code after building it on another machine, it
+is a good idea to cd into the top-level directory and first do this:
+
+ $ make tidy
+
+This will get rid of any system dependencies left over from compiling the
+software elsewhere.
+
+4.2 - What compiler to use
+
+To build with GCC, or with the native compiler if people told me that is better
+for your system, just cd into the top-level Postfix directory of the source
+tree and type:
+
+ $ make
+
+To build with a non-default compiler, you need to specify the name of the
+compiler. Here are a few examples:
+
+ $ make makefiles CC=/opt/SUNWspro/bin/cc (Solaris)
+ $ make
+
+ $ make makefiles CC="/opt/ansic/bin/cc -Ae" (HP-UX)
+ $ make
+
+ $ make makefiles CC="purify cc"
+ $ make
+
+and so on. In some cases, optimization is turned off automatically.
+
+4.3 - Building with Postfix shared libraries (Postfix >= 2.12)
+
+Postfix can be built with Postfix shared libraries (files named libpostfix-
+*.so.*). These files are needed to dynamically load Postfix database clients
+with the Debian-style dynamicmaps.cf feature. Postfix shared libraries add
+minor run-time overhead and result in smaller Postfix executable files.
+
+Although Debian-style dynamicmaps.cf support is functional, it is not yet used.
+Postfix database clients are still built into the Postfix library files.
+Postfix database clients may become plugins at some later point in time.
+
+Postfix shared-library support is evolving. Support exists for Linux, FreeBSD
+and MacOS X. Shared-library builds will become the default once the build
+system stops changing.
+
+For now, specify "shared=yes" on the "make makefiles" command line to build
+Postfix with shared-library support.
+
+ $ make makefiles shared=yes ...other arguments...
+ $ make makefiles shared=no ...other arguments...
+ $ make
+
+4.4 - Building with optional features
+
+By default, Postfix builds as a mail system with relatively few bells and
+whistles. Support for third-party databases etc. must be configured when
+Postfix is compiled. The following documents describe how to build Postfix with
+support for optional features:
+
+ _____________________________________________________________
+ |Optional feature |Document |Availability|
+ |__________________________________|_____________|____________|
+ |Berkeley DB database |DB_README |Postfix 1.0 |
+ |__________________________________|_____________|____________|
+ |LMDB database |LMDB_README |Postfix 2.11|
+ |__________________________________|_____________|____________|
+ |LDAP database |LDAP_README |Postfix 1.0 |
+ |__________________________________|_____________|____________|
+ |MySQL database |MYSQL_README |Postfix 1.0 |
+ |__________________________________|_____________|____________|
+ |Perl compatible regular expression|PCRE_README |Postfix 1.0 |
+ |__________________________________|_____________|____________|
+ |PostgreSQL database |PGSQL_README |Postfix 2.0 |
+ |__________________________________|_____________|____________|
+ |SASL authentication |SASL_README |Postfix 1.0 |
+ |__________________________________|_____________|____________|
+ |SQLite database |SQLITE_README|Postfix 2.8 |
+ |__________________________________|_____________|____________|
+ |STARTTLS session encryption |TLS_README |Postfix 2.2 |
+ |__________________________________|_____________|____________|
+
+Note: IP version 6 support is compiled into Postfix on operating systems that
+have IPv6 support. See the IPV6_README file for details.
+
+4.5 - Overriding built-in parameter default settings
+
+4.5.1 - Postfix 2.12 and later
+
+All Postfix configuration parameters can be changed by editing a Postfix
+configuration file, except for one: the parameter that specifies the location
+of Postfix configuration files. In order to build Postfix with a configuration
+directory other than /etc/postfix, use:
+
+ $ make makefiles config_directory=/some/where ...other arguments...
+ $ make
+
+Parameters whose defaults can be specified in this way are listed below. See
+the postconf(5) manpage for a description (command: "nroff -man man/man5/
+postconf.5 | less").
+
+ __________________________________________
+ |parameter name |typical default |
+ |_____________________|____________________|
+ |command_directory |/usr/sbin |
+ |_____________________|____________________|
+ |config_directory |/etc/postfix |
+ |_____________________|____________________|
+ |default_database_type|hash |
+ |_____________________|____________________|
+ |daemon_directory |/usr/libexec/postfix|
+ |_____________________|____________________|
+ |data_directory |/var/lib/postfix |
+ |_____________________|____________________|
+ |html_directory |no |
+ |_____________________|____________________|
+ |mailq_path |/usr/bin/mailq |
+ |_____________________|____________________|
+ |manpage_directory |/usr/local/man |
+ |_____________________|____________________|
+ |newaliases_path |/usr/bin/newaliases |
+ |_____________________|____________________|
+ |queue_directory |/var/spool/postfix |
+ |_____________________|____________________|
+ |readme_directory |no |
+ |_____________________|____________________|
+ |sendmail_path |/usr/sbin/sendmail |
+ |_____________________|____________________|
+ |shlib_directory |/usr/local/lib |
+ |_____________________|____________________|
+
+4.5.2 - All Postfix versions
+
+All Postfix configuration parameters can be changed by editing a Postfix
+configuration file, except for one: the parameter that specifies the location
+of Postfix configuration files. In order to build Postfix with a configuration
+directory other than /etc/postfix, use:
+
+ $ make makefiles CCARGS='-DDEF_CONFIG_DIR=\"/some/where\"'
+ $ make
+
+IMPORTANT: Be sure to get the quotes right. These details matter a lot.
+
+Parameters whose defaults can be specified in this way are listed below. See
+the postconf(5) manpage for a description (command: "nroff -man man/man5/
+postconf.5 | less").
+
+ ____________________________________________________________
+ |Macro name |default value for |typical default |
+ |_________________|_____________________|____________________|
+ |DEF_COMMAND_DIR |command_directory |/usr/sbin |
+ |_________________|_____________________|____________________|
+ |DEF_CONFIG_DIR |config_directory |/etc/postfix |
+ |_________________|_____________________|____________________|
+ |DEF_DB_TYPE |default_database_type|hash |
+ |_________________|_____________________|____________________|
+ |DEF_DAEMON_DIR |daemon_directory |/usr/libexec/postfix|
+ |_________________|_____________________|____________________|
+ |DEF_DATA_DIR |data_directory |/var/lib/postfix |
+ |_________________|_____________________|____________________|
+ |DEF_MAILQ_PATH |mailq_path |/usr/bin/mailq |
+ |_________________|_____________________|____________________|
+ |DEF_HTML_DIR |html_directory |no |
+ |_________________|_____________________|____________________|
+ |DEF_MANPAGE_DIR |manpage_directory |/usr/local/man |
+ |_________________|_____________________|____________________|
+ |DEF_NEWALIAS_PATH|newaliases_path |/usr/bin/newaliases |
+ |_________________|_____________________|____________________|
+ |DEF_QUEUE_DIR |queue_directory |/var/spool/postfix |
+ |_________________|_____________________|____________________|
+ |DEF_README_DIR |readme_directory |no |
+ |_________________|_____________________|____________________|
+ |DEF_SENDMAIL_PATH|sendmail_path |/usr/sbin/sendmail |
+ |_________________|_____________________|____________________|
+
+Note: the data_directory parameter (for caches and pseudo-random numbers) was
+introduced with Postfix version 2.5.
+
+4.6 - Overriding other compile-time features
+
+The general method to override Postfix compile-time features is as follows:
+
+ $ make makefiles name=value name=value...
+ $ make
+
+The following is an extensive list of names and values.
+
+ _____________________________________________________________________________
+|Name/Value |Description |
+|______________________________|______________________________________________|
+|AUXLIBS="object_library..." |Specifies one or more non-default object |
+| |libraries. |
+|______________________________|______________________________________________|
+|CC=compiler_command |Specifies a non-default compiler. On many |
+| |systems, the default is gcc. |
+|______________________________|______________________________________________|
+| |Specifies non-default compiler arguments, for |
+|CCARGS="compiler_arguments..."|example, a non-default include directory. The |
+| |following directives turn off Postfix features|
+| |at compile time: |
+|______________________________|______________________________________________|
+|| |Do not build with Berkeley DB support. By |
+|| |default, Berkeley DB support is compiled in on|
+||-DNO_DB |platforms that are known to support this |
+|| |feature. If you override this, then you |
+|| |probably should also override DEF_DB_TYPE as |
+|| |described in section 4.5. |
+||_____________________________|______________________________________________|
+|| |Do not build with Solaris /dev/poll support. |
+||-DNO_DEVPOLL |By default, /dev/poll support is compiled in |
+|| |on Solaris versions that are known to support |
+|| |this feature. |
+||_____________________________|______________________________________________|
+|| |Do not build with Linux EPOLL support. By |
+||-DNO_EPOLL |default, EPOLL support is compiled in on |
+|| |platforms that are known to support this |
+|| |feature. |
+||_____________________________|______________________________________________|
+|| |Do not build with IPv6 support. By default, |
+|| |IPv6 support is compiled in on platforms that |
+||-DNO_IPV6 |are known to have IPv6 support. Note: this |
+|| |directive is for debugging and testing only. |
+|| |It is not guaranteed to work on all platforms.|
+||_____________________________|______________________________________________|
+|| |Do not build with FreeBSD / NetBSD / OpenBSD /|
+||-DNO_KQUEUE |MacOSX KQUEUE support. By default, KQUEUE |
+|| |support is compiled in on platforms that are |
+|| |known to support it. |
+||_____________________________|______________________________________________|
+|| |Do not build with NIS or NISPLUS support. NIS |
+||-DNO_NIS |is not available on some recent Linux |
+|| |distributions. |
+||_____________________________|______________________________________________|
+|| |Do not build with NISPLUS support. NISPLUS is |
+||-DNO_NISPLUS |not available on some recent Solaris |
+|| |distributions. |
+||_____________________________|______________________________________________|
+|| |Do not build with PCRE support. By default, |
+||-DNO_PCRE |PCRE support is compiled in when the pcre- |
+|| |config utility is installed. |
+||_____________________________|______________________________________________|
+|| |Disable support for POSIX getpwnam_r/ |
+||-DNO_POSIX_GETPW_R |getpwuid_r. By default Postfix uses these |
+|| |where they are known to be available. |
+||_____________________________|______________________________________________|
+|| |Use setjmp()/longjmp() instead of sigsetjmp()/|
+||-DNO_SIGSETJMP |siglongjmp(). By default, Postfix uses |
+|| |sigsetjmp()/siglongjmp() when they are known |
+|| |to be available. |
+||_____________________________|______________________________________________|
+| |Specifies a non-default compiler debugging |
+|DEBUG=debug_level |level. The default is -g. Specify DEBUG= to |
+| |turn off debugging. |
+|______________________________|______________________________________________|
+| |Specifies a non-default optimization level. |
+|OPT=optimization_level |The default is -O. Specify OPT= to turn off |
+| |optimization. |
+|______________________________|______________________________________________|
+| |Specifies a non-default Postfix shared-library|
+| |version number. The default is to use the |
+|SHLIB_VERSION=version |Postfix version: X.Y.Z for stable releases, |
+| |X.Y-DATE for snapshot releases, X.Y-DATE- |
+| |nonprod for non-production releases. |
+|______________________________|______________________________________________|
+| |Specifies non-default gcc compiler warning |
+|WARN="warning_flags..." |options for use when "make" is invoked in a |
+| |source subdirectory only. |
+|______________________________|______________________________________________|
+
+4.7 - Support for thousands of processes
+
+The number of connections that Postfix can manage simultaneously is limited by
+the number of processes that it can run. This number in turn is limited by the
+number of files and sockets that a single process can open. For example, the
+Postfix queue manager has a separate connection to each delivery process, and
+the anvil(8) server has one connection per smtpd(8) process.
+
+Postfix version 2.4 and later have no built-in limits on the number of open
+files or sockets, when compiled on systems that support one of the following:
+
+ * BSD kqueue(2) (FreeBSD 4.1, NetBSD 2.0, OpenBSD 2.9),
+ * Solaris 8 /dev/poll,
+ * Linux 2.6 epoll(4).
+
+With other Postfix versions or operating systems, the number of file
+descriptors per process is limited by the value of the FD_SETSIZE macro. If you
+expect to run more than 1000 mail delivery processes, you may need to override
+the definition of the FD_SETSIZE macro to make select() work correctly:
+
+ $ make makefiles CCARGS=-DFD_SETSIZE=2048
+
+Warning: the above has no effect on some Linux versions. Apparently, on these
+systems the FD_SETSIZE value can be changed only by using undocumented
+interfaces. Currently, that means including <bits/types.h> directly (which is
+not allowed) and overriding the __FD_SETSIZE macro. Beware, undocumented
+interfaces can change at any time and without warning.
+
+But wait, there is more: none of this will work unless the operating system is
+configured to handle thousands of connections. See the TUNING_README guide for
+examples of how to increase the number of open sockets or files.
+
+4.8 - Compiling Postfix, at last
+
+If the command
+
+ $ make
+
+is successful, then you can proceed to install Postfix (section 6).
+
+If the command produces compiler error messages, it may be time to search the
+web or to ask the postfix-users@postfix.org mailing list, but be sure to search
+the mailing list archives first. Some mailing list archives are linked from
+http://www.postfix.org/.
+
+5 - Porting Postfix to an unsupported system
+
+Each system type that Postfix knows is identified by a unique name. Examples:
+SUNOS5, FREEBSD4, and so on. When porting Postfix to a new system, the first
+step is to choose a SYSTEMTYPE name for the new system. You must use a name
+that includes at least the major version of the operating system (such as
+SUNOS4 or LINUX2), so that different releases of the same system can be
+supported without confusion.
+
+Add a case statement to the "makedefs" shell script in the source code top-
+level directory that recognizes the new system reliably, and that emits the
+right system-specific information. Be sure to make the code robust against user
+PATH settings; if the system offers multiple UNIX flavors (e.g. BSD and SYSV)
+be sure to build for the native flavor, instead of the emulated one.
+
+Add an "#ifdef SYSTEMTYPE" section to the central util/sys_defs.h include file.
+You may have to invent new feature macro names. Please choose sensible feature
+macro names such as HAS_DBM or FIONREAD_IN_SYS_FILIO_H.
+
+I strongly recommend against using "#ifdef SYSTEMTYPE" in individual source
+files. While this may look like the quickest solution, it will create a mess
+when newer versions of the same SYSTEMTYPE need to be supported. You're likely
+to end up placing "#ifdef" sections all over the source code again.
+
+6 - Installing the software after successful compilation
+
+This text describes how to install Postfix from source code. See the
+PACKAGE_README file if you are building a package for distribution to other
+systems.
+
+6.1 - Save existing Sendmail binaries
+
+IMPORTANT: if you are REPLACING an existing Sendmail installation with Postfix,
+you may need to keep the old sendmail program running for some time in order to
+flush the mail queue.
+
+ * Some systems implement a mail switch mechanism where different MTAs
+ (Postfix, Sendmail, etc.) can be installed at the same time, while only one
+ of them is actually being used. Examples of such switching mechanisms are
+ the FreeBSD mailwrapper(8) or the Linux mail switch. In this case you
+ should try to "flip" the switch to "Postfix" before installing Postfix.
+
+ * If your system has no mail switch mechanism, execute the following commands
+ (your sendmail, newaliases and mailq programs may be in a different place):
+
+ # mv /usr/sbin/sendmail /usr/sbin/sendmail.OFF
+ # mv /usr/bin/newaliases /usr/bin/newaliases.OFF
+ # mv /usr/bin/mailq /usr/bin/mailq.OFF
+ # chmod 755 /usr/sbin/sendmail.OFF /usr/bin/newaliases.OFF \
+ /usr/bin/mailq.OFF
+
+6.2 - Create account and groups
+
+Before you install Postfix for the first time you need to create an account and
+a group:
+
+ * Create a user account "postfix" with a user id and group id that are not
+ used by any other user account. Preferably, this is an account that no-one
+ can log into. The account does not need an executable login shell, and
+ needs no existing home directory. My password and group file entries look
+ like this:
+
+ /etc/passwd:
+ postfix:*:12345:12345:postfix:/no/where:/no/shell
+
+ /etc/group:
+ postfix:*:12345:
+
+ Note: there should be no whitespace before "postfix:".
+
+ * Create a group "postdrop" with a group id that is not used by any other
+ user account. Not even by the postfix user account. My group file entry
+ looks like:
+
+ /etc/group:
+ postdrop:*:54321:
+
+ Note: there should be no whitespace before "postdrop:".
+
+6.3 - Install Postfix
+
+To install or upgrade Postfix from compiled source code, run one of the
+following commands as the super-user:
+
+ # make install (interactive version, first time install)
+
+ # make upgrade (non-interactive version, for upgrades)
+
+ * The interactive version ("make install") asks for pathnames for Postfix
+ data and program files, and stores your preferences in the main.cf file. If
+ you don't want Postfix to overwrite non-Postfix "sendmail", "mailq" and
+ "newaliases" files, specify pathnames that end in ".postfix".
+
+ * The non-interactive version ("make upgrade") needs the /etc/postfix/main.cf
+ file from a previous installation. If the file does not exist, use
+ interactive installation ("make install") instead.
+
+6.4 - Configure Postfix
+
+Proceed to the section on how you wish to run Postfix on your particular
+machine:
+
+ * Send mail only, without changing an existing Sendmail installation (section
+ 7).
+
+ * Send and receive mail via a virtual host interface, still without any
+ change to an existing Sendmail installation (section 8).
+
+ * Run Postfix instead of Sendmail (section 9).
+
+7 - Configuring Postfix to send mail only
+
+If you are going to use Postfix to send mail only, there is no need to change
+your existing sendmail setup. Instead, set up your mail user agent so that it
+calls the Postfix sendmail program directly.
+
+Follow the instructions in the "Mandatory configuration file edits" in section
+10, and review the "To chroot or not to chroot" text in section 11.
+
+You MUST comment out the "smtp inet" entry in /etc/postfix/master.cf, in order
+to avoid conflicts with the real sendmail. Put a "#" character in front of the
+line that defines the smtpd service:
+
+ /etc/postfix/master.cf:
+ #smtp inet n - n - - smtpd
+
+Start the Postfix system:
+
+ # postfix start
+
+or, if you feel nostalgic, use the Postfix sendmail command:
+
+ # sendmail -bd -qwhatever
+
+and watch your maillog file for any error messages. The pathname is /var/log/
+maillog, /var/log/mail, /var/log/syslog, or something else. Typically, the
+pathname is defined in the /etc/syslog.conf file.
+
+ $ egrep '(reject|warning|error|fatal|panic):' /some/log/file
+
+Note: the most important error message is logged first. Later messages are not
+as useful.
+
+In order to inspect the mail queue, use one of the following commands:
+
+ $ mailq
+
+ $ sendmail -bp
+
+ $ postqueue -p
+
+See also the "Care and feeding" section 12 below.
+
+8 - Configuring Postfix to send and receive mail via virtual interface
+
+Alternatively, you can use the Postfix system to send AND receive mail while
+leaving your Sendmail setup intact, by running Postfix on a virtual interface
+address. Simply configure your mail user agent to directly invoke the Postfix
+sendmail program.
+
+To create a virtual network interface address, study your system ifconfig
+manual page. The command syntax could be any of:
+
+ # ifconfig le0:1 <address> netmask <mask> up
+ # ifconfig en0 alias <address> netmask 255.255.255.255
+
+In the /etc/postfix/main.cf file, I would specify
+
+ /etc/postfix/main.cf:
+ myhostname = virtual.host.tld
+ inet_interfaces = $myhostname
+ mydestination = $myhostname
+
+Follow the instructions in the "Mandatory configuration file edits" in section
+10, and review the "To chroot or not to chroot" text in section 11.
+
+Start the Postfix system:
+
+ # postfix start
+
+or, if you feel nostalgic, use the Postfix sendmail command:
+
+ # sendmail -bd -qwhatever
+
+and watch your maillog file for any error messages. The pathname is /var/log/
+maillog, /var/log/mail, /var/log/syslog, or something else. Typically, the
+pathname is defined in the /etc/syslog.conf file.
+
+ $ egrep '(reject|warning|error|fatal|panic):' /some/log/file
+
+Note: the most important error message is logged first. Later messages are not
+as useful.
+
+In order to inspect the mail queue, use one of the following commands:
+
+ $ mailq
+
+ $ sendmail -bp
+
+ $ postqueue -p
+
+See also the "Care and feeding" section 12 below.
+
+9 - Running Postfix instead of Sendmail
+
+Prior to installing Postfix you should save any existing sendmail program files
+as described in section 6. Be sure to keep the old sendmail running for at
+least a couple days to flush any unsent mail. To do so, stop the sendmail
+daemon and restart it as:
+
+ # /usr/sbin/sendmail.OFF -q
+
+Note: this is old sendmail syntax. Newer versions use separate processes for
+mail submission and for running the queue.
+
+After you have visited the "Mandatory configuration file edits" section below,
+you can start the Postfix system with:
+
+ # postfix start
+
+or, if you feel nostalgic, use the Postfix sendmail command:
+
+ # sendmail -bd -qwhatever
+
+and watch your maillog file for any error messages. The pathname is /var/log/
+maillog, /var/log/mail, /var/log/syslog, or something else. Typically, the
+pathname is defined in the /etc/syslog.conf file.
+
+ $ egrep '(reject|warning|error|fatal|panic):' /some/log/file
+
+Note: the most important error message is logged first. Later messages are not
+as useful.
+
+In order to inspect the mail queue, use one of the following commands:
+
+ $ mailq
+
+ $ sendmail -bp
+
+ $ postqueue -p
+
+See also the "Care and feeding" section 12 below.
+
+10 - Mandatory configuration file edits
+
+Note: the material covered in this section is covered in more detail in the
+BASIC_CONFIGURATION_README document. The information presented below is
+targeted at experienced system administrators.
+
+10.1 - Postfix configuration files
+
+By default, Postfix configuration files are in /etc/postfix. The two most
+important files are main.cf and master.cf; these files must be owned by root.
+Giving someone else write permission to main.cf or master.cf (or to their
+parent directories) means giving root privileges to that person.
+
+In /etc/postfix/main.cf, you will have to set up a minimal number of
+configuration parameters. Postfix configuration parameters resemble shell
+variables, with two important differences: the first one is that Postfix does
+not know about quotes like the UNIX shell does.
+
+You specify a configuration parameter as:
+
+ /etc/postfix/main.cf:
+ parameter = value
+
+and you use it by putting a "$" character in front of its name:
+
+ /etc/postfix/main.cf:
+ other_parameter = $parameter
+
+You can use $parameter before it is given a value (that is the second main
+difference with UNIX shell variables). The Postfix configuration language uses
+lazy evaluation, and does not look at a parameter value until it is needed at
+runtime.
+
+Whenever you make a change to the main.cf or master.cf file, execute the
+following command in order to refresh a running mail system:
+
+ # postfix reload
+
+10.2 - Default domain for unqualified addresses
+
+First of all, you must specify what domain will be appended to an unqualified
+address (i.e. an address without @domain.tld). The "myorigin" parameter
+defaults to the local hostname, but that is probably OK only for very small
+sites.
+
+Some examples (use only one):
+
+ /etc/postfix/main.cf:
+ myorigin = $myhostname (send mail as "user@$myhostname")
+ myorigin = $mydomain (send mail as "user@$mydomain")
+
+10.3 - What domains to receive locally
+
+Next you need to specify what mail addresses Postfix should deliver locally.
+
+Some examples (use only one):
+
+ /etc/postfix/main.cf:
+ mydestination = $myhostname, localhost.$mydomain, localhost
+ mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
+ mydestination = $myhostname
+
+The first example is appropriate for a workstation, the second is appropriate
+for the mailserver for an entire domain. The third example should be used when
+running on a virtual host interface.
+
+10.4 - Proxy/NAT interface addresses
+
+The proxy_interfaces parameter specifies all network addresses that Postfix
+receives mail on by way of a proxy or network address translation unit. You may
+specify symbolic hostnames instead of network addresses.
+
+IMPORTANT: You must specify your proxy/NAT external addresses when your system
+is a backup MX host for other domains, otherwise mail delivery loops will
+happen when the primary MX host is down.
+
+Example: host behind NAT box running a backup MX host.
+
+ /etc/postfix/main.cf:
+ proxy_interfaces = 1.2.3.4 (the proxy/NAT external network address)
+
+10.5 - What local clients to relay mail from
+
+If your machine is on an open network then you must specify what client IP
+addresses are authorized to relay their mail through your machine into the
+Internet. The default setting includes all subnetworks that the machine is
+attached to. This may give relay permission to too many clients. My own
+settings are:
+
+ /etc/postfix/main.cf:
+ mynetworks = 168.100.189.0/28, 127.0.0.0/8
+
+10.6 - What relay destinations to accept from strangers
+
+If your machine is on an open network then you must also specify whether
+Postfix will forward mail from strangers. The default setting will forward mail
+to all domains (and subdomains of) what is listed in $mydestination. This may
+give relay permission for too many destinations. Recommended settings (use only
+one):
+
+ /etc/postfix/main.cf:
+ relay_domains = (do not forward mail from strangers)
+ relay_domains = $mydomain (my domain and subdomains)
+ relay_domains = $mydomain, other.domain.tld, ...
+
+10.7 - Optional: configure a smart host for remote delivery
+
+If you're behind a firewall, you should set up a relayhost. If you can, specify
+the organizational domain name so that Postfix can use DNS lookups, and so that
+it can fall back to a secondary MX host when the primary MX host is down.
+Otherwise just specify a hard-coded hostname.
+
+Some examples (use only one):
+
+ /etc/postfix/main.cf:
+ relayhost = $mydomain
+ relayhost = [mail.$mydomain]
+
+The form enclosed with [] eliminates DNS MX lookups.
+
+By default, the SMTP client will do DNS lookups even when you specify a relay
+host. If your machine has no access to a DNS server, turn off SMTP client DNS
+lookups like this:
+
+ /etc/postfix/main.cf:
+ disable_dns_lookups = yes
+
+The STANDARD_CONFIGURATION_README file has more hints and tips for firewalled
+and/or dial-up networks.
+
+10.8 - Create the aliases database
+
+Postfix uses a Sendmail-compatible aliases(5) table to redirect mail for local
+(8) recipients. Typically, this information is kept in two files: in a text
+file /etc/aliases and in an indexed file /etc/aliases.db. The command "postconf
+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/aliases:
+ root: you
+ postmaster: root
+ postfix: root
+ bin: root
+ etcetera...
+
+Note: there should be no whitespace before the ":".
+
+Finally, build the indexed aliases file with one of the following commands:
+
+ # newaliases
+ # sendmail -bi
+
+11 - To chroot or not to chroot
+
+Postfix daemon processes can be configured (via master.cf) to run in a chroot
+jail. The processes run at a fixed low privilege and with access only to the
+Postfix queue directories (/var/spool/postfix). This provides a significant
+barrier against intrusion. The barrier is not impenetrable, but every little
+bit helps.
+
+With the exception of Postfix daemons that deliver mail locally and/or that
+execute non-Postfix commands, every Postfix daemon can run chrooted.
+
+Sites with high security requirements should consider to chroot all daemons
+that talk to the network: the smtp(8) and smtpd(8) processes, and perhaps also
+the lmtp(8) client. The author's own porcupine.org mail server runs all daemons
+chrooted that can be chrooted.
+
+The default /etc/postfix/master.cf file specifies that no Postfix daemon runs
+chrooted. In order to enable chroot operation, edit the file /etc/postfix/
+master.cf. Instructions are in the file.
+
+Note that a chrooted daemon resolves all filenames relative to the Postfix
+queue directory (/var/spool/postfix). For successful use of a chroot jail, most
+UNIX systems require you to bring in some files or device nodes. The examples/
+chroot-setup directory in the source code distribution has a collection of
+scripts that help you set up Postfix chroot environments on different operating
+systems.
+
+Additionally, you almost certainly need to configure syslogd so that it listens
+on a socket inside the Postfix queue directory. Examples for specific systems:
+
+FreeBSD:
+
+ # mkdir -p /var/spool/postfix/var/run
+ # syslogd -l /var/spool/postfix/var/run/log
+
+Linux, OpenBSD:
+
+ # mkdir -p /var/spool/postfix/dev
+ # syslogd -a /var/spool/postfix/dev/log
+
+12 - Care and feeding of the Postfix system
+
+Postfix daemon processes run in the background, and log problems and normal
+activity to the syslog daemon. The names of logfiles are specified in /etc/
+syslog.conf. At the very least you need something like:
+
+ /etc/syslog.conf:
+ mail.err /dev/console
+ mail.debug /var/log/maillog
+
+IMPORTANT: the syslogd will not create files. You must create them before
+(re)starting syslogd.
+
+IMPORTANT: on Linux you need to put a "-" character before the pathname, e.g.,
+-/var/log/maillog, otherwise the syslogd will use more system resources than
+Postfix does.
+
+Hopefully, the number of problems will be small, but it is a good idea to run
+every night before the syslog files are rotated:
+
+ # postfix check
+ # egrep '(reject|warning|error|fatal|panic):' /some/log/file
+
+ * The first line (postfix check) causes Postfix to report file permission/
+ ownership discrepancies.
+
+ * The second line looks for problem reports from the mail software, and
+ reports how effective the relay and junk mail access blocks are. This may
+ produce a lot of output. You will want to apply some postprocessing to
+ eliminate uninteresting information.
+
+The DEBUG_README document describes the meaning of the "warning" etc. labels in
+Postfix logging.
+
MANDIRS = proto man html
LIBEXEC = libexec/post-install libexec/postfix-files libexec/postfix-script \
libexec/postfix-wrapper libexec/main.cf libexec/master.cf \
- libexec/postmulti-script
+ libexec/postmulti-script libexec/dynamicmaps.cf
default: update
update: $(LIBEXEC)
+libexec/makedefs.out: conf/makedefs.out
+ rm -f $@ && ln -f $? $@
+
libexec/post-install: conf/post-install
rm -f $@ && ln -f $? $@
-libexec/postfix-files: conf/postfix-files
+libexec/dynamicmaps.cf: conf/dynamicmaps.cf
rm -f $@ && ln -f $? $@
+libexec/postfix-files: conf/postfix-files conf/makedefs.out Makefile
+ rm -f $@
+ if [ "${SHLIB_DIR}" = "no" -o "${SHLIB_DIR}" = "" ]; then \
+ sed -e '/^\$$shlib_directory/d' \
+ -e '/dynamicmaps.cf/d' conf/postfix-files >$@; \
+ else \
+ sed -e "s;\$${LIB_PREFIX};$(LIB_PREFIX);" \
+ -e "s;\$${LIB_SUFFIX};$(LIB_SUFFIX);" conf/postfix-files >$@; \
+ fi
+
libexec/postfix-script: conf/postfix-script
rm -f $@ && ln -f $? $@
printfck: update
install: update
- $(SHELL) postfix-install
+ $(SHLIB_ENV) shlib_directory=${SHLIB_DIR} \
+ $(SHELL) postfix-install
package: update
- $(SHELL) postfix-install -package
+ $(SHLIB_ENV) shlib_directory=${SHLIB_DIR} \
+ $(SHELL) postfix-install -package
upgrade: update
- $(SHELL) postfix-install -non-interactive
+ $(SHLIB_ENV) shlib_directory=${SHLIB_DIR} \
+ $(SHELL) postfix-install -non-interactive
non-interactive-package: update
- $(SHELL) postfix-install -non-interactive -package
+ $(SHLIB_ENV) shlib_directory=${SHLIB_DIR} \
+ $(SHELL) postfix-install -non-interactive -package
depend clean:
set -e; for i in $(DIRS); do \
rm -f README_FILES/RELEASE_NOTES
ln -s ../RELEASE_NOTES README_FILES
rm -f bin/[!CRS]* lib/[!CRS]* include/[!CRS]* libexec/[!CRS]* \
+ src/*/libpostfix-* \
junk */junk */*/junk \
*core */*core */*/*core \
.nfs* */.nfs* */*/.nfs* \
and so on. In some cases, optimization is turned off automatically.
-4\b4.\b.3\b3 -\b- B\bBu\bui\bil\bld\bdi\bin\bng\bg w\bwi\bit\bth\bh o\bop\bpt\bti\bio\bon\bna\bal\bl f\bfe\bea\bat\btu\bur\bre\bes\bs
+4\b4.\b.3\b3 -\b- B\bBu\bui\bil\bld\bdi\bin\bng\bg w\bwi\bit\bth\bh P\bPo\bos\bst\btf\bfi\bix\bx s\bsh\bha\bar\bre\bed\bd l\bli\bib\bbr\bra\bar\bri\bie\bes\bs (\b(P\bPo\bos\bst\btf\bfi\bix\bx >\b>=\b= 2\b2.\b.1\b12\b2)\b)
+
+Postfix can be built with Postfix shared libraries (files named libpostfix-
+*.so.*). These files are needed to dynamically load Postfix database clients
+with the Debian-style dynamicmaps.cf feature. Postfix shared libraries add
+minor run-time overhead and result in smaller Postfix executable files.
+
+Although Debian-style dynamicmaps.cf support is functional, it is not yet used.
+Postfix database clients are still built into the Postfix library files.
+Postfix database clients may become plugins at some later point in time.
+
+Postfix shared-library support is evolving. Support exists for Linux, FreeBSD
+and MacOS X. Shared-library builds will become the default once the build
+system stops changing.
+
+For now, specify "shared=yes" on the "make makefiles" command line to build
+Postfix with shared-library support.
+
+ $ make makefiles shared=yes ...other arguments...
+ $ make makefiles shared=no ...other arguments...
+ $ make
+
+4\b4.\b.4\b4 -\b- B\bBu\bui\bil\bld\bdi\bin\bng\bg w\bwi\bit\bth\bh o\bop\bpt\bti\bio\bon\bna\bal\bl f\bfe\bea\bat\btu\bur\bre\bes\bs
By default, Postfix builds as a mail system with relatively few bells and
whistles. Support for third-party databases etc. must be configured when
Note: IP version 6 support is compiled into Postfix on operating systems that
have IPv6 support. See the IPV6_README file for details.
-4\b4.\b.4\b4 -\b- O\bOv\bve\ber\brr\bri\bid\bdi\bin\bng\bg b\bbu\bui\bil\blt\bt-\b-i\bin\bn p\bpa\bar\bra\bam\bme\bet\bte\ber\br d\bde\bef\bfa\bau\bul\blt\bt s\bse\bet\btt\bti\bin\bng\bgs\bs
+4\b4.\b.5\b5 -\b- O\bOv\bve\ber\brr\bri\bid\bdi\bin\bng\bg b\bbu\bui\bil\blt\bt-\b-i\bin\bn p\bpa\bar\bra\bam\bme\bet\bte\ber\br d\bde\bef\bfa\bau\bul\blt\bt s\bse\bet\btt\bti\bin\bng\bgs\bs
+
+4\b4.\b.5\b5.\b.1\b1 -\b- P\bPo\bos\bst\btf\bfi\bix\bx 2\b2.\b.1\b12\b2 a\ban\bnd\bd l\bla\bat\bte\ber\br
+
+All Postfix configuration parameters can be changed by editing a Postfix
+configuration file, except for one: the parameter that specifies the location
+of Postfix configuration files. In order to build Postfix with a configuration
+directory other than /etc/postfix, use:
+
+ $ make makefiles config_directory=/some/where ...other arguments...
+ $ make
+
+Parameters whose defaults can be specified in this way are listed below. See
+the postconf(5) manpage for a description (command: "nroff -man man/man5/
+postconf.5 | less").
+
+ _\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
+ |p\bpa\bar\bra\bam\bme\bet\bte\ber\br n\bna\bam\bme\be |t\bty\byp\bpi\bic\bca\bal\bl d\bde\bef\bfa\bau\bul\blt\bt |
+ |_\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 |
+ |command_directory |/usr/sbin |
+ |_\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 |
+ |config_directory |/etc/postfix |
+ |_\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 |
+ |default_database_type|hash |
+ |_\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 |
+ |daemon_directory |/usr/libexec/postfix|
+ |_\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 |
+ |data_directory |/var/lib/postfix |
+ |_\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 |
+ |html_directory |no |
+ |_\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 |
+ |mailq_path |/usr/bin/mailq |
+ |_\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 |
+ |manpage_directory |/usr/local/man |
+ |_\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 |
+ |newaliases_path |/usr/bin/newaliases |
+ |_\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 |
+ |queue_directory |/var/spool/postfix |
+ |_\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 |
+ |readme_directory |no |
+ |_\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 |
+ |sendmail_path |/usr/sbin/sendmail |
+ |_\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 |
+ |shlib_directory |/usr/local/lib |
+ |_\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 |
+
+4\b4.\b.5\b5.\b.2\b2 -\b- A\bAl\bll\bl P\bPo\bos\bst\btf\bfi\bix\bx v\bve\ber\brs\bsi\bio\bon\bns\bs
All Postfix configuration parameters can be changed by editing a Postfix
configuration file, except for one: the parameter that specifies the location
IMPORTANT: Be sure to get the quotes right. These details matter a lot.
-Parameters whose defaults can be specified in this way are:
+Parameters whose defaults can be specified in this way are listed below. See
+the postconf(5) manpage for a description (command: "nroff -man man/man5/
+postconf.5 | less").
_\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
|M\bMa\bac\bcr\bro\bo n\bna\bam\bme\be |d\bde\bef\bfa\bau\bul\blt\bt v\bva\bal\blu\bue\be f\bfo\bor\br |t\bty\byp\bpi\bic\bca\bal\bl d\bde\bef\bfa\bau\bul\blt\bt |
Note: the data_directory parameter (for caches and pseudo-random numbers) was
introduced with Postfix version 2.5.
-4\b4.\b.5\b5 -\b- O\bOv\bve\ber\brr\bri\bid\bdi\bin\bng\bg o\bot\bth\bhe\ber\br c\bco\bom\bmp\bpi\bil\ble\be-\b-t\bti\bim\bme\be f\bfe\bea\bat\btu\bur\bre\bes\bs
+4\b4.\b.6\b6 -\b- O\bOv\bve\ber\brr\bri\bid\bdi\bin\bng\bg o\bot\bth\bhe\ber\br c\bco\bom\bmp\bpi\bil\ble\be-\b-t\bti\bim\bme\be f\bfe\bea\bat\btu\bur\bre\bes\bs
The general method to override Postfix compile-time features is as follows:
||-DNO_DB |platforms that are known to support this |
|| |feature. If you override this, then you |
|| |probably should also override DEF_DB_TYPE as |
-|| |described in section 4.4. |
+|| |described in section 4.5. |
|_\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 |
|| |Do not build with Solaris /dev/poll support. |
||-DNO_DEVPOLL |By default, /dev/poll support is compiled in |
|OPT=optimization_level |The default is -O. Specify OPT= to turn off |
| |optimization. |
|_\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 |
+| |Specifies a non-default Postfix shared-library|
+| |version number. The default is to use the |
+|SHLIB_VERSION=version |Postfix version: X.Y.Z for stable releases, |
+| |X.Y-DATE for snapshot releases, X.Y-DATE- |
+| |nonprod for non-production releases. |
+|_\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 |
| |Specifies non-default gcc compiler warning |
|WARN="warning_flags..." |options for use when "make" is invoked in a |
| |source subdirectory only. |
|_\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 |
-4\b4.\b.6\b6 -\b- S\bSu\bup\bpp\bpo\bor\brt\bt f\bfo\bor\br t\bth\bho\bou\bus\bsa\ban\bnd\bds\bs o\bof\bf p\bpr\bro\boc\bce\bes\bss\bse\bes\bs
+4\b4.\b.7\b7 -\b- S\bSu\bup\bpp\bpo\bor\brt\bt f\bfo\bor\br t\bth\bho\bou\bus\bsa\ban\bnd\bds\bs o\bof\bf p\bpr\bro\boc\bce\bes\bss\bse\bes\bs
The number of connections that Postfix can manage simultaneously is limited by
the number of processes that it can run. This number in turn is limited by the
configured to handle thousands of connections. See the TUNING_README guide for
examples of how to increase the number of open sockets or files.
-4\b4.\b.7\b7 -\b- C\bCo\bom\bmp\bpi\bil\bli\bin\bng\bg P\bPo\bos\bst\btf\bfi\bix\bx,\b, a\bat\bt l\bla\bas\bst\bt
+4\b4.\b.8\b8 -\b- C\bCo\bom\bmp\bpi\bil\bli\bin\bng\bg P\bPo\bos\bst\btf\bfi\bix\bx,\b, a\bat\bt l\bla\bas\bst\bt
If the command
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.
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:
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.
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.
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.
stress=
P\bPo\bos\bst\btf\bfi\bix\bx v\bve\ber\brs\bsi\bio\bon\bn 2\b2.\b.9\b9 a\ban\bnd\bd l\bla\bat\bte\ber\br:\b:
ccert_pubkey_fingerprint=68:B3:29:DA:98:93:E3:40:99:C7:D8:AD:5C:B9:C9:40
+ P\bPo\bos\bst\btf\bfi\bix\bx v\bve\ber\brs\bsi\bio\bon\bn 2\b2.\b.1\b12\b2 a\ban\bnd\bd l\bla\bat\bte\ber\br:\b:
+ client_port=1234
[empty line]
Notes:
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:
If you upgrade from Postfix 2.10 or earlier, read RELEASE_NOTES-2.11
before proceeding.
+Major changes with snapshot 20140508
+====================================
+
+Preliminary support to build Postfix with Postfix shared libraries,
+based on Debian code by LaMont Jones, based on a port by Viktor
+Dukhovni. Support exists for Linux, FreeBSD and MacOS X.
+
+Shared-library support is introduced early in the Postfix development
+cycle so that down-stream maintainers will have time to prepare for
+the next stable Postfix release.
+
+Postfix shared libraries are required to load database plugins using
+the dynamicmaps configuration file. However, the preliminary build
+procedure still puts all supported database code inside the Postfix
+shared libraries themselves. The dynamicmaps support is operational
+but it is not yet used.
+
+Postfix shared libraries introduce minor runtime overhead and result
+in smaller Postfix executable files.
+
+Differences with Debian
+-----------------------
+
+Besides changes to the Postfix "build" system as described below,
+the only user-visible changes with respect to Debian are:
+
+- The dynamicmaps.cf configuration file is in $daemon_directory,
+ because this file is shared among all Postfix instances just like
+ postfix-files and other files.
+
+- The location of the libpostfix-*.so.* files is configurable with
+ the shlib_directory parameter.
+
+- You can change the location of libpostfix-*.so.* 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 default $shlib_directory location.
+
+Building with Postfix shared libraries
+--------------------------------------
+
+As noted above, the preliminary build procedure still puts all
+supported database code inside the Postfix shared libraries themselves.
+The dynamicmaps support is operational but it is not yet used.
+
+To build with Postfix shared-library support:
+
+% make makefiles shared=yes
+% make
+
+This defaults to installing shared libraries in /usr/local/lib,
+with a shared-library version that equals the Postfix version
+(e.g., libpostfix-util.so.x.y.z, libpostfix-util.so.x.y-date, or
+libpostfix-util.so.x.y-date-nonprod).
+
+To override this, use, for example:
+
+% make makefiles shared=yes shlib_directory=/usr/lib \
+ SHLIB_VERSION=1 ...other arguments...
+
+The same syntax can be used to override other Postfix installation
+parameter settings such as:
+
+% make makefiles config_directory=/usr/local/etc/postfix ...other arguments...
+
+The earlier override method that uses CCARGS remains supported.
+
+Further information
+-------------------
+
+For more, see "mantools/srctoman - makedefs | nroff -man | less".
+and see the preliminary documentation in the INSTALL guide.
+
Major changes with snapshot 20140321
====================================
--- /dev/null
+# dictionary type soname (pathname) open-function mkmap-function
# This feature is obsolete as of Postfix 2.1.
# .IP readme_directory
# The directory for the Postfix README files.
+# .IP shlib_directory
+# The directory for the Postfix shared-library files.
# SEE ALSO
# postfix-install(1) Postfix primary installation script.
# FILES
MOST_PARAMETERS="command_directory daemon_directory data_directory
html_directory mail_owner mailq_path manpage_directory
newaliases_path queue_directory readme_directory sample_directory
- sendmail_path setgid_group"
+ sendmail_path setgid_group shlib_directory"
NON_SHARED="config_directory queue_directory data_directory"
USAGE="Usage: $0 [name=value] command
esac
done
-for path in "$html_directory" "$readme_directory"
+for path in "$html_directory" "$readme_directory" "$shlib_directory"
do
case "$path" in
/*) ;;
"manpage_directory = $manpage_directory" \
"sample_directory = $sample_directory" \
"readme_directory = $readme_directory" \
+ "shlib_directory = $shlib_directory" \
|| exit 1
}
# Postfix configuration files. See the respective manual pages within
# the script files.
#
-# Do not list $command_directory in this file, or it will be blown
-# away by a future Postfix uninstallation procedure. You would not
-# want to lose all files in /usr/sbin.
+# Do not list $command_directory or $shlib_directory in this file,
+# or it will be blown away by a future Postfix uninstallation
+# procedure. You would not want to lose all files in /usr/sbin or
+# /usr/local/lib.
#
# Each record in this file describes one file or directory.
# Fields are separated by ":". Specify a null field as "-".
$queue_directory/pid:d:root:-:755:uc
$queue_directory/saved:d:$mail_owner:-:700:ucr
$queue_directory/trace:d:$mail_owner:-:700:ucr
+$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
$daemon_directory/anvil:f:root:-:755
$daemon_directory/bounce:f:root:-:755
$daemon_directory/cleanup:f:root:-:755
$daemon_directory/discard:f:root:-:755
$daemon_directory/dnsblog:f:root:-:755
+$daemon_directory/dynamicmaps.cf:f:root:-:755:p
$daemon_directory/error:f:root:-:755
$daemon_directory/flush:f:root:-:755
#$daemon_directory/lmtp:f:root:-:755
$FATAL no Postfix configuration directory $config_directory!
exit 1
}
+case $shlib_directory in
+no) ;;
+ *) cd $shlib_directory || {
+ $FATAL no Postfix shared-library directory $shlib_directory!
+ exit 1
+ }
+esac
cd $queue_directory || {
$FATAL no Postfix queue directory $queue_directory!
exit 1
todo="$config_directory $queue_directory $queue_directory/pid"
test -n "$check_shared_files" && todo="$daemon_directory $todo"
+ test "$shlib_directory" = "no" || todo="$shlib_directory $todo"
for dir in $todo
do
todo="$config_directory/*"
test -n "$check_shared_files" && todo="$daemon_directory/* $todo"
+ test "$shlib_directory" = "no" ||
+ todo="$shlib_directory/libpostfix* $todo"
find $todo ! -user root \
-exec $WARN not owned by root: {} \;
todo="$config_directory/."
test -n "$check_shared_files" && todo="$daemon_directory/. $todo"
+ # FIXME don't scan non-Postfix files under /usr/local/lib.
+ test "$shlib_directory" = "no" ||
+ todo="$shlib_directory/libpostfix* $todo"
find $todo \
\( -perm -020 -o -perm -002 \) -type f \
<p> and so on. In some cases, optimization is turned off automatically. </p>
-<h3>4.3 - Building with optional features</h3>
+<h3>4.3 - Building with Postfix shared libraries (Postfix ≥ 2.12) </h3>
+
+<p> Postfix can be built with Postfix shared libraries (files named
+<tt>libpostfix-*.so.*</tt>). These files are needed to dynamically
+load Postfix database clients with the Debian-style dynamicmaps.cf
+feature. Postfix shared libraries add minor run-time overhead and
+result in smaller Postfix executable files. </p>
+
+<p> Although Debian-style dynamicmaps.cf support is functional, it
+is not yet used. Postfix database clients are still built into the
+Postfix library files. Postfix database clients may become plugins
+at some later point in time. </p>
+
+<p> Postfix shared-library support is evolving. Support exists for
+Linux, FreeBSD and MacOS X. Shared-library builds will become the
+default once the build system stops changing. </p>
+
+<p> For now, specify "shared=yes" on the "make makefiles"
+command line to build Postfix with shared-library support. </p>
+
+<blockquote>
+<pre>
+$ make makefiles shared=yes ...other arguments...
+$ make makefiles shared=no ...other arguments...
+$ make
+</pre>
+</blockquote>
+
+<h3>4.4 - Building with optional features</h3>
By default, Postfix builds as a mail system with relatively few
bells and whistles. Support for third-party databases etc.
systems that have IPv6 support. See the <a href="IPV6_README.html">IPV6_README</a> file for details.
</p>
-<h3>4.4 - Overriding built-in parameter default settings</h3>
+<h3>4.5 - Overriding built-in parameter default settings</h3>
+
+<h4>4.5.1 - Postfix 2.12 and later </h4>
+
+<p> All Postfix configuration parameters can be changed by editing
+a Postfix configuration file, except for one: the parameter that
+specifies the location of Postfix configuration files. In order to
+build Postfix with a configuration directory other than /etc/postfix,
+use: </p>
+
+<blockquote>
+<pre>
+$ make makefiles <a href="postconf.5.html#config_directory">config_directory</a>=/some/where ...other arguments...
+$ make
+</pre>
+</blockquote>
+
+<p> Parameters whose defaults can be specified in this way are
+listed below. See the <a href="postconf.5.html">postconf(5)</a> manpage for a description
+(command: "<tt>nroff -man man/man5/postconf.5 | less</tt>"). </p>
+
+<blockquote>
+
+<table border="1">
+
+<tr> <th>parameter name</th> <th>typical default</th> </tr>
+
+<tr> <td><a href="postconf.5.html#command_directory">command_directory</a></td> <td>/usr/sbin</td> </tr>
+
+<tr> <td><a href="postconf.5.html#config_directory">config_directory</a></td> <td>/etc/postfix</td> </tr>
+
+<tr> <td><a href="postconf.5.html#default_database_type">default_database_type</a></td> <td>hash</td> </tr>
+
+<tr> <td><a href="postconf.5.html#daemon_directory">daemon_directory</a></td> <td>/usr/libexec/postfix</td> </tr>
+
+<tr> <td><a href="postconf.5.html#data_directory">data_directory</a></td> <td>/var/lib/postfix</td> </tr>
+
+<tr> <td><a href="postconf.5.html#html_directory">html_directory</a></td> <td>no</td> </tr>
+
+<tr> <td><a href="postconf.5.html#mailq_path">mailq_path</a></td> <td>/usr/bin/mailq</td> </tr>
+
+<tr> <td><a href="postconf.5.html#manpage_directory">manpage_directory</a></td> <td>/usr/local/man</td> </tr>
+
+<tr> <td><a href="postconf.5.html#newaliases_path">newaliases_path</a></td> <td>/usr/bin/newaliases</td> </tr>
+
+<tr> <td><a href="postconf.5.html#queue_directory">queue_directory</a></td> <td>/var/spool/postfix</td> </tr>
+
+<tr> <td><a href="postconf.5.html#readme_directory">readme_directory</a></td> <td>no</td> </tr>
+
+<tr> <td><a href="postconf.5.html#sendmail_path">sendmail_path</a></td> <td>/usr/sbin/sendmail</td> </tr>
+
+<tr> <td><a href="postconf.5.html#shlib_directory">shlib_directory</a></td> <td>/usr/local/lib</td> </tr>
+
+</table>
+
+</blockquote>
+
+<h4>4.5.2 - All Postfix versions </h4>
<p> All Postfix configuration parameters can be changed by editing
a Postfix configuration file, except for one: the parameter that
<p> IMPORTANT: Be sure to get the quotes right. These details matter
a lot. </p>
-<p> Parameters whose defaults can be specified in this way are: </p>
+<p> Parameters whose defaults can be specified in this way are
+listed below. See the <a href="postconf.5.html">postconf(5)</a> manpage for a description
+(command: "<tt>nroff -man man/man5/postconf.5 | less</tt>"). </p>
<blockquote>
<p> Note: the <a href="postconf.5.html#data_directory">data_directory</a> parameter (for caches and pseudo-random
numbers) was introduced with Postfix version 2.5. </p>
-<h3>4.5 - Overriding other compile-time features</h3>
+<h3>4.6 - Overriding other compile-time features</h3>
<p> The general method to override Postfix compile-time features
is as follows: </p>
DB support. By default, Berkeley DB support is compiled in on
platforms that are known to support this feature. If you override
this, then you probably should also override DEF_DB_TYPE as described
-in section 4.4. </td> </tr>
+in section 4.5. </td> </tr>
<tr> <td> </td> <td> -DNO_DEVPOLL </td> <td> Do not build with
Solaris <tt>/dev/poll</tt> support. By default, <tt>/dev/poll</tt>
a non-default optimization level. The default is -O. Specify OPT=
to turn off optimization. </td> </tr>
+<tr> <td colspan="2"> SHLIB_VERSION=version </td> <td> Specifies a
+non-default Postfix shared-library version number. The default is
+to use the Postfix version: X.Y.Z for stable releases, X.Y-DATE for
+snapshot releases, X.Y-DATE-nonprod for non-production releases.
+</td> </tr>
+
<tr> <td colspan="2"> WARN="warning_flags..." </td> <td> Specifies
non-default <tt>gcc</tt> compiler warning options for use when
"<tt>make</tt>" is invoked in a source subdirectory only. </td>
</table>
-<h3>4.6 - Support for thousands of processes</h3>
+<h3>4.7 - Support for thousands of processes</h3>
<p> The number of connections that Postfix can manage simultaneously
is limited by the number of processes that it can run. This number
See the <a href="TUNING_README.html">TUNING_README</a> guide for examples of how to increase the
number of open sockets or files. </p>
-<h3>4.7 - Compiling Postfix, at last</h3>
+<h3>4.8 - Compiling Postfix, at last</h3>
<p> If the command </p>
<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
<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>
<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
<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
<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
stress=
<b>Postfix version 2.9 and later:</b>
ccert_pubkey_fingerprint=68:B3:29:DA:98:93:E3:40:99:C7:D8:AD:5C:B9:C9:40
+<b>Postfix version 2.12 and later:</b>
+client_port=1234
[empty line]
</pre>
</blockquote>
<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>
</p>
+</DD>
+
+<DT><b><a name="shlib_directory">shlib_directory</a>
+(default: see 'postconf -d' output)</b></DT><DD>
+
+<p> The location of Postfix shared libraries (libpostfix-*.so.*).
+This parameter defaults to "no" when Postfix shared libraries are
+disabled at compile time. </p>
+
+<p> This feature is available in Postfix 2.12 and later. </p>
+
+
</DD>
<DT><b><a name="show_user_unknown_table_name">show_user_unknown_table_name</a>
The following <a href="postconf.5.html"><b>main.cf</b></a> configuration parameters are exported as environ-
ment variables with the same names:
+ <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
+ The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
+ figuration files.
+
<b><a href="postconf.5.html#command_directory">command_directory</a> (see 'postconf -d' output)</b>
The location of all postfix administrative commands.
<b><a href="postconf.5.html#daemon_directory">daemon_directory</a> (see 'postconf -d' output)</b>
The directory with Postfix support programs and daemon programs.
- <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
- The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
- figuration files.
-
- <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
- The location of the Postfix top-level queue directory.
+ <b><a href="postconf.5.html#html_directory">html_directory</a> (see 'postconf -d' output)</b>
+ The location of Postfix HTML files that describe how to build,
+ configure or operate a specific Postfix subsystem or feature.
<b><a href="postconf.5.html#mail_owner">mail_owner</a> (postfix)</b>
- The UNIX system account that owns the Postfix queue and most
+ The UNIX system account that owns the Postfix queue and most
Postfix daemon processes.
- <b><a href="postconf.5.html#setgid_group">setgid_group</a> (postdrop)</b>
- The group ownership of set-gid Postfix commands and of group-
- writable Postfix directories.
-
- <b><a href="postconf.5.html#sendmail_path">sendmail_path</a> (see 'postconf -d' output)</b>
- A Sendmail compatibility feature that specifies the location of
- the Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command.
-
- <b><a href="postconf.5.html#newaliases_path">newaliases_path</a> (see 'postconf -d' output)</b>
- Sendmail compatibility feature that specifies the location of
- the <a href="newaliases.1.html"><b>newaliases</b>(1)</a> command.
-
<b><a href="postconf.5.html#mailq_path">mailq_path</a> (see 'postconf -d' output)</b>
Sendmail compatibility feature that specifies where the Postfix
<a href="mailq.1.html"><b>mailq</b>(1)</a> command is installed.
- <b><a href="postconf.5.html#html_directory">html_directory</a> (see 'postconf -d' output)</b>
- The location of Postfix HTML files that describe how to build,
- configure or operate a specific Postfix subsystem or feature.
-
<b><a href="postconf.5.html#manpage_directory">manpage_directory</a> (see 'postconf -d' output)</b>
Where the Postfix manual pages are installed.
+ <b><a href="postconf.5.html#newaliases_path">newaliases_path</a> (see 'postconf -d' output)</b>
+ Sendmail compatibility feature that specifies the location of
+ the <a href="newaliases.1.html"><b>newaliases</b>(1)</a> command.
+
+ <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
+ The location of the Postfix top-level queue directory.
+
<b><a href="postconf.5.html#readme_directory">readme_directory</a> (see 'postconf -d' output)</b>
The location of Postfix README files that describe how to build,
configure or operate a specific Postfix subsystem or feature.
+ <b><a href="postconf.5.html#sendmail_path">sendmail_path</a> (see 'postconf -d' output)</b>
+ A Sendmail compatibility feature that specifies the location of
+ the Postfix <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command.
+
+ <b><a href="postconf.5.html#setgid_group">setgid_group</a> (postdrop)</b>
+ The group ownership of set-gid Postfix commands and of group-
+ writable Postfix directories.
+
Available in Postfix version 2.5 and later:
<b><a href="postconf.5.html#data_directory">data_directory</a> (see 'postconf -d' output)</b>
The directory with Postfix-writable data files (for example:
caches, pseudo-random numbers).
- Other configuration parameters:
+ Available in Postfix version 2.12 and later:
- <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
- The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con-
- figuration files.
+ <b><a href="postconf.5.html#shlib_directory">shlib_directory</a> (see 'postconf -d' output)</b>
+ The location of Postfix shared libraries (libpostfix-*.so.*).
+
+ Other configuration parameters:
<b><a href="postconf.5.html#import_environment">import_environment</a> (see 'postconf -d' output)</b>
- The list of environment parameters that a Postfix process will
+ The list of environment parameters that a Postfix process will
import from a non-Postfix parent process.
<b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
The syslog facility of Postfix logging.
<b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
- The mail system name that is prepended to the process name in
- syslog records, so that "smtpd" becomes, for example, "post-
+ The mail system name that is prepended to the process name in
+ syslog records, so that "smtpd" becomes, for example, "post-
fix/smtpd".
Available in Postfix version 2.6 and later:
<b><a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> (empty)</b>
- An optional list of non-default Postfix configuration directo-
- ries; these directories belong to additional Postfix instances
- that share the Postfix executable files and documentation with
- the default Postfix instance, and that are started, stopped,
+ An optional list of non-default Postfix configuration directo-
+ ries; these directories belong to additional Postfix instances
+ that share the Postfix executable files and documentation with
+ the default Postfix instance, and that are started, stopped,
etc., together with the default Postfix instance.
<b><a href="postconf.5.html#multi_instance_wrapper">multi_instance_wrapper</a> (empty)</b>
- The pathname of a multi-instance manager command that the <a href="postfix.1.html"><b>post-</b></a>
- <a href="postfix.1.html"><b>fix</b>(1)</a> command invokes when the <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a>
+ The pathname of a multi-instance manager command that the <a href="postfix.1.html"><b>post-</b></a>
+ <a href="postfix.1.html"><b>fix</b>(1)</a> command invokes when the <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a>
parameter value is non-empty.
<b><a href="postconf.5.html#multi_instance_group">multi_instance_group</a> (empty)</b>
The optional instance name of this Postfix instance.
<b><a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a> (no)</b>
- Allow this Postfix instance to be started, stopped, etc., by a
+ Allow this Postfix instance to be started, stopped, etc., by a
multi-instance manager.
<b>FILES</b>
- Prior to Postfix version 2.6, all of the following files were in <b>$<a href="postconf.5.html#config_directory">con</a>-</b>
+ Prior to Postfix version 2.6, all of the following files were in <b>$<a href="postconf.5.html#config_directory">con</a>-</b>
<b><a href="postconf.5.html#config_directory">fig_directory</a></b>. Some files are now in <b>$<a href="postconf.5.html#daemon_directory">daemon_directory</a></b> so that they can
be shared among multiple instances that run the same Postfix version.
- Use the command "<b>postconf <a href="postconf.5.html#config_directory">config_directory</a></b>" or "<b>postconf <a href="postconf.5.html#daemon_directory">daemon_direc</a>-</b>
+ Use the command "<b>postconf <a href="postconf.5.html#config_directory">config_directory</a></b>" or "<b>postconf <a href="postconf.5.html#daemon_directory">daemon_direc</a>-</b>
<b><a href="postconf.5.html#daemon_directory">tory</a></b>" to expand the names into their actual values.
$<a href="postconf.5.html#config_directory">config_directory</a>/<a href="postconf.5.html">main.cf</a>, Postfix configuration parameters
$<a href="postconf.5.html#daemon_directory">daemon_directory</a>/postfix-files, file/directory permissions
$<a href="postconf.5.html#daemon_directory">daemon_directory</a>/postfix-script, administrative commands
$<a href="postconf.5.html#daemon_directory">daemon_directory</a>/post-install, post-installation configuration
+ $<a href="postconf.5.html#daemon_directory">daemon_directory</a>/dynamicmaps.cf, plug-in database clients
<b>SEE ALSO</b>
Commands:
# .IP \fBOPT=\fIoptimization_level\fR
# Specifies a non-default optimization level. The default is \fB-O\fR.
# Specify \fBOPT=\fR to turn off optimization.
+# .IP \fIinstallation_parameter\fB=\fIvalue\fR...
+# Override the compiled-in default value of the specified
+# installation parameter(s). The following parameters are
+# supported in this context:
+#
+# command_directory config_directory daemon_directory
+# data_directory default_database_type html_directory
+# mailq_path manpage_directory newaliases_path queue_directory
+# readme_directory sendmail_path shlib_directory
+#
+# See the postconf(5) manpage for a description of these
+# parameters.
+# .IP \fBSHLIB_VERSION=\fIversion\fR
+# Specifies a non-default shared-library version for Postfix
+# libraries. By default, the version equals the default value
+# for the $mail_version parameter.
# .IP \fBWARN=\fIwarning_flags\fR
# Specifies non-default gcc compiler warning options for use when
# "make" is invoked in a source subdirectory only.
FreeBSD.7*) SYSTYPE=FREEBSD7
;;
FreeBSD.8*) SYSTYPE=FREEBSD8
+ : ${SHLIB_SUFFIX=.so}
+ : ${SHLIB_CFLAGS=-fPIC}
+ : ${SHLIB_LD='gcc -shared -Wl,-soname,${LIB}'}
+ : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
+ : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
;;
FreeBSD.9*) SYSTYPE=FREEBSD9
+ : ${SHLIB_SUFFIX=.so}
+ : ${SHLIB_CFLAGS=-fPIC}
+ : ${SHLIB_LD='gcc -shared -Wl,-soname,${LIB}'}
+ : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
+ : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
;;
DragonFly.*) SYSTYPE=DRAGONFLY
;;
rm -f makedefs.test makedefs.test.[co]
fi;;
esac
+ SYSLIBS="$SYSLIBS -ldl"
+ : ${SHLIB_SUFFIX=.so}
+ : ${SHLIB_CFLAGS=-fPIC}
+ : ${SHLIB_LD='gcc -shared -Wl,-soname,${LIB}'}
+ : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
+ : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
;;
Linux.3*) SYSTYPE=LINUX3
case "$CCARGS" in
}
done
done
+ SYSLIBS="$SYSLIBS -ldl"
+ : ${SHLIB_SUFFIX=.so}
+ : ${SHLIB_CFLAGS=-fPIC}
+ : ${SHLIB_LD='gcc -shared -Wl,-soname,${LIB}'}
+ : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
+ : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
;;
GNU.0*|GNU/kFreeBSD.[567]*)
SYSTYPE=GNU0
case $RELEASE in
?.*|1[0-1].*) CCARGS="$CCARGS -DNO_KQUEUE";;
esac
+ : ${SHLIB_CFLAGS=-fPIC}
+ : ${SHLIB_SUFFIX=.dylib}
+ : ${SHLIB_LD='cc -shared -Wl,-flat_namespace -Wl,-undefined,dynamic_lookup -Wl,-install_name,@rpath/${LIB}'}
+ : ${SHLIB_RPATH='-Wl,-rpath,${SHLIB_DIR}'}
+ : ${SHLIB_ENV="DYLD_LIBRARY_PATH=`pwd`/lib"}
;;
dcosx.1*) SYSTYPE=DCOSX1
RANLIB=echo
*CC) error "Don't use CC. That's the C++ compiler";;
*) : ${OPT='-O'};;
esac
+
+# Snapshot only.
+CCARGS="$CCARGS -DSNAPSHOT"
+
+# Non-production: needs thorough testing, or major changes are still
+# needed before the code stabilizes.
+CCARGS="$CCARGS -DNONPROD"
+
+# Workaround: prepend Postfix include files before other include files.
+CCARGS="-I. -I../../include $CCARGS"
+
+# Optionally override installation-parameter default settings.
+
+command_directory_macro=DEF_COMMAND_DIR
+config_directory_macro=DEF_CONFIG_DIR
+daemon_directory_macro=DEF_DAEMON_DIR
+data_directory_macro=DEF_DATA_DIR
+mailq_path_macro=DEF_MAILQ_PATH
+newaliases_path_macro=DEF_NEWALIAS_PATH
+queue_directory_macro=DEF_QUEUE_DIR
+sendmail_path_macro=DEF_SENDMAIL_PATH
+shlib_directory_macro=DEF_SHLIB_DIR
+
+for parm_name in command_directory config_directory daemon_directory \
+ data_directory mailq_path newaliases_path \
+ queue_directory sendmail_path shlib_directory
+do
+ eval parm_val=\"\$$parm_name\"
+ eval parm_macro=\"\$${parm_name}_macro\"
+ case "$parm_val" in
+ "") ;;
+ /*) CCARGS="$CCARGS -D$parm_macro=\\\"$parm_val\\\"";;
+ *) error "$parm_name must specify an absolute path name";;
+ esac
+done
+
+html_directory_macro=DEF_HTML_DIR
+manpage_directory_macro=DEF_MANPAGE_DIR
+readme_directory_macro=DEF_README_DIR
+
+for parm_name in html_directory manpage_directory
+do
+ eval parm_val=\"\$$parm_name\"
+ eval parm_macro=\"\$${parm_name}_macro\"
+ case "$parm_val" in
+ "") ;;
+ /*|no) CCARGS="$CCARGS -D$parm_macro=\\\"$parm_val\\\"";;
+ *) error "$parm_name must specify \"no\" or an absolute path name";;
+ esac
+done
+
+default_database_type_macro=DEF_DB_TYPE
+
+for parm_name in default_database_type
+do
+ eval parm_val=\"\$$parm_name\"
+ eval parm_macro=\"\$${parm_name}_macro\"
+ case "$parm_val" in
+ "") ;;
+ *) CCARGS="$CCARGS -D$parm_macro=\\\"$parm_val\\\"";;
+ esac
+done
+
+# The following are for non-shared libsasl and libmilter builds.
+
+_AR=$AR
+_RANLIB=$RANLIB
+
+# Choose between shared and non-shared library builds.
+
+case "$shared" in
+yes)
+ if [ -z "$SHLIB_SUFFIX" ]
+ then
+ error "Shared libraries are requested, but not supported on this platform"
+ fi
+ AR=:
+ RANLIB=:
+ CCARGS="$CCARGS -DUSE_DYNAMIC_LIBS"
+
+ # Determine the shared-library installation directory.
+ case "$shlib_directory" in
+ /*) # CCARGS was already updated above.
+ ;;
+ "") trap 'rm -f makedefs.test makedefs.test.[co]' 1 2 3 15
+ sed -n '/_SHLIB_DIR/,/^$/p' src/global/mail_params.h >makedefs.test.c
+ cat >>makedefs.test.c <<'EOF'
+#include <stdlib.h>
+#include <stdio.h>
+int main(void)
+{
+ printf("%s\n", DEF_SHLIB_DIR);
+ fflush(stdout);
+ exit(ferror(stdout) ? 1 : 0);
+}
+EOF
+ eval ${CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
+ shlib_directory=`./makedefs.test` || exit 1
+ rm -f makedefs.test makedefs.test.[co]
+ ;;
+ *) # shlib_directory was already checked above.
+ error "Can't happen in $0 - $shlib_directory is not an absolute path"
+ ;;
+ esac
+
+ # Determine the shared-library version.
+ test -z "$SHLIB_VERSION" && {
+ trap 'rm -f makedefs.test makedefs.test.[co]' 1 2 3 15
+ cat >makedefs.test.c <<'EOF'
+#include <stdlib.h>
+#include <stdio.h>
+#include <mail_version.h>
+int main(void)
+{
+ printf("%s\n", DEF_MAIL_VERSION);
+ fflush(stdout);
+ exit(ferror(stdout) ? 1 : 0);
+}
+EOF
+ eval ${CC-gcc} -Isrc/global ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
+ SHLIB_VERSION=`./makedefs.test` || exit 1
+ rm -f makedefs.test makedefs.test.[co]
+ }
+ LIB_PREFIX=postfix-
+ LIB_SUFFIX=${SHLIB_SUFFIX}.${SHLIB_VERSION}
+ ;;
+
+no|"")
+ shlib_directory=no
+ CCARGS="$CCARGS -UUSE_DYNAMIC_LIBS -UDEF_SHLIB_DIR -DDEF_SHLIB_DIR=\\\"no\\\""
+ SHLIB_CFLAGS=
+ SHLIB_SUFFIX=
+ SHLIB_LD=:
+ SHLIB_RPATH=
+ SHLIB_ENV=
+ LIB_PREFIX=
+ LIB_SUFFIX=.a
+ ;;
+
+*) echo "Specify \"shared=yes\" or \"shared=no\"" 1>&2
+ exit 1
+ ;;
+esac
+
#
# "gcc -W" 3.4.2 no longer reports functions that fail to return a
# result. Use "gcc -Wall -Wno-comment" instead. We'll figure out
export SYSTYPE AR ARFL RANLIB SYSLIBS CC OPT DEBUG AWK OPTS
-# Snapshot only.
-CCARGS="$CCARGS -DSNAPSHOT"
-
-# Non-production: needs thorough testing, or major changes are still
-# needed before the code stabilizes.
-#CCARGS="$CCARGS -DNONPROD"
-
-# Workaround: prepend Postfix include files before other include files.
-CCARGS="-I. -I../../include $CCARGS"
sed 's/ / /g' <<EOF
SYSTYPE = $SYSTYPE
+_AR = $_AR
AR = $AR
ARFL = $ARFL
+_RANLIB = $_RANLIB
RANLIB = $RANLIB
SYSLIBS = $AUXLIBS $SYSLIBS
CC = $CC $CCARGS
STRCASE = $STRCASE
EXPORT = AUXLIBS='$AUXLIBS' CCARGS='$CCARGS' OPT='$OPT' DEBUG='$DEBUG'
WARN = $WARN
+LIB_PREFIX = $LIB_PREFIX
+LIB_SUFFIX = $LIB_SUFFIX
+SHLIB_CFLAGS = $SHLIB_CFLAGS
+SHLIB_DIR = $shlib_directory
+SHLIB_ENV = $SHLIB_ENV
+SHLIB_LD = $SHLIB_LD
+SHLIB_RPATH = $SHLIB_RPATH
EOF
.fi
The following \fBmain.cf\fR configuration parameters are
exported as environment variables with the same names:
+.IP "\fBconfig_directory (see 'postconf -d' output)\fR"
+The default location of the Postfix main.cf and master.cf
+configuration files.
.IP "\fBcommand_directory (see 'postconf -d' output)\fR"
The location of all postfix administrative commands.
.IP "\fBdaemon_directory (see 'postconf -d' output)\fR"
The directory with Postfix support programs and daemon programs.
-.IP "\fBconfig_directory (see 'postconf -d' output)\fR"
-The default location of the Postfix main.cf and master.cf
-configuration files.
-.IP "\fBqueue_directory (see 'postconf -d' output)\fR"
-The location of the Postfix top-level queue directory.
+.IP "\fBhtml_directory (see 'postconf -d' output)\fR"
+The location of Postfix HTML files that describe how to build,
+configure or operate a specific Postfix subsystem or feature.
.IP "\fBmail_owner (postfix)\fR"
The UNIX system account that owns the Postfix queue and most Postfix
daemon processes.
-.IP "\fBsetgid_group (postdrop)\fR"
-The group ownership of set-gid Postfix commands and of group-writable
-Postfix directories.
-.IP "\fBsendmail_path (see 'postconf -d' output)\fR"
-A Sendmail compatibility feature that specifies the location of
-the Postfix \fBsendmail\fR(1) command.
-.IP "\fBnewaliases_path (see 'postconf -d' output)\fR"
-Sendmail compatibility feature that specifies the location of the
-\fBnewaliases\fR(1) command.
.IP "\fBmailq_path (see 'postconf -d' output)\fR"
Sendmail compatibility feature that specifies where the Postfix
\fBmailq\fR(1) command is installed.
-.IP "\fBhtml_directory (see 'postconf -d' output)\fR"
-The location of Postfix HTML files that describe how to build,
-configure or operate a specific Postfix subsystem or feature.
.IP "\fBmanpage_directory (see 'postconf -d' output)\fR"
Where the Postfix manual pages are installed.
+.IP "\fBnewaliases_path (see 'postconf -d' output)\fR"
+Sendmail compatibility feature that specifies the location of the
+\fBnewaliases\fR(1) command.
+.IP "\fBqueue_directory (see 'postconf -d' output)\fR"
+The location of the Postfix top-level queue directory.
.IP "\fBreadme_directory (see 'postconf -d' output)\fR"
The location of Postfix README files that describe how to build,
configure or operate a specific Postfix subsystem or feature.
+.IP "\fBsendmail_path (see 'postconf -d' output)\fR"
+A Sendmail compatibility feature that specifies the location of
+the Postfix \fBsendmail\fR(1) command.
+.IP "\fBsetgid_group (postdrop)\fR"
+The group ownership of set-gid Postfix commands and of group-writable
+Postfix directories.
.PP
Available in Postfix version 2.5 and later:
.IP "\fBdata_directory (see 'postconf -d' output)\fR"
The directory with Postfix-writable data files (for example:
caches, pseudo-random numbers).
.PP
+Available in Postfix version 2.12 and later:
+.IP "\fBshlib_directory (see 'postconf -d' output)\fR"
+The location of Postfix shared libraries (libpostfix-*.so.*).
+.PP
Other configuration parameters:
-.IP "\fBconfig_directory (see 'postconf -d' output)\fR"
-The default location of the Postfix main.cf and master.cf
-configuration files.
.IP "\fBimport_environment (see 'postconf -d' output)\fR"
The list of environment parameters that a Postfix process will
import from a non-Postfix parent process.
$daemon_directory/postfix-files, file/directory permissions
$daemon_directory/postfix-script, administrative commands
$daemon_directory/post-install, post-installation configuration
+$daemon_directory/dynamicmaps.cf, plug-in database clients
.SH "SEE ALSO"
.na
.nf
Postfix directories. When this parameter value is changed you need
to re-run "\fBpostfix set-permissions\fR" (with Postfix version 2.0 and
earlier: "\fB/etc/postfix/post-install set-permissions\fR".
+.SH shlib_directory (default: see 'postconf -d' output)
+The location of Postfix shared libraries (libpostfix-*.so.*).
+This parameter defaults to "no" when Postfix shared libraries are
+disabled at compile time.
+.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"
responses. The extra detail makes trouble shooting easier but also
s;\bsendmail_fix_line_endings\b;<a href="postconf.5.html#sendmail_fix_line_endings">$&</a>;g;
s;\bservice_throttle_time\b;<a href="postconf.5.html#service_throttle_time">$&</a>;g;
s;\bsetgid_group\b;<a href="postconf.5.html#setgid_group">$&</a>;g;
+ s;\bshlib_directory\b;<a href="postconf.5.html#shlib_directory">$&</a>;g;
s;\bconnection_cache_service_name\b;<a href="postconf.5.html#connection_cache_service_name">$&</a>;g;
s;\bconnection_cache_status_update_time\b;<a href="postconf.5.html#connection_cache_status_update_time">$&</a>;g;
# .IP readme_directory
# The final destination directory for the Postfix README files.
# This parameter setting is recorded in the installed main.cf file.
+# .IP shlib_directory
+# The final destination directory for Postfix shared-library files.
+# The built-in default value is specified at compile time.
+# If you change this at installation time, then you should specify
+# only "standard" system directories. Otherwise, additional
+# configuration will be required with ldconfig(1) or equivalent.
# SEE ALSO
# post-install(1) post-installation procedure
# FILES
html_directory_prompt="the final destination directory for the Postfix
HTML files. Specify \"no\" if you do not want to install these files."
+shlib_directory_prompt="the final destination directory for Postfix shared-library files."
+
# Default settings, just to get started.
: ${install_root=/}
}
CONFIG_PARAMS="command_directory daemon_directory data_directory \
-html_directory mail_owner mailq_path manpage_directory newaliases_path \
-queue_directory readme_directory sendmail_path setgid_group"
+html_directory mail_owner mailq_path manpage_directory newaliases_path \
+queue_directory readme_directory sendmail_path setgid_group shlib_directory"
# Extract parameter settings from the installed main.cf file.
exit 1;;
esac
-for path in "$html_directory" "$readme_directory"
+for path in "$html_directory" "$readme_directory" "$shlib_directory"
do
case "$path" in
/*) ;;
done
for path in command_directory config_directory daemon_directory data_directory \
- manpage_directory queue_directory html_directory readme_directory
+ manpage_directory queue_directory shlib_directory html_directory \
+ readme_directory
do
- eval test -f $install_root\$$path && {
+ case "$path" in
+ no) ;;
+ *) eval test -f $install_root\$$path && {
echo $0: Error: \"$path\" specifies a regular file. 1>&2
exit 1
- }
+ };;
+ esac
done
test -d $tempdir || mkdir -p $tempdir || exit 1
HTML_DIRECTORY=$install_root$html_directory
MANPAGE_DIRECTORY=$install_root$manpage_directory
README_DIRECTORY=$install_root$readme_directory
+SHLIB_DIRECTORY=$install_root$shlib_directory
# Avoid repeated tests for existence of these; default permissions suffice.
test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1
test -d $COMMAND_DIRECTORY || mkdir -p $COMMAND_DIRECTORY || exit 1
-test -d $COMMAND_DIRECTORY || mkdir -p $COMMAND_DIRECTORY || exit 1
+test -d $QUEUE_DIRECTORY || mkdir -p $QUEUE_DIRECTORY || exit 1
+test "$shlib_directory" = "no" -o -d $SHLIB_DIRECTORY ||
+ mkdir -p $SHLIB_DIRECTORY || exit 1
test "$html_directory" = "no" -o -d $HTML_DIRECTORY ||
mkdir -p $HTML_DIRECTORY || exit 1
test "$readme_directory" = "no" -o -d $README_DIRECTORY ||
f) echo $path | (IFS=/ read prefix file; IFS="$BACKUP_IFS"
case $prefix in
+ '$shlib_directory')
+ compare_or_replace $mode "$owner" "$group" lib/$file \
+ $SHLIB_DIRECTORY/$file || exit 1;;
'$daemon_directory')
compare_or_replace $mode "$owner" "$group" libexec/$file \
$DAEMON_DIRECTORY/$file || exit 1;;
"manpage_directory = $manpage_directory" \
"sample_directory = $sample_directory" \
"readme_directory = $readme_directory" \
+ "shlib_directory = $shlib_directory" \
|| exit 1
# If Postfix is being installed locally from source code, do the
<p> and so on. In some cases, optimization is turned off automatically. </p>
-<h3>4.3 - Building with optional features</h3>
+<h3>4.3 - Building with Postfix shared libraries (Postfix ≥ 2.12) </h3>
+
+<p> Postfix can be built with Postfix shared libraries (files named
+<tt>libpostfix-*.so.*</tt>). These files are needed to dynamically
+load Postfix database clients with the Debian-style dynamicmaps.cf
+feature. Postfix shared libraries add minor run-time overhead and
+result in smaller Postfix executable files. </p>
+
+<p> Although Debian-style dynamicmaps.cf support is functional, it
+is not yet used. Postfix database clients are still built into the
+Postfix library files. Postfix database clients may become plugins
+at some later point in time. </p>
+
+<p> Postfix shared-library support is evolving. Support exists for
+Linux, FreeBSD and MacOS X. Shared-library builds will become the
+default once the build system stops changing. </p>
+
+<p> For now, specify "shared=yes" on the "make makefiles"
+command line to build Postfix with shared-library support. </p>
+
+<blockquote>
+<pre>
+$ make makefiles shared=yes ...other arguments...
+$ make makefiles shared=no ...other arguments...
+$ make
+</pre>
+</blockquote>
+
+<h3>4.4 - Building with optional features</h3>
By default, Postfix builds as a mail system with relatively few
bells and whistles. Support for third-party databases etc.
systems that have IPv6 support. See the IPV6_README file for details.
</p>
-<h3>4.4 - Overriding built-in parameter default settings</h3>
+<h3>4.5 - Overriding built-in parameter default settings</h3>
+
+<h4>4.5.1 - Postfix 2.12 and later </h4>
+
+<p> All Postfix configuration parameters can be changed by editing
+a Postfix configuration file, except for one: the parameter that
+specifies the location of Postfix configuration files. In order to
+build Postfix with a configuration directory other than /etc/postfix,
+use: </p>
+
+<blockquote>
+<pre>
+$ make makefiles config_directory=/some/where ...other arguments...
+$ make
+</pre>
+</blockquote>
+
+<p> Parameters whose defaults can be specified in this way are
+listed below. See the postconf(5) manpage for a description
+(command: "<tt>nroff -man man/man5/postconf.5 | less</tt>"). </p>
+
+<blockquote>
+
+<table border="1">
+
+<tr> <th>parameter name</th> <th>typical default</th> </tr>
+
+<tr> <td>command_directory</td> <td>/usr/sbin</td> </tr>
+
+<tr> <td>config_directory</td> <td>/etc/postfix</td> </tr>
+
+<tr> <td>default_database_type</td> <td>hash</td> </tr>
+
+<tr> <td>daemon_directory</td> <td>/usr/libexec/postfix</td> </tr>
+
+<tr> <td>data_directory</td> <td>/var/lib/postfix</td> </tr>
+
+<tr> <td>html_directory</td> <td>no</td> </tr>
+
+<tr> <td>mailq_path</td> <td>/usr/bin/mailq</td> </tr>
+
+<tr> <td>manpage_directory</td> <td>/usr/local/man</td> </tr>
+
+<tr> <td>newaliases_path</td> <td>/usr/bin/newaliases</td> </tr>
+
+<tr> <td>queue_directory</td> <td>/var/spool/postfix</td> </tr>
+
+<tr> <td>readme_directory</td> <td>no</td> </tr>
+
+<tr> <td>sendmail_path</td> <td>/usr/sbin/sendmail</td> </tr>
+
+<tr> <td>shlib_directory</td> <td>/usr/local/lib</td> </tr>
+
+</table>
+
+</blockquote>
+
+<h4>4.5.2 - All Postfix versions </h4>
<p> All Postfix configuration parameters can be changed by editing
a Postfix configuration file, except for one: the parameter that
<p> IMPORTANT: Be sure to get the quotes right. These details matter
a lot. </p>
-<p> Parameters whose defaults can be specified in this way are: </p>
+<p> Parameters whose defaults can be specified in this way are
+listed below. See the postconf(5) manpage for a description
+(command: "<tt>nroff -man man/man5/postconf.5 | less</tt>"). </p>
<blockquote>
<p> Note: the data_directory parameter (for caches and pseudo-random
numbers) was introduced with Postfix version 2.5. </p>
-<h3>4.5 - Overriding other compile-time features</h3>
+<h3>4.6 - Overriding other compile-time features</h3>
<p> The general method to override Postfix compile-time features
is as follows: </p>
DB support. By default, Berkeley DB support is compiled in on
platforms that are known to support this feature. If you override
this, then you probably should also override DEF_DB_TYPE as described
-in section 4.4. </td> </tr>
+in section 4.5. </td> </tr>
<tr> <td> </td> <td> -DNO_DEVPOLL </td> <td> Do not build with
Solaris <tt>/dev/poll</tt> support. By default, <tt>/dev/poll</tt>
a non-default optimization level. The default is -O. Specify OPT=
to turn off optimization. </td> </tr>
+<tr> <td colspan="2"> SHLIB_VERSION=version </td> <td> Specifies a
+non-default Postfix shared-library version number. The default is
+to use the Postfix version: X.Y.Z for stable releases, X.Y-DATE for
+snapshot releases, X.Y-DATE-nonprod for non-production releases.
+</td> </tr>
+
<tr> <td colspan="2"> WARN="warning_flags..." </td> <td> Specifies
non-default <tt>gcc</tt> compiler warning options for use when
"<tt>make</tt>" is invoked in a source subdirectory only. </td>
</table>
-<h3>4.6 - Support for thousands of processes</h3>
+<h3>4.7 - Support for thousands of processes</h3>
<p> The number of connections that Postfix can manage simultaneously
is limited by the number of processes that it can run. This number
See the TUNING_README guide for examples of how to increase the
number of open sockets or files. </p>
-<h3>4.7 - Compiling Postfix, at last</h3>
+<h3>4.8 - Compiling Postfix, at last</h3>
<p> If the command </p>
<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
<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>
<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
MAN = ../man/man5/postconf.5
+TOP = ../INSTALL
+
AWK = awk '{ print; if (NR == 1) print ".pl 9999\n.ll 65" }'
SRCTOMAN= ../mantools/srctoman
POSTLINK= ../mantools/postlink
MAKESOHO= ../mantools/make_soho_readme
DEPSOHO = SASL_README.html STANDARD_CONFIGURATION_README.html
-update: $(CONFIG) $(HTML) $(README) $(MAN)
+update: $(CONFIG) $(HTML) $(README) $(MAN) $(TOP)
clean:
:
(cat postconf.html.prolog; ../mantools/xpostconf postconf.proto | \
../mantools/postconf2html | ../mantools/postlink; \
cat postconf.html.epilog ) | $(DETAB) > $@
+
+../INSTALL: ../README_FILES/INSTALL
+ rm -f $@
+ col -b < $? > $@
<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
<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
stress=
<b>Postfix version 2.9 and later:</b>
ccert_pubkey_fingerprint=68:B3:29:DA:98:93:E3:40:99:C7:D8:AD:5C:B9:C9:40
+<b>Postfix version 2.12 and later:</b>
+client_port=1234
[empty line]
</pre>
</blockquote>
<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>
deliveries. See default_delivery_status_filter for details. </p>
<p> This feature is available in Postfix 2.12 and later. </p>
+
+%PARAM shlib_directory see 'postconf -d' output
+
+<p> The location of Postfix shared libraries (libpostfix-*.so.*).
+This parameter defaults to "no" when Postfix shared libraries are
+disabled at compile time. </p>
+
+<p> This feature is available in Postfix 2.12 and later. </p>
TESTPROG=
PROG = anvil
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
PROG = bounce
SAMPLES = ../../conf/bounce.cf.default
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
all: $(PROG) ../../conf/bounce.cf.default
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
# Eliminate dependency on installed Postfix.
../../conf/bounce.cf.default: template_test.ref annotate.sh
TESTPROG= cleanup_masquerade cleanup_milter
PROG = cleanup
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libmilter.a ../../lib/libglobal.a \
- ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/libmilter.a \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
cleanup_masquerade_test: cleanup_masquerade cleanup_masq.ref
rm -f cleanup_masq.tmp
- ./cleanup_masquerade '' a.b.c,b.c xxx@aa.a.b.c >>cleanup_masq.tmp
- ./cleanup_masquerade 'xxx' a.b.c,b.c xxx@aa.a.b.c >>cleanup_masq.tmp
- ./cleanup_masquerade 'yyy' a.b.c,b.c xxx@aa.a.b.c >>cleanup_masq.tmp
- ./cleanup_masquerade '' !a.b.c,b.c xxx@aa.a.b.c >>cleanup_masq.tmp
- ./cleanup_masquerade '' a.b.c,b.c xxx@a.b.c >>cleanup_masq.tmp
- ./cleanup_masquerade '' !a.b.c,b.c xxx@a.b.c >>cleanup_masq.tmp
- ./cleanup_masquerade '' a.b.c,b.c xxx@aaa.b.c >>cleanup_masq.tmp
- ./cleanup_masquerade '' a.b.c,b.c xxx@b.c >>cleanup_masq.tmp
- ./cleanup_masquerade 'fail:whatever' xy xxx@b.c >>cleanup_masq.tmp
+ $(SHLIB_ENV) ./cleanup_masquerade '' a.b.c,b.c xxx@aa.a.b.c >>cleanup_masq.tmp
+ $(SHLIB_ENV) ./cleanup_masquerade 'xxx' a.b.c,b.c xxx@aa.a.b.c >>cleanup_masq.tmp
+ $(SHLIB_ENV) ./cleanup_masquerade 'yyy' a.b.c,b.c xxx@aa.a.b.c >>cleanup_masq.tmp
+ $(SHLIB_ENV) ./cleanup_masquerade '' !a.b.c,b.c xxx@aa.a.b.c >>cleanup_masq.tmp
+ $(SHLIB_ENV) ./cleanup_masquerade '' a.b.c,b.c xxx@a.b.c >>cleanup_masq.tmp
+ $(SHLIB_ENV) ./cleanup_masquerade '' !a.b.c,b.c xxx@a.b.c >>cleanup_masq.tmp
+ $(SHLIB_ENV) ./cleanup_masquerade '' a.b.c,b.c xxx@aaa.b.c >>cleanup_masq.tmp
+ $(SHLIB_ENV) ./cleanup_masquerade '' a.b.c,b.c xxx@b.c >>cleanup_masq.tmp
+ $(SHLIB_ENV) ./cleanup_masquerade 'fail:whatever' xy xxx@b.c >>cleanup_masq.tmp
diff cleanup_masq.ref cleanup_masq.tmp
rm -f cleanup_masq.tmp
../postcat/postcat
cp bug1.file bug1.file.tmp
chmod u+w bug1.file.tmp
- ./cleanup_milter <bug1.in
- ../postcat/postcat -ov bug1.file.tmp 2>/dev/null >bug1.tmp
+ $(SHLIB_ENV) ./cleanup_milter <bug1.in
+ $(SHLIB_ENV) ../postcat/postcat -ov bug1.file.tmp 2>/dev/null >bug1.tmp
diff bug1.ref bug1.tmp
- ../postcat/postcat bug1.file.tmp 2>/dev/null >bug1.tmp
+ $(SHLIB_ENV) ../postcat/postcat bug1.file.tmp 2>/dev/null >bug1.tmp
diff bug1.text.ref bug1.tmp
rm -f bug1.file.tmp bug1.tmp
../postcat/postcat
cp bug2.file bug2.file.tmp
chmod u+w bug2.file.tmp
- ./cleanup_milter <bug2.in
- ../postcat/postcat -ov bug2.file.tmp 2>/dev/null >bug2.tmp
+ $(SHLIB_ENV) ./cleanup_milter <bug2.in
+ $(SHLIB_ENV) ../postcat/postcat -ov bug2.file.tmp 2>/dev/null >bug2.tmp
diff bug2.ref bug2.tmp
- ../postcat/postcat bug2.file.tmp 2>/dev/null >bug2.tmp
+ $(SHLIB_ENV) ../postcat/postcat bug2.file.tmp 2>/dev/null >bug2.tmp
diff bug2.text.ref bug2.tmp
rm -f bug2.file.tmp bug2.tmp
../postcat/postcat
cp bug3.file bug3.file.tmp
chmod u+w bug3.file.tmp
- ./cleanup_milter <bug3.in
- ../postcat/postcat -ov bug3.file.tmp 2>/dev/null >bug3.tmp
+ $(SHLIB_ENV) ./cleanup_milter <bug3.in
+ $(SHLIB_ENV) ../postcat/postcat -ov bug3.file.tmp 2>/dev/null >bug3.tmp
diff bug3.ref bug3.tmp
- ../postcat/postcat bug3.file.tmp 2>/dev/null >bug3.tmp
+ $(SHLIB_ENV) ../postcat/postcat bug3.file.tmp 2>/dev/null >bug3.tmp
diff bug3.text.ref bug3.tmp
rm -f bug3.file.tmp bug3.tmp
cleanup_milter.ref1 ../postcat/postcat
cp test-queue-file test-queue-file.tmp
chmod u+w test-queue-file.tmp
- ./cleanup_milter <cleanup_milter.in1
- ../postcat/postcat -ov test-queue-file.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in1
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref1 cleanup_milter.tmp
rm -f test-queue-file.tmp cleanup_milter.tmp
cleanup_milter.ref2 ../postcat/postcat
cp test-queue-file2 test-queue-file2.tmp
chmod u+w test-queue-file2.tmp
- ./cleanup_milter <cleanup_milter.in2
- ../postcat/postcat -ov test-queue-file2.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file2.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref2 cleanup_milter.tmp
rm -f test-queue-file2.tmp cleanup_milter.tmp
cleanup_milter.ref3 ../postcat/postcat
cp test-queue-file3 test-queue-file3.tmp
chmod u+w test-queue-file3.tmp
- ./cleanup_milter <cleanup_milter.in3
- ../postcat/postcat -ov test-queue-file3.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in3
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file3.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref3 cleanup_milter.tmp
rm -f test-queue-file3.tmp cleanup_milter.tmp
test-queue-file4 ../postcat/postcat
cp test-queue-file4 test-queue-file4.tmp
chmod u+w test-queue-file4.tmp
- ./cleanup_milter <cleanup_milter.in4a
- ../postcat/postcat -ov test-queue-file4.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in4a
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file4.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref4 cleanup_milter.tmp
cp test-queue-file4 test-queue-file4.tmp
chmod u+w test-queue-file4.tmp
- ./cleanup_milter <cleanup_milter.in4b
- ../postcat/postcat -ov test-queue-file4.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in4b
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file4.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref4 cleanup_milter.tmp
cp test-queue-file4 test-queue-file4.tmp
chmod u+w test-queue-file4.tmp
- ./cleanup_milter <cleanup_milter.in4c
- ../postcat/postcat -ov test-queue-file4.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in4c
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file4.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref4 cleanup_milter.tmp
rm -f test-queue-file4.tmp cleanup_milter.tmp
cleanup_milter.ref5 ../postcat/postcat
cp test-queue-file5 test-queue-file5.tmp
chmod u+w test-queue-file5.tmp
- ./cleanup_milter <cleanup_milter.in5
- ../postcat/postcat -ov test-queue-file5.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in5
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file5.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref5 cleanup_milter.tmp
rm -f test-queue-file5.tmp cleanup_milter.tmp
cleanup_milter.ref6a test-queue-file6 ../postcat/postcat
cp test-queue-file6 test-queue-file6.tmp
chmod u+w test-queue-file6.tmp
- ./cleanup_milter <cleanup_milter.in6a
- ../postcat/postcat -ov test-queue-file6.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in6a
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file6.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref6a cleanup_milter.tmp
rm -f test-queue-file6.tmp cleanup_milter.tmp
cleanup_milter.ref6b ../postcat/postcat
cp test-queue-file6 test-queue-file6.tmp
chmod u+w test-queue-file6.tmp
- ./cleanup_milter <cleanup_milter.in6b
- ../postcat/postcat -ov test-queue-file6.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in6b
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file6.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref6b cleanup_milter.tmp
rm -f test-queue-file6.tmp cleanup_milter.tmp
cleanup_milter.ref6c ../postcat/postcat
cp test-queue-file6 test-queue-file6.tmp
chmod u+w test-queue-file6.tmp
- ./cleanup_milter <cleanup_milter.in6c
- ../postcat/postcat -ov test-queue-file6.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in6c
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file6.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref6c cleanup_milter.tmp
rm -f test-queue-file6.tmp cleanup_milter.tmp
cleanup_milter.ref7 ../postcat/postcat
cp test-queue-file7 test-queue-file7.tmp
chmod u+w test-queue-file7.tmp
- ./cleanup_milter <cleanup_milter.in7
- ../postcat/postcat -ov test-queue-file7.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in7
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file7.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref7 cleanup_milter.tmp
rm -f test-queue-file7.tmp cleanup_milter.tmp
cleanup_milter.ref8 ../postcat/postcat
cp test-queue-file8 test-queue-file8.tmp
chmod u+w test-queue-file8.tmp
- ./cleanup_milter <cleanup_milter.in8
- ../postcat/postcat -ov test-queue-file8.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in8
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file8.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref8 cleanup_milter.tmp
rm -f test-queue-file8.tmp cleanup_milter.tmp
cleanup_milter.ref9 ../postcat/postcat
cp test-queue-file9 test-queue-file9.tmp
chmod u+w test-queue-file9.tmp
- ./cleanup_milter <cleanup_milter.in9
- ../postcat/postcat -ov test-queue-file9.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in9
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file9.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref9 cleanup_milter.tmp
rm -f test-queue-file9.tmp cleanup_milter.tmp
cleanup_milter.ref10a ../postcat/postcat
cp test-queue-file10 test-queue-file10.tmp
chmod u+w test-queue-file10.tmp
- ./cleanup_milter <cleanup_milter.in10a
- ../postcat/postcat -ov test-queue-file10.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in10a
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file10.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref10a cleanup_milter.tmp
rm -f test-queue-file10.tmp cleanup_milter.tmp
cleanup_milter.ref10b ../postcat/postcat
cp test-queue-file10 test-queue-file10.tmp
chmod u+w test-queue-file10.tmp
- ./cleanup_milter <cleanup_milter.in10b
- ../postcat/postcat -ov test-queue-file10.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in10b
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file10.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref10b cleanup_milter.tmp
rm -f test-queue-file10.tmp cleanup_milter.tmp
cleanup_milter.ref10c ../postcat/postcat
cp test-queue-file10 test-queue-file10.tmp
chmod u+w test-queue-file10.tmp
- ./cleanup_milter <cleanup_milter.in10c
- ../postcat/postcat -ov test-queue-file10.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in10c
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file10.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref10c cleanup_milter.tmp
rm -f test-queue-file10.tmp cleanup_milter.tmp
cleanup_milter.ref10d ../postcat/postcat
cp test-queue-file10 test-queue-file10.tmp
chmod u+w test-queue-file10.tmp
- ./cleanup_milter <cleanup_milter.in10d
- ../postcat/postcat -ov test-queue-file10.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in10d
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file10.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref10d cleanup_milter.tmp
rm -f test-queue-file10.tmp cleanup_milter.tmp
cleanup_milter.ref10e ../postcat/postcat
cp test-queue-file10 test-queue-file10.tmp
chmod u+w test-queue-file10.tmp
- ./cleanup_milter <cleanup_milter.in10e
- ../postcat/postcat -ov test-queue-file10.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in10e
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file10.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref10e cleanup_milter.tmp
rm -f test-queue-file10.tmp cleanup_milter.tmp
cleanup_milter.ref11 ../postcat/postcat
cp test-queue-file11 test-queue-file11.tmp
chmod u+w test-queue-file11.tmp
- ./cleanup_milter <cleanup_milter.in11
- ../postcat/postcat -ov test-queue-file11.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in11
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file11.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref11 cleanup_milter.tmp
rm -f test-queue-file11.tmp cleanup_milter.tmp
cleanup_milter.ref12 ../postcat/postcat
cp test-queue-file12 test-queue-file12.tmp
chmod u+w test-queue-file12.tmp
- ./cleanup_milter <cleanup_milter.in12
- ../postcat/postcat -ov test-queue-file12.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in12
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file12.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref12 cleanup_milter.tmp
rm -f test-queue-file12.tmp cleanup_milter.tmp
cleanup_milter.ref13a ../postcat/postcat
cp test-queue-file13a test-queue-file13a.tmp
chmod u+w test-queue-file13a.tmp
- ./cleanup_milter <cleanup_milter.in13a
- ../postcat/postcat -ov test-queue-file13a.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in13a
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file13a.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref13a cleanup_milter.tmp
rm -f test-queue-file13a.tmp cleanup_milter.tmp
cleanup_milter.ref13b ../postcat/postcat
cp test-queue-file13b test-queue-file13b.tmp
chmod u+w test-queue-file13b.tmp
- ./cleanup_milter <cleanup_milter.in13b
- ../postcat/postcat -ov test-queue-file13b.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in13b
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file13b.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref13b cleanup_milter.tmp
rm -f test-queue-file13b.tmp cleanup_milter.tmp
cleanup_milter.ref13c ../postcat/postcat
cp test-queue-file13c test-queue-file13c.tmp
chmod u+w test-queue-file13c.tmp
- ./cleanup_milter <cleanup_milter.in13c
- ../postcat/postcat -ov test-queue-file13c.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in13c
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file13c.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref13c cleanup_milter.tmp
rm -f test-queue-file13c.tmp cleanup_milter.tmp
cleanup_milter.ref13d ../postcat/postcat
cp test-queue-file13d test-queue-file13d.tmp
chmod u+w test-queue-file13d.tmp
- ./cleanup_milter <cleanup_milter.in13d
- ../postcat/postcat -ov test-queue-file13d.tmp 2>/dev/null >cleanup_milter.tmp
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in13d
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file13d.tmp 2>/dev/null >cleanup_milter.tmp
diff cleanup_milter.ref13d cleanup_milter.tmp
rm -f test-queue-file13d.tmp cleanup_milter.tmp
cleanup_milter.ref14a1 ../postcat/postcat cleanup_milter.ref14a2
cp test-queue-file14 test-queue-file14a.tmp
chmod u+w test-queue-file14a.tmp
- ./cleanup_milter <cleanup_milter.in14a 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in14a 2>cleanup_milter.tmp1
diff cleanup_milter.ref14a1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file14a.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file14a.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref14a2 cleanup_milter.tmp2
rm -f test-queue-file14a.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref14b1 ../postcat/postcat cleanup_milter.ref14b2
cp test-queue-file14 test-queue-file14b.tmp
chmod u+w test-queue-file14b.tmp
- ./cleanup_milter <cleanup_milter.in14b 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in14b 2>cleanup_milter.tmp1
diff cleanup_milter.ref14b1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file14b.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file14b.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref14b2 cleanup_milter.tmp2
rm -f test-queue-file14b.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref14c1 ../postcat/postcat cleanup_milter.ref14c2
cp test-queue-file14 test-queue-file14c.tmp
chmod u+w test-queue-file14c.tmp
- ./cleanup_milter <cleanup_milter.in14c 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in14c 2>cleanup_milter.tmp1
diff cleanup_milter.ref14c1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file14c.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file14c.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref14c2 cleanup_milter.tmp2
rm -f test-queue-file14c.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref14d1 ../postcat/postcat cleanup_milter.ref14d2
cp test-queue-file14 test-queue-file14d.tmp
chmod u+w test-queue-file14d.tmp
- ./cleanup_milter <cleanup_milter.in14d 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in14d 2>cleanup_milter.tmp1
diff cleanup_milter.ref14d1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file14d.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file14d.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref14d2 cleanup_milter.tmp2
rm -f test-queue-file14d.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref14e1 ../postcat/postcat cleanup_milter.ref14e2
cp test-queue-file14 test-queue-file14e.tmp
chmod u+w test-queue-file14e.tmp
- ./cleanup_milter <cleanup_milter.in14e 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in14e 2>cleanup_milter.tmp1
diff cleanup_milter.ref14e1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file14e.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file14e.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref14e2 cleanup_milter.tmp2
rm -f test-queue-file14e.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref14f1 ../postcat/postcat cleanup_milter.ref14f2
cp test-queue-file14 test-queue-file14f.tmp
chmod u+w test-queue-file14f.tmp
- ./cleanup_milter <cleanup_milter.in14f 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in14f 2>cleanup_milter.tmp1
diff cleanup_milter.ref14f1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file14f.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file14f.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref14f2 cleanup_milter.tmp2
rm -f test-queue-file14f.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref14g1 ../postcat/postcat cleanup_milter.ref14g2
cp test-queue-file14 test-queue-file14g.tmp
chmod u+w test-queue-file14g.tmp
- ./cleanup_milter <cleanup_milter.in14g 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in14g 2>cleanup_milter.tmp1
diff cleanup_milter.ref14g1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file14g.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file14g.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref14g2 cleanup_milter.tmp2
rm -f test-queue-file14g.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref15a1 ../postcat/postcat cleanup_milter.ref15a2
cp test-queue-file15 test-queue-file15a.tmp
chmod u+w test-queue-file15a.tmp
- ./cleanup_milter <cleanup_milter.in15a 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in15a 2>cleanup_milter.tmp1
diff cleanup_milter.ref15a1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file15a.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file15a.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref15a2 cleanup_milter.tmp2
rm -f test-queue-file15a.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref15b1 ../postcat/postcat cleanup_milter.ref15b2
cp test-queue-file15 test-queue-file15b.tmp
chmod u+w test-queue-file15b.tmp
- ./cleanup_milter <cleanup_milter.in15b 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in15b 2>cleanup_milter.tmp1
diff cleanup_milter.ref15b1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file15b.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file15b.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref15b2 cleanup_milter.tmp2
rm -f test-queue-file15b.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref15c1 ../postcat/postcat cleanup_milter.ref15c2
cp test-queue-file15 test-queue-file15c.tmp
chmod u+w test-queue-file15c.tmp
- ./cleanup_milter <cleanup_milter.in15c 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in15c 2>cleanup_milter.tmp1
diff cleanup_milter.ref15c1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file15c.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file15c.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref15c2 cleanup_milter.tmp2
rm -f test-queue-file15c.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref15d1 ../postcat/postcat cleanup_milter.ref15d2
cp test-queue-file15 test-queue-file15d.tmp
chmod u+w test-queue-file15d.tmp
- ./cleanup_milter <cleanup_milter.in15d 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in15d 2>cleanup_milter.tmp1
diff cleanup_milter.ref15d1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file15d.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file15d.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref15d2 cleanup_milter.tmp2
rm -f test-queue-file15d.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref15e1 ../postcat/postcat cleanup_milter.ref15e2
cp test-queue-file15 test-queue-file15e.tmp
chmod u+w test-queue-file15e.tmp
- ./cleanup_milter <cleanup_milter.in15e 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in15e 2>cleanup_milter.tmp1
diff cleanup_milter.ref15e1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file15e.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file15e.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref15e2 cleanup_milter.tmp2
rm -f test-queue-file15e.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref15f1 ../postcat/postcat cleanup_milter.ref15f2
cp test-queue-file15 test-queue-file15f.tmp
chmod u+w test-queue-file15f.tmp
- ./cleanup_milter <cleanup_milter.in15f 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in15f 2>cleanup_milter.tmp1
diff cleanup_milter.ref15f1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file15f.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file15f.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref15f2 cleanup_milter.tmp2
rm -f test-queue-file15f.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref15g1 ../postcat/postcat cleanup_milter.ref15g2
cp test-queue-file15 test-queue-file15g.tmp
chmod u+w test-queue-file15g.tmp
- ./cleanup_milter <cleanup_milter.in15g 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in15g 2>cleanup_milter.tmp1
diff cleanup_milter.ref15g1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file15g.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file15g.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref15g2 cleanup_milter.tmp2
rm -f test-queue-file15g.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref15h1 ../postcat/postcat cleanup_milter.ref15h2
cp test-queue-file15 test-queue-file15h.tmp
chmod u+w test-queue-file15h.tmp
- ./cleanup_milter <cleanup_milter.in15h 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in15h 2>cleanup_milter.tmp1
diff cleanup_milter.ref15h1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file15h.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file15h.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref15h2 cleanup_milter.tmp2
rm -f test-queue-file15h.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
cleanup_milter.ref15i1 ../postcat/postcat cleanup_milter.ref15i2
cp test-queue-file15 test-queue-file15i.tmp
chmod u+w test-queue-file15i.tmp
- ./cleanup_milter <cleanup_milter.in15i 2>cleanup_milter.tmp1
+ $(SHLIB_ENV) ./cleanup_milter <cleanup_milter.in15i 2>cleanup_milter.tmp1
diff cleanup_milter.ref15i1 cleanup_milter.tmp1
- ../postcat/postcat -ov test-queue-file15i.tmp 2>/dev/null >cleanup_milter.tmp2
+ $(SHLIB_ENV) ../postcat/postcat -ov test-queue-file15i.tmp 2>/dev/null >cleanup_milter.tmp2
diff cleanup_milter.ref15i2 cleanup_milter.tmp2
rm -f test-queue-file15i.tmp cleanup_milter.tmp1 cleanup_milter.tmp2
vstream_printf("address: %s\n", argv[3]);
state.errs = 0;
+ state.queue_id = "NOQUEUE";
cleanup_masquerade_external(&state, addr, masq_domains);
vstream_printf("result: %s\n", STR(addr));
TESTPROG=
PROG = discard
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE)
CFLAGS = $(DEBUG) $(OPT) $(DEFS)
INCL =
-LIB = libdns.a
+LIB = lib$(LIB_PREFIX)dns$(LIB_SUFFIX)
TESTPROG= test_dns_lookup dns_rr_to_pa dns_rr_to_sa dns_sa_to_rr dns_rr_eq_sa
-LIBS = ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
LIB_DIR = ../../lib
INC_DIR = ../../include
-.c.o:; $(CC) $(CFLAGS) -c $*.c
+.c.o:; $(CC) $(SHLIB_CFLAGS) $(CFLAGS) -c $*.c
all: $(LIB)
$(LIB): $(OBJS)
$(AR) $(ARFL) $(LIB) $?
$(RANLIB) $(LIB)
+ $(SHLIB_LD) -o $(LIB) $(OBJS)
$(LIB_DIR)/$(LIB): $(LIB)
cp $(LIB) $(LIB_DIR)
mv junk $@.o
dns_rr_to_pa_test: dns_rr_to_pa dns_rr_to_pa.in dns_rr_to_pa.ref
- ./dns_rr_to_pa `cat dns_rr_to_pa.in` >dns_rr_to_pa.tmp
+ $(SHLIB_ENV) ./dns_rr_to_pa `cat dns_rr_to_pa.in` >dns_rr_to_pa.tmp
diff dns_rr_to_pa.ref dns_rr_to_pa.tmp
rm -f dns_rr_to_pa.tmp
dns_rr_to_sa_test: dns_rr_to_sa dns_rr_to_sa.in dns_rr_to_sa.ref
- ./dns_rr_to_sa `cat dns_rr_to_sa.in` >dns_rr_to_sa.tmp
+ $(SHLIB_ENV) ./dns_rr_to_sa `cat dns_rr_to_sa.in` >dns_rr_to_sa.tmp
diff dns_rr_to_sa.ref dns_rr_to_sa.tmp
rm -f dns_rr_to_sa.tmp
dns_sa_to_rr_test: dns_sa_to_rr dns_sa_to_rr.in dns_sa_to_rr.ref
- ./dns_sa_to_rr `cat dns_sa_to_rr.in` >dns_sa_to_rr.tmp
+ $(SHLIB_ENV) ./dns_sa_to_rr `cat dns_sa_to_rr.in` >dns_sa_to_rr.tmp
diff dns_sa_to_rr.ref dns_sa_to_rr.tmp
rm -f dns_sa_to_rr.tmp
dns_rr_eq_sa_test: dns_rr_eq_sa dns_rr_eq_sa.in dns_rr_eq_sa.ref
- ./dns_rr_eq_sa `cat dns_rr_eq_sa.in` >dns_rr_eq_sa.tmp
+ $(SHLIB_ENV) ./dns_rr_eq_sa `cat dns_rr_eq_sa.in` >dns_rr_eq_sa.tmp
diff dns_rr_eq_sa.ref dns_rr_eq_sa.tmp
rm -f dns_rr_eq_sa.tmp
TESTPROG=
PROG = dnsblog
INC_DIR = ../../include
-LIBS = ../../lib/libdns.a ../../lib/libmaster.a ../../lib/libglobal.a \
- ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)dns$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = error
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = flush
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = fsstone
INC_DIR = ../../include
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE)
CFLAGS = $(DEBUG) $(OPT) $(DEFS)
INCL =
-LIB = libglobal.a
+LIB = lib$(LIB_PREFIX)global$(LIB_SUFFIX)
TESTPROG= domain_list dot_lockfile mail_addr_crunch mail_addr_find \
mail_addr_map mail_date maps mynetworks mypwd namadr_list \
off_cvt quote_822_local rec2stream recdump resolve_clnt \
data_redirect addr_match_list safe_ultostr verify_sender_addr \
mail_version mail_dict server_acl
-LIBS = ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
LIB_DIR = ../../lib
INC_DIR = ../../include
MAKES =
-.c.o:; $(CC) $(CFLAGS) -c $*.c
+.c.o:; $(CC) $(SHLIB_CFLAGS) $(CFLAGS) -c $*.c
all: $(LIB)
$(LIB): $(OBJS)
$(AR) $(ARFL) $(LIB) $?
$(RANLIB) $(LIB)
+ $(SHLIB_LD) -o $(LIB) $(OBJS)
$(LIB_DIR)/$(LIB): $(LIB)
cp $(LIB) $(LIB_DIR)
tests: tok822_test mime_tests strip_addr_test tok822_limit_test \
xtext_test scache_multi_test ehlo_mask_test \
namadr_list_test mail_conf_time_test header_body_checks_tests \
- mail_version_test server_acl_test resolve_local_test maps_test
+ mail_version_test server_acl_test resolve_local_test maps_test \
safe_ultostr_test
mime_tests: mime_test mime_nest mime_8bit mime_dom mime_trunc mime_cvt \
root_tests: rewrite_clnt_test resolve_clnt_test verify_sender_addr_test
tok822_test: tok822_parse tok822_parse.in tok822_parse.ref
- ./tok822_parse <tok822_parse.in >tok822_parse.tmp 2>&1
+ $(SHLIB_ENV) ./tok822_parse <tok822_parse.in >tok822_parse.tmp 2>&1
diff tok822_parse.ref tok822_parse.tmp
rm -f tok822_parse.tmp
mime_test: mime_state mime_test.in mime_test.ref
- ./mime_state <mime_test.in >mime_test.tmp
+ $(SHLIB_ENV) ./mime_state <mime_test.in >mime_test.tmp
diff mime_test.ref mime_test.tmp
rm -f mime_test.tmp
mime_nest: mime_state mime_nest.in mime_nest.ref
- ./mime_state <mime_nest.in >mime_nest.tmp
+ $(SHLIB_ENV) ./mime_state <mime_nest.in >mime_nest.tmp
diff mime_nest.ref mime_nest.tmp
rm -f mime_nest.tmp
mime_8bit: mime_state mime_8bit.in mime_8bit.ref
- ./mime_state <mime_8bit.in >mime_8bit.tmp
+ $(SHLIB_ENV) ./mime_state <mime_8bit.in >mime_8bit.tmp
diff mime_8bit.ref mime_8bit.tmp
rm -f mime_8bit.tmp
mime_dom: mime_state mime_dom.in mime_dom.ref
- ./mime_state <mime_dom.in >mime_dom.tmp
+ $(SHLIB_ENV) ./mime_state <mime_dom.in >mime_dom.tmp
diff mime_dom.ref mime_dom.tmp
rm -f mime_dom.tmp
mime_trunc: mime_state mime_trunc.in mime_trunc.ref
- ./mime_state <mime_trunc.in >mime_trunc.tmp
+ $(SHLIB_ENV) ./mime_state <mime_trunc.in >mime_trunc.tmp
diff mime_trunc.ref mime_trunc.tmp
rm -f mime_trunc.tmp
mime_cvt: mime_state mime_cvt.in mime_cvt.ref
- ./mime_state <mime_cvt.in >mime_cvt.tmp
+ $(SHLIB_ENV) ./mime_state <mime_cvt.in >mime_cvt.tmp
diff mime_cvt.ref mime_cvt.tmp
rm -f mime_cvt.tmp
mime_cvt2: mime_state mime_cvt.in2 mime_cvt.ref2
- ./mime_state <mime_cvt.in2 >mime_cvt.tmp
+ $(SHLIB_ENV) ./mime_state <mime_cvt.in2 >mime_cvt.tmp
diff mime_cvt.ref2 mime_cvt.tmp
rm -f mime_cvt.tmp
mime_cvt3: mime_state mime_cvt.in3 mime_cvt.ref3
- ./mime_state <mime_cvt.in3 >mime_cvt.tmp
+ $(SHLIB_ENV) ./mime_state <mime_cvt.in3 >mime_cvt.tmp
diff mime_cvt.ref3 mime_cvt.tmp
rm -f mime_cvt.tmp
mime_garb1: mime_state mime_garb1.in mime_garb1.ref
- ./mime_state <mime_garb1.in >mime_cvt.tmp
+ $(SHLIB_ENV) ./mime_state <mime_garb1.in >mime_cvt.tmp
diff mime_garb1.ref mime_cvt.tmp
rm -f mime_cvt.tmp
mime_garb2: mime_state mime_garb2.in mime_garb2.ref
- ./mime_state <mime_garb2.in >mime_cvt.tmp
+ $(SHLIB_ENV) ./mime_state <mime_garb2.in >mime_cvt.tmp
diff mime_garb2.ref mime_cvt.tmp
rm -f mime_cvt.tmp
mime_garb3: mime_state mime_garb3.in mime_garb3.ref
- ./mime_state <mime_garb3.in >mime_cvt.tmp
+ $(SHLIB_ENV) ./mime_state <mime_garb3.in >mime_cvt.tmp
diff mime_garb3.ref mime_cvt.tmp
rm -f mime_cvt.tmp
mime_garb4: mime_state mime_garb4.in mime_garb4.ref
- ./mime_state <mime_garb4.in >mime_cvt.tmp
+ $(SHLIB_ENV) ./mime_state <mime_garb4.in >mime_cvt.tmp
diff mime_garb4.ref mime_cvt.tmp
rm -f mime_cvt.tmp
tok822_limit_test: tok822_parse tok822_limit.in tok822_limit.ref
- ./tok822_parse <tok822_limit.in >tok822_limit.tmp
+ $(SHLIB_ENV) ./tok822_parse <tok822_limit.in >tok822_limit.tmp
diff tok822_limit.ref tok822_limit.tmp
rm -f tok822_limit.tmp
strip_addr_test: strip_addr strip_addr.ref
- ./strip_addr 2>strip_addr.tmp
+ $(SHLIB_ENV) ./strip_addr 2>strip_addr.tmp
diff strip_addr.ref strip_addr.tmp
rm -f strip_addr.tmp
xtext_test: xtext
- ./xtext <xtext.c | od -cb >xtext.tmp
+ $(SHLIB_ENV) ./xtext <xtext.c | od -cb >xtext.tmp
od -cb <xtext.c >xtext.ref
cmp xtext.ref xtext.tmp
rm -f xtext.ref xtext.tmp
mail_version_test: mail_version mail_version.in mail_version.ref
- ./mail_version <mail_version.in >mail_version.tmp
+ $(SHLIB_ENV) ./mail_version <mail_version.in >mail_version.tmp
diff mail_version.ref mail_version.tmp
rm -f mail_version.tmp
server_acl_test: server_acl server_acl.in server_acl.ref
- ./server_acl <server_acl.in >server_acl.tmp 2>&1
+ $(SHLIB_ENV) ./server_acl <server_acl.in >server_acl.tmp 2>&1
diff server_acl.ref server_acl.tmp
rm -f server_acl.tmp
resolve_local_test: resolve_local resolve_local.in resolve_local.ref
- sh resolve_local.in >resolve_local.tmp 2>&1
+ $(SHLIB_ENV) sh resolve_local.in >resolve_local.tmp 2>&1
diff resolve_local.ref resolve_local.tmp
rm -f resolve_local.tmp
maps_test: maps maps.in maps.ref
- sh maps.in >maps.tmp 2>&1
+ $(SHLIB_ENV) sh maps.in >maps.tmp 2>&1
diff maps.ref maps.tmp
rm -f maps.tmp
surrogate_test: mail_dict surrogate.ref
cp /dev/null surrogate.tmp
- echo get foo|./mail_dict ldap:/xx write >>surrogate.tmp 2>&1
- echo get foo|./mail_dict ldap:/xx read >>surrogate.tmp 2>&1
- echo get foo|./mail_dict mysql:/xx write >>surrogate.tmp 2>&1
- echo get foo|./mail_dict mysql:/xx read >>surrogate.tmp 2>&1
- echo get foo|./mail_dict pgsql:/xx write >>surrogate.tmp 2>&1
- echo get foo|./mail_dict pgsql:/xx read >>surrogate.tmp 2>&1
- echo get foo|./mail_dict sqlite:/xx write >>surrogate.tmp 2>&1
- echo get foo|./mail_dict sqlite:/xx read >>surrogate.tmp 2>&1
- echo get foo|./mail_dict memcache:/xx read >>surrogate.tmp 2>&1
+ echo get foo| $(SHLIB_ENV) ./mail_dict ldap:/xx write >>surrogate.tmp 2>&1
+ echo get foo| $(SHLIB_ENV) ./mail_dict ldap:/xx read >>surrogate.tmp 2>&1
+ echo get foo| $(SHLIB_ENV) ./mail_dict mysql:/xx write >>surrogate.tmp 2>&1
+ echo get foo| $(SHLIB_ENV) ./mail_dict mysql:/xx read >>surrogate.tmp 2>&1
+ echo get foo| $(SHLIB_ENV) ./mail_dict pgsql:/xx write >>surrogate.tmp 2>&1
+ echo get foo| $(SHLIB_ENV) ./mail_dict pgsql:/xx read >>surrogate.tmp 2>&1
+ echo get foo| $(SHLIB_ENV) ./mail_dict sqlite:/xx write >>surrogate.tmp 2>&1
+ echo get foo| $(SHLIB_ENV) ./mail_dict sqlite:/xx read >>surrogate.tmp 2>&1
+ echo get foo| $(SHLIB_ENV) ./mail_dict memcache:/xx read >>surrogate.tmp 2>&1
diff surrogate.ref surrogate.tmp
rm -f surrogate.tmp
esac
@test -n "`postconf -h remote_header_rewrite_domain`" || { \
echo 'This test requires non-empty remote_header_rewrite_domain'; exit 1; }
- ./rewrite_clnt <rewrite_clnt.in >rewrite_clnt.tmp
+ $(SHLIB_ENV) ./rewrite_clnt <rewrite_clnt.in >rewrite_clnt.tmp
sed -e "s/MYDOMAIN/`postconf -h mydomain`/" \
-e "s/INVALID_DOMAIN/`postconf -h remote_header_rewrite_domain`/" \
rewrite_clnt.ref | diff - rewrite_clnt.tmp
echo 'This test requires no transport map'; exit 1; }
sed -e "s/MYDOMAIN/`postconf -h mydomain`/g" \
-e "s/MYHOSTNAME/`postconf -h myhostname`/g" \
- resolve_clnt.in | ./resolve_clnt >resolve_clnt.tmp
+ resolve_clnt.in | $(SHLIB_ENV) ./resolve_clnt >resolve_clnt.tmp
sed -e "s/MYDOMAIN/`postconf -h mydomain`/g" \
-e "s/MYHOSTNAME/`postconf -h myhostname`/g" \
-e "s/RELAYHOST/`postconf -h mydomain`/g" \
esac
@test "X`postconf -h append_dot_mydomain`" = Xyes || { \
echo 'This test requires append_dot_mydomain=yes'; exit 1; }
- (./verify_sender_addr aa@bb 0; \
- ./verify_sender_addr aa@bb 1; \
- ./verify_sender_addr aa 0; \
- ./verify_sender_addr aa 1; \
- ./verify_sender_addr '' 0; \
- ./verify_sender_addr '' 1) | \
+ ($(SHLIB_ENV) ./verify_sender_addr aa@bb 0; \
+ $(SHLIB_ENV) ./verify_sender_addr aa@bb 1; \
+ $(SHLIB_ENV) ./verify_sender_addr aa 0; \
+ $(SHLIB_ENV) ./verify_sender_addr aa 1; \
+ $(SHLIB_ENV) ./verify_sender_addr '' 0; \
+ $(SHLIB_ENV) ./verify_sender_addr '' 1) | \
sed 's/[A-Z0-9][A-Z0-9]*@/STAMP@/' > verify_sender_addr.tmp
sed -e "s/MYDOMAIN/`postconf -h mydomain`/g" \
-e "s/MYORIGIN/`postconf -h myorigin`/g" \
rm -f verify_sender_addr.tmp
scache_multi_test: scache scache_multi.in scache_multi.ref
- ./scache <scache_multi.in >scache_multi.tmp
+ $(SHLIB_ENV) ./scache <scache_multi.in >scache_multi.tmp
diff scache_multi.ref scache_multi.tmp
rm -f scache_multi.tmp
ehlo_mask_test: ehlo_mask ehlo_mask.in ehlo_mask.ref
- ./ehlo_mask <ehlo_mask.in >ehlo_mask.tmp
+ $(SHLIB_ENV) ./ehlo_mask <ehlo_mask.in >ehlo_mask.tmp
diff ehlo_mask.ref ehlo_mask.tmp
rm -f ehlo_mask.tmp
rm -f namadr_list.tmp
mail_conf_time_test: mail_conf_time mail_conf_time.ref
- ./mail_conf_time >mail_conf_time.tmp
+ $(SHLIB_ENV) ./mail_conf_time >mail_conf_time.tmp
diff mail_conf_time.ref mail_conf_time.tmp
rm -f mail_conf_time.tmp
safe_ultostr_test: safe_ultostr safe_ultostr.in safe_ultostr.ref
- ./safe_ultostr <safe_ultostr.in >safe_ultostr.tmp 2>&1
+ $(SHLIB_ENV) ./safe_ultostr <safe_ultostr.in >safe_ultostr.tmp 2>&1
diff safe_ultostr.ref safe_ultostr.tmp
rm -f safe_ultostr.tmp
header_body_checks_null_test: header_body_checks header_body_checks_null.ref
- ./header_body_checks "" "" "" "" \
+ $(SHLIB_ENV) ./header_body_checks "" "" "" "" \
<mime_test.in >header_body_checks_null.tmp 2>&1
cmp header_body_checks_null.ref header_body_checks_null.tmp
- ./header_body_checks static:dunno static:dunno static:dunno static:dunno \
+ $(SHLIB_ENV) ./header_body_checks static:dunno static:dunno static:dunno static:dunno \
<mime_test.in >header_body_checks_null.tmp 2>&1
cmp header_body_checks_null.ref header_body_checks_null.tmp
- ./header_body_checks static:ok static:ok static:ok static:ok \
+ $(SHLIB_ENV) ./header_body_checks static:ok static:ok static:ok static:ok \
<mime_test.in >header_body_checks_null.tmp 2>&1
cmp header_body_checks_null.ref header_body_checks_null.tmp
rm -f header_body_checks_null.tmp
header_body_checks_warn_test: header_body_checks header_body_checks_warn.ref
- ./header_body_checks static:warn static:warn static:warn static:warn \
+ $(SHLIB_ENV) ./header_body_checks static:warn static:warn static:warn static:warn \
<mime_test.in >header_body_checks_warn.tmp 2>&1
cmp header_body_checks_warn.ref header_body_checks_warn.tmp
rm -f header_body_checks_warn.tmp
echo /./ prepend header: mime >header_body_checks_mime
echo /./ prepend header: nest >header_body_checks_nest
echo /./ prepend body >header_body_checks_body
- ./header_body_checks regexp:header_body_checks_head regexp:header_body_checks_mime \
+ $(SHLIB_ENV) ./header_body_checks regexp:header_body_checks_head regexp:header_body_checks_mime \
regexp:header_body_checks_nest regexp:header_body_checks_body \
<mime_test.in >header_body_checks_prepend.tmp 2>&1
cmp header_body_checks_prepend.ref header_body_checks_prepend.tmp
# errors. We can eliminate this restriction by allowing individual
# map types to advertise whether they can handle null queries.
header_body_checks_ignore_test: header_body_checks header_body_checks_ignore.ref
- ./header_body_checks static:ignore static:ignore static:ignore static:ignore \
+ $(SHLIB_ENV) ./header_body_checks static:ignore static:ignore static:ignore static:ignore \
<mime_test.in >header_body_checks_ignore.tmp 2>&1
cmp header_body_checks_ignore.ref header_body_checks_ignore.tmp
rm -f header_body_checks_ignore.tmp header_body_checks_head header_body_checks_mime header_body_checks_nest header_body_checks_body
echo /./ replace header: mime >header_body_checks_mime
echo /./ replace header: nest >header_body_checks_nest
echo /./ replace body >header_body_checks_body
- ./header_body_checks regexp:header_body_checks_head regexp:header_body_checks_mime \
+ $(SHLIB_ENV) ./header_body_checks regexp:header_body_checks_head regexp:header_body_checks_mime \
regexp:header_body_checks_nest regexp:header_body_checks_body \
<mime_test.in >header_body_checks_replace.tmp 2>&1
cmp header_body_checks_replace.ref header_body_checks_replace.tmp
dict_memcache.o: dict_memcache.h
dict_memcache.o: memcache_proto.h
dict_memcache.o: string_list.h
-dict_mysql.o: ../../include/argv.h
-dict_mysql.o: ../../include/dict.h
-dict_mysql.o: ../../include/events.h
-dict_mysql.o: ../../include/find_inet.h
-dict_mysql.o: ../../include/match_list.h
-dict_mysql.o: ../../include/msg.h
-dict_mysql.o: ../../include/myflock.h
-dict_mysql.o: ../../include/mymalloc.h
-dict_mysql.o: ../../include/myrand.h
-dict_mysql.o: ../../include/split_at.h
-dict_mysql.o: ../../include/stringops.h
dict_mysql.o: ../../include/sys_defs.h
-dict_mysql.o: ../../include/vbuf.h
-dict_mysql.o: ../../include/vstream.h
-dict_mysql.o: ../../include/vstring.h
-dict_mysql.o: cfg_parser.h
-dict_mysql.o: db_common.h
dict_mysql.o: dict_mysql.c
-dict_mysql.o: dict_mysql.h
-dict_mysql.o: string_list.h
-dict_pgsql.o: ../../include/argv.h
-dict_pgsql.o: ../../include/dict.h
-dict_pgsql.o: ../../include/events.h
-dict_pgsql.o: ../../include/find_inet.h
-dict_pgsql.o: ../../include/match_list.h
-dict_pgsql.o: ../../include/msg.h
-dict_pgsql.o: ../../include/myflock.h
-dict_pgsql.o: ../../include/mymalloc.h
-dict_pgsql.o: ../../include/myrand.h
-dict_pgsql.o: ../../include/split_at.h
-dict_pgsql.o: ../../include/stringops.h
dict_pgsql.o: ../../include/sys_defs.h
-dict_pgsql.o: ../../include/vbuf.h
-dict_pgsql.o: ../../include/vstream.h
-dict_pgsql.o: ../../include/vstring.h
-dict_pgsql.o: cfg_parser.h
-dict_pgsql.o: db_common.h
dict_pgsql.o: dict_pgsql.c
-dict_pgsql.o: dict_pgsql.h
-dict_pgsql.o: string_list.h
dict_proxy.o: ../../include/argv.h
dict_proxy.o: ../../include/attr.h
dict_proxy.o: ../../include/dict.h
mail_date.o: mail_date.h
mail_dict.o: ../../include/argv.h
mail_dict.o: ../../include/dict.h
+mail_dict.o: ../../include/dynamicmaps.h
mail_dict.o: ../../include/msg.h
mail_dict.o: ../../include/myflock.h
+mail_dict.o: ../../include/mymalloc.h
+mail_dict.o: ../../include/stringops.h
mail_dict.o: ../../include/sys_defs.h
mail_dict.o: ../../include/vbuf.h
mail_dict.o: ../../include/vstream.h
mail_dict.o: dict_sqlite.h
mail_dict.o: mail_dict.c
mail_dict.o: mail_dict.h
+mail_dict.o: mail_params.h
mail_error.o: ../../include/name_mask.h
mail_error.o: ../../include/sys_defs.h
mail_error.o: ../../include/vbuf.h
mkmap_open.o: ../../include/dict_cdb.h
mkmap_open.o: ../../include/dict_db.h
mkmap_open.o: ../../include/dict_dbm.h
+mkmap_open.o: ../../include/dynamicmaps.h
mkmap_open.o: ../../include/dict_fail.h
mkmap_open.o: ../../include/dict_lmdb.h
mkmap_open.o: ../../include/dict_sdbm.h
/* mail_conf_flush - discard configuration dictionary */
-void mail_conf_flush(void)
+void mail_conf_flush(void)
{
if (dict_handle(CONFIG_DICT) != 0)
- dict_unregister(CONFIG_DICT);
+ dict_unregister(CONFIG_DICT);
}
/* mail_conf_eval - expand macros in string */
/* DESCRIPTION
/* This module registers dictionary types that depend on higher-level
/* Postfix-specific interfaces and protocols.
+/*
+/* This also initializes the support for run-time loading of
+/* lookup tables, if applicable.
+/*
+/* The latter requires basic parameter initialization
+/* by either mail_conf_read() or mail_params_init().
/* LICENSE
/* .ad
/* .fi
#include <dict.h>
#include <msg.h>
+#include <mymalloc.h>
+#include <stringops.h>
+#include <dynamicmaps.h>
/* Global library. */
#include <dict_sqlite.h>
#include <dict_memcache.h>
#include <mail_dict.h>
+#include <mail_params.h>
+#include <mail_dict.h>
typedef struct {
char *type;
{
const DICT_OPEN_INFO *dp;
+#ifdef USE_DYNAMIC_LIBS
+ char *path;
+
+ path = concatenate(var_daemon_dir, "/", "dynamicmaps.cf", (char *) 0);
+ dymap_init(path);
+ myfree(path);
+#endif
+
for (dp = dict_open_info; dp->type; dp++)
dict_open_register(dp->type, dp->open);
}
#ifdef TEST
+
/*
* Proof-of-concept test program.
*/
/* char *var_data_dir;
/* char *var_command_dir;
/* char *var_queue_dir;
+/* char *var_shlib_dir;
/* int var_use_limit;
/* int var_idle_limit;
/* int var_event_drain;
char *var_data_dir;
char *var_command_dir;
char *var_queue_dir;
+char *var_shlib_dir;
int var_use_limit;
int var_event_drain;
int var_idle_limit;
VAR_DATA_DIR, DEF_DATA_DIR, &var_data_dir, 1, 0,
VAR_COMMAND_DIR, DEF_COMMAND_DIR, &var_command_dir, 1, 0,
VAR_QUEUE_DIR, DEF_QUEUE_DIR, &var_queue_dir, 1, 0,
+ VAR_SHLIB_DIR, DEF_SHLIB_DIR, &var_shlib_dir, 1, 0,
VAR_PID_DIR, DEF_PID_DIR, &var_pid_dir, 1, 0,
VAR_INET_INTERFACES, DEF_INET_INTERFACES, &var_inet_interfaces, 0, 0,
VAR_PROXY_INTERFACES, DEF_PROXY_INTERFACES, &var_proxy_interfaces, 0, 0,
#define DEF_LOCAL_DSN_FILTER "$" VAR_DSN_FILTER
extern char *var_local_dsn_filter;
+ /*
+ * Location of shared-library files.
+ *
+ * If the files will be installed into a known directory, such as a directory
+ * that is processed with the ldconfig(1) command, then the shlib_directory
+ * parameter may be configured at installation time.
+ *
+ * Otherwise, the shlib_directory parameter must be specified at compile time,
+ * and it cannot be changed afterwards.
+ */
+#define VAR_SHLIB_DIR "shlib_directory"
+#ifndef DEF_SHLIB_DIR
+#define DEF_SHLIB_DIR "/usr/local/lib"
+#endif
+extern char *var_shlib_dir;
+
/* LICENSE
/* .ad
/* .fi
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20140507"
+#define MAIL_RELEASE_DATE "20140508"
#define MAIL_VERSION_NUMBER "2.12"
#ifdef SNAPSHOT
#include <sigdelay.h>
#include <mymalloc.h>
+#ifdef USE_DYNAMIC_LIBS
+#include <dynamicmaps.h>
+#endif
+
/* Global library. */
#include "mkmap.h"
* We use a different table (in dict_open.c) when querying maps.
*/
typedef struct {
- char *type;
+ const char *type;
MKMAP *(*before_open) (const char *);
} MKMAP_OPEN_INFO;
MKMAP *mkmap;
const MKMAP_OPEN_INFO *mp;
+#ifdef USE_DYNAMIC_LIBS
+ MKMAP_OPEN_INFO oi;
+
+#endif
+
/*
* Find out what map type to use.
*/
for (mp = mkmap_types; /* void */ ; mp++) {
- if (mp->type == 0)
+ if (mp->type == 0) {
+#ifdef USE_DYNAMIC_LIBS
+ /* Either returns a handle, or raises a fatal error */
+ oi.before_open =
+ (MKMAP *(*) (const char *)) dymap_get_mkmap_fn(type);
+ oi.type = type;
+ mp = &oi;
+ break;
+#else
msg_fatal("unsupported map type for this operation: %s", type);
+#endif
+ }
if (strcmp(type, mp->type) == 0)
break;
}
PROG = local
TESTPROG=
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
INT_HDR = master.h
DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE)
CFLAGS = $(DEBUG) $(OPT) $(DEFS)
-LIB = libmaster.a
+LIB = lib$(LIB_PREFIX)master$(LIB_SUFFIX)
PROG = master
TESTPROG=
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
LIB_DIR = ../../lib
INC_DIR = ../../include
BIN_DIR = ../../libexec
-.c.o:; $(CC) $(CFLAGS) -c $*.c
+.c.o:; $(CC) `for i in $(LIB_OBJ); do [ $$i = $@ ] && echo $(SHLIB_CFLAGS); done` $(CFLAGS) -c $*.c
all: $(PROG) $(LIB)
cat ../../conf/makedefs.out $? >$@
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
test: $(TESTPROG)
$(LIB): $(LIB_OBJ)
$(AR) $(ARFL) $(LIB) $?
$(RANLIB) $(LIB)
+ $(SHLIB_LD) -o $(LIB) $(LIB_OBJ)
$(LIB_DIR)/$(LIB): $(LIB)
cp $(LIB) $(LIB_DIR)/$(LIB)
$(BIN_DIR)/$(PROG): $(PROG)
cp $(PROG) $(BIN_DIR)
-update: $(LIB_DIR)/$(LIB) $(BIN_DIR)/$(PROG)
+update: $(LIB_DIR)/$(LIB) $(BIN_DIR)/$(PROG) $(HDRS)
-for i in $(HDRS); \
do \
cmp -s $$i $(INC_DIR)/$$i 2>/dev/null || cp $$i $(INC_DIR); \
*/
mail_conf_suck();
- /*
- * Register dictionaries that use higher-level interfaces and protocols.
- */
- mail_dict_init();
-
/*
* After database open error, continue execution with reduced
* functionality.
if (redo_syslog_init)
msg_syslog_init(mail_task(var_procname), LOG_PID, LOG_FACILITY);
+ /*
+ * Register higher-level dictionaries and initialize the support for
+ * dynamically-loaded dictionarles.
+ */
+ mail_dict_init();
+
/*
* If not connected to stdin, stdin must not be a terminal.
*/
*/
mail_conf_suck();
- /*
- * Register dictionaries that use higher-level interfaces and protocols.
- */
- mail_dict_init();
-
/*
* After database open error, continue execution with reduced
* functionality.
if (redo_syslog_init)
msg_syslog_init(mail_task(var_procname), LOG_PID, LOG_FACILITY);
+ /*
+ * Register higher-level dictionaries and initialize the support for
+ * dynamically-loaded dictionarles.
+ */
+ mail_dict_init();
+
/*
* If not connected to stdin, stdin must not be a terminal.
*/
*/
mail_conf_suck();
- /*
- * Register dictionaries that use higher-level interfaces and protocols.
- */
- mail_dict_init();
-
/*
* After database open error, continue execution with reduced
* functionality.
if (redo_syslog_init)
msg_syslog_init(mail_task(var_procname), LOG_PID, LOG_FACILITY);
+ /*
+ * Register higher-level dictionaries and initialize the support for
+ * dynamically-loaded dictionarles.
+ */
+ mail_dict_init();
+
/*
* If not connected to stdin, stdin must not be a terminal.
*/
*/
mail_conf_suck();
- /*
- * Register dictionaries that use higher-level interfaces and protocols.
- */
- mail_dict_init();
-
/*
* After database open error, continue execution with reduced
* functionality.
if (redo_syslog_init)
msg_syslog_init(mail_task(var_procname), LOG_PID, LOG_FACILITY);
+ /*
+ * Register higher-level dictionaries and initialize the support for
+ * dynamically-loaded dictionarles.
+ */
+ mail_dict_init();
+
/*
* If not connected to stdin, stdin must not be a terminal.
*/
LIB = libmilter.a
TESTPROG= milter test-milter
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../$(LIB_PREFIX)util$(LIB_SUFFIX)
LIB_DIR = ../../lib
INC_DIR = ../../include
MAKES =
root_tests:
$(LIB): $(OBJS)
- $(AR) $(ARFL) $(LIB) $?
- $(RANLIB) $(LIB)
+ $(_AR) $(ARFL) $(LIB) $?
+ $(_RANLIB) $(LIB)
$(LIB_DIR)/$(LIB): $(LIB)
cp $(LIB) $(LIB_DIR)
- $(RANLIB) $(LIB_DIR)/$(LIB)
+ $(_RANLIB) $(LIB_DIR)/$(LIB)
update: $(LIB_DIR)/$(LIB) $(HDRS)
-for i in $(HDRS); \
TESTPROG=
PROG = qmgr
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = pickup
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = pipe
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = postalias
INC_DIR = ../../include
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = postcat
INC_DIR = ../../include
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
PROG = postconf
SAMPLES = ../../conf/main.cf.default
INC_DIR = ../../include
-LIBS = ../../lib/libxsasl.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/libxsasl.a \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
../../conf/main.cf.default: $(PROG) Makefile
rm -f $@
(echo "# DO NOT EDIT THIS FILE. EDIT THE MAIN.CF FILE INSTEAD. THE"; \
echo "# TEXT HERE JUST SHOWS DEFAULT SETTINGS BUILT INTO POSTFIX."; \
- echo "#"; ./$(PROG) -d -c ../../conf) | \
+ echo "#"; $(SHLIB_ENV) ./$(PROG) -d -c ../../conf) | \
egrep -v '^(myhostname|mydomain|mynetworks|process_name|process_id) ' >$@
$(OBJS): ../../conf/makedefs.out
* If showing map types, show them and exit
*/
if (pcf_cmd_mode & PCF_SHOW_MAPS) {
+ mail_conf_read();
mail_dict_init();
pcf_show_maps();
}
TESTPROG=
PROG = postdrop
INC_DIR = ../../include
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
postdrop.o: ../../include/cleanup_user.h
postdrop.o: ../../include/iostuff.h
postdrop.o: ../../include/mail_conf.h
+postdrop.o: ../../include/mail_dict.h
postdrop.o: ../../include/mail_params.h
postdrop.o: ../../include/mail_proto.h
postdrop.o: ../../include/mail_queue.h
#include <cleanup_user.h>
#include <record.h>
#include <rec_type.h>
+#include <mail_dict.h>
#include <user_acl.h>
#include <rec_attr_map.h>
* Mail submission access control. Should this be in the user-land gate,
* or in the daemon process?
*/
+ mail_dict_init();
if ((errstr = check_user_acl_byuid(var_submit_acl, uid)) != 0)
msg_fatal("User %s(%ld) is not allowed to submit mail",
errstr, (long) uid);
INC_DIR = ../../include
TESTPROG=
PROG = postfix
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
/* .fi
/* The following \fBmain.cf\fR configuration parameters are
/* exported as environment variables with the same names:
+/* .IP "\fBconfig_directory (see 'postconf -d' output)\fR"
+/* The default location of the Postfix main.cf and master.cf
+/* configuration files.
/* .IP "\fBcommand_directory (see 'postconf -d' output)\fR"
/* The location of all postfix administrative commands.
/* .IP "\fBdaemon_directory (see 'postconf -d' output)\fR"
/* The directory with Postfix support programs and daemon programs.
-/* .IP "\fBconfig_directory (see 'postconf -d' output)\fR"
-/* The default location of the Postfix main.cf and master.cf
-/* configuration files.
-/* .IP "\fBqueue_directory (see 'postconf -d' output)\fR"
-/* The location of the Postfix top-level queue directory.
+/* .IP "\fBhtml_directory (see 'postconf -d' output)\fR"
+/* The location of Postfix HTML files that describe how to build,
+/* configure or operate a specific Postfix subsystem or feature.
/* .IP "\fBmail_owner (postfix)\fR"
/* The UNIX system account that owns the Postfix queue and most Postfix
/* daemon processes.
-/* .IP "\fBsetgid_group (postdrop)\fR"
-/* The group ownership of set-gid Postfix commands and of group-writable
-/* Postfix directories.
-/* .IP "\fBsendmail_path (see 'postconf -d' output)\fR"
-/* A Sendmail compatibility feature that specifies the location of
-/* the Postfix \fBsendmail\fR(1) command.
-/* .IP "\fBnewaliases_path (see 'postconf -d' output)\fR"
-/* Sendmail compatibility feature that specifies the location of the
-/* \fBnewaliases\fR(1) command.
/* .IP "\fBmailq_path (see 'postconf -d' output)\fR"
/* Sendmail compatibility feature that specifies where the Postfix
/* \fBmailq\fR(1) command is installed.
-/* .IP "\fBhtml_directory (see 'postconf -d' output)\fR"
-/* The location of Postfix HTML files that describe how to build,
-/* configure or operate a specific Postfix subsystem or feature.
/* .IP "\fBmanpage_directory (see 'postconf -d' output)\fR"
/* Where the Postfix manual pages are installed.
+/* .IP "\fBnewaliases_path (see 'postconf -d' output)\fR"
+/* Sendmail compatibility feature that specifies the location of the
+/* \fBnewaliases\fR(1) command.
+/* .IP "\fBqueue_directory (see 'postconf -d' output)\fR"
+/* The location of the Postfix top-level queue directory.
/* .IP "\fBreadme_directory (see 'postconf -d' output)\fR"
/* The location of Postfix README files that describe how to build,
/* configure or operate a specific Postfix subsystem or feature.
+/* .IP "\fBsendmail_path (see 'postconf -d' output)\fR"
+/* A Sendmail compatibility feature that specifies the location of
+/* the Postfix \fBsendmail\fR(1) command.
+/* .IP "\fBsetgid_group (postdrop)\fR"
+/* The group ownership of set-gid Postfix commands and of group-writable
+/* Postfix directories.
/* .PP
/* Available in Postfix version 2.5 and later:
/* .IP "\fBdata_directory (see 'postconf -d' output)\fR"
/* The directory with Postfix-writable data files (for example:
/* caches, pseudo-random numbers).
/* .PP
+/* Available in Postfix version 2.12 and later:
+/* .IP "\fBshlib_directory (see 'postconf -d' output)\fR"
+/* The location of Postfix shared libraries (libpostfix-*.so.*).
+/* .PP
/* Other configuration parameters:
-/* .IP "\fBconfig_directory (see 'postconf -d' output)\fR"
-/* The default location of the Postfix main.cf and master.cf
-/* configuration files.
/* .IP "\fBimport_environment (see 'postconf -d' output)\fR"
/* The list of environment parameters that a Postfix process will
/* import from a non-Postfix parent process.
/* $daemon_directory/postfix-files, file/directory permissions
/* $daemon_directory/postfix-script, administrative commands
/* $daemon_directory/post-install, post-installation configuration
+/* $daemon_directory/dynamicmaps.cf, plug-in database clients
/* SEE ALSO
/* Commands:
/* postalias(1), create/update/query alias database
check_setenv(VAR_DATA_DIR, var_data_dir); /* main.cf */
check_setenv(VAR_QUEUE_DIR, var_queue_dir); /* main.cf */
check_setenv(VAR_CONFIG_DIR, var_config_dir); /* main.cf */
+ check_setenv(VAR_SHLIB_DIR, var_shlib_dir); /* main.cf */
/*
* Do we want to keep adding things here as shell scripts evolve?
TESTPROG=
PROG = postkick
INC_DIR = ../../include
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = postlock
INC_DIR = ../../include
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
INC_DIR = ../../include
TESTPROG=
PROG = postlog
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = postmap
INC_DIR = ../../include
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
INC_DIR = ../../include
TESTPROG=
PROG = postmulti
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = postqueue
INC_DIR = ../../include
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
PROG = postscreen
INC_DIR = ../../include
# Fake libdns dependency, for early-binding shared-library builds.
-LIBS = ../../lib/libmaster.a ../../lib/libtls.a ../../lib/libdns.a \
- ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)tls$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)dns$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = postsuper
INC_DIR = ../../include
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
INC_DIR = ../../include
PROG = posttls-finger
-LIBS = ../../lib/libtls.a ../../lib/libdns.a \
- ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)tls$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)dns$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
cat ../../conf/makedefs.out $? >$@
posttls-finger: $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
test: $(TESTPROG)
TESTPROG=
PROG = proxymap
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = qmgr
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = qmqpd
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libdns.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)dns$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = scache
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = sendmail
INC_DIR = ../../include
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = showq
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG= smtp_unalias smtp_map11
PROG = smtp
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libtls.a ../../lib/libdns.a \
- ../../lib/libxsasl.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)tls$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)dns$(LIB_SUFFIX) \
+ ../../lib/libxsasl.a \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
# This needs trivial-rewrite service and myorigin==mydomain
smtp_map11_test: smtp_map11 map11_map smtp_map11.ref
- ../postmap/postmap map11_map
- ./smtp_map11 hash:map11_map foo@example.com bar@example.com \
+ $(SHLIB_ENV) ../postmap/postmap map11_map
+ $(SHLIB_ENV) ./smtp_map11 hash:map11_map foo@example.com bar@example.com \
baz@example.com foo@example.net >smtp_map11.tmp 2>&1
sed -e "s/MYDOMAIN/`postconf -h mydomain`/" \
-e "s/MYHOSTNAME/`postconf -h myhostname`/" smtp_map11.ref | \
time_t expire_time; /* session reuse expiration time */
int reuse_count; /* # of times reused (for logging) */
- int dead; /* No further I/O allowed */
+ int forbidden; /* No further I/O allowed */
#ifdef USE_SASL_AUTH
char *sasl_mechanism_list; /* server mechanism list */
* connections and other reasons why connections cannot be cached.
*/
#define THIS_SESSION_IS_CACHED \
- (!THIS_SESSION_IS_DEAD && session->expire_time > 0)
+ (!THIS_SESSION_IS_FORBIDDEN && session->expire_time > 0)
#define THIS_SESSION_IS_EXPIRED \
(THIS_SESSION_IS_CACHED \
|| (var_smtp_reuse_count > 0 \
&& session->reuse_count >= var_smtp_reuse_count)))
-#define THIS_SESSION_IS_BAD \
- (!THIS_SESSION_IS_DEAD && session->expire_time < 0)
+#define THIS_SESSION_IS_THROTTLED \
+ (!THIS_SESSION_IS_FORBIDDEN && session->expire_time < 0)
-#define THIS_SESSION_IS_DEAD \
- (session->dead != 0)
+#define THIS_SESSION_IS_FORBIDDEN \
+ (session->forbidden != 0)
/* Bring the bad news. */
#define DONT_CACHE_THIS_SESSION \
(session->expire_time = 0)
-#define DONT_CACHE_BAD_SESSION \
+#define DONT_CACHE_THROTTLED_SESSION \
(session->expire_time = -1)
-#define DONT_USE_DEAD_SESSION \
- (session->dead = 1)
+#define DONT_USE_FORBIDDEN_SESSION \
+ (session->forbidden = 1)
/* Initialization. */
#define USE_NEWBORN_SESSION \
- (session->dead = 0)
+ (session->forbidden = 0)
#define CACHE_THIS_SESSION_UNTIL(when) \
(session->expire_time = (when))
{
DELIVER_REQUEST *request = state->request;
SMTP_SESSION *session = state->session;
- int bad_session;
+ int throttled;
/*
* Inform the postmaster of trouble.
* physical bindings; caching a session under its own hostname provides
* no performance benefit, given the way smtp_connect() works.
*/
- bad_session = THIS_SESSION_IS_BAD; /* smtp_quit() may fail */
+ throttled = THIS_SESSION_IS_THROTTLED; /* smtp_quit() may fail */
if (THIS_SESSION_IS_EXPIRED)
smtp_quit(state); /* also disables caching */
if (THIS_SESSION_IS_CACHED
* next-hop destination. Otherwise we could end up skipping over the
* available and more preferred servers.
*/
- if (HAVE_NEXTHOP_STATE(state) && !bad_session)
+ if (HAVE_NEXTHOP_STATE(state) && !throttled)
FREE_NEXTHOP_STATE(state);
/*
*/
if ((session->features & SMTP_FEATURE_FROM_CACHE) == 0
&& smtp_helo(state) != 0) {
- if (!THIS_SESSION_IS_DEAD
+ if (!THIS_SESSION_IS_FORBIDDEN
&& vstream_ferror(session->stream) == 0
&& vstream_feof(session->stream) == 0)
smtp_quit(state);
*
* Opportunistic (a.k.a. on-demand) session caching on request by the
* queue manager. This is turned temporarily when a destination has a
- * high volume of mail in the active queue.
+ * high volume of mail in the active queue. When the surge reaches
+ * its end, the queue manager requests that connections be retrieved
+ * but not stored.
*/
if (addr_list && (state->misc_flags & SMTP_MISC_FLAG_FIRST_NEXTHOP)) {
smtp_cache_policy(state, domain);
- if (state->misc_flags & SMTP_MISC_FLAG_CONN_STORE)
+ if (state->misc_flags & SMTP_MISC_FLAG_CONN_CACHE_MASK)
SET_NEXTHOP_STATE(state, dest);
}
* When a TLS handshake fails, the stream is marked
* "dead" to avoid further I/O over a broken channel.
*/
- if (!THIS_SESSION_IS_DEAD
+ if (!THIS_SESSION_IS_FORBIDDEN
&& vstream_ferror(session->stream) == 0
&& vstream_feof(session->stream) == 0)
smtp_quit(state);
* We must avoid further I/O, the peer is in an undefined state.
*/
(void) vstream_fpurge(session->stream, VSTREAM_PURGE_BOTH);
- DONT_USE_DEAD_SESSION;
+ DONT_USE_FORBIDDEN_SESSION;
/*
* If TLS is optional, try delivery to the same server over a
"unreadable mail queue entry");
/* Bailing out, abort stream with prejudice */
(void) vstream_fpurge(session->stream, VSTREAM_PURGE_BOTH);
- DONT_USE_DEAD_SESSION;
+ DONT_USE_FORBIDDEN_SESSION;
/* If bounce_append() succeeded, status is still 0 */
if (state->status == 0)
(void) mark_corrupt(state->src);
* Don't cache this session. We can't talk to this server.
*/
if (throttle_queue && session)
- DONT_CACHE_BAD_SESSION;
+ DONT_CACHE_THROTTLED_SESSION;
return (-1);
}
PROG = smtpd
INC_DIR = ../../include
# Fake libdns dependency, for early-binding shared-library builds.
-LIBS = ../../lib/libmaster.a ../../lib/libtls.a ../../lib/libdns.a \
- ../../lib/libxsasl.a ../../lib/libmilter.a ../../lib/libdns.a \
- ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)tls$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)dns$(LIB_SUFFIX) \
+ ../../lib/libxsasl.a \
+ ../../lib/libmilter.a \
+ ../../lib/lib$(LIB_PREFIX)dns$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
# This requires that the DNS server can query porcupine.org.
smtpd_check_test: smtpd_check smtpd_check.in smtpd_check.ref smtpd_check_access
- ../postmap/postmap hash:smtpd_check_access
- ./smtpd_check <smtpd_check.in >smtpd_check.tmp 2>&1
+ $(SHLIB_ENV) ../postmap/postmap hash:smtpd_check_access
+ $(SHLIB_ENV) ./smtpd_check <smtpd_check.in >smtpd_check.tmp 2>&1
diff smtpd_check.ref smtpd_check.tmp
rm -f smtpd_check.tmp smtpd_check_access.*
# This requires that the DNS server can query porcupine.org.
smtpd_check_test2: smtpd_check smtpd_check.in2 smtpd_check.ref2 smtpd_check_access
- ../postmap/postmap hash:smtpd_check_access
- ./smtpd_check <smtpd_check.in2 >smtpd_check.tmp 2>&1
+ $(SHLIB_ENV) ../postmap/postmap hash:smtpd_check_access
+ $(SHLIB_ENV) ./smtpd_check <smtpd_check.in2 >smtpd_check.tmp 2>&1
diff smtpd_check.ref2 smtpd_check.tmp
rm -f smtpd_check.tmp smtpd_check_access.*
smtpd_check_test4: smtpd_check smtpd_check.in4 smtpd_check.ref4 smtpd_check_access
- ../postmap/postmap hash:smtpd_check_access
- ./smtpd_check <smtpd_check.in4 >smtpd_check.tmp 2>&1
+ $(SHLIB_ENV) ../postmap/postmap hash:smtpd_check_access
+ $(SHLIB_ENV) ./smtpd_check <smtpd_check.in4 >smtpd_check.tmp 2>&1
diff smtpd_check.ref4 smtpd_check.tmp
rm -f smtpd_check.tmp smtpd_check_access.*
smtpd_acl_test: smtpd_check smtpd_acl.in smtpd_acl.ref smtpd_check_access
- ../postmap/postmap hash:smtpd_check_access
- ./smtpd_check <smtpd_acl.in >smtpd_check.tmp 2>&1
+ $(SHLIB_ENV) ../postmap/postmap hash:smtpd_check_access
+ $(SHLIB_ENV) ./smtpd_check <smtpd_acl.in >smtpd_check.tmp 2>&1
diff smtpd_acl.ref smtpd_check.tmp
rm -f smtpd_check.tmp smtpd_check_access.*
# This requires that the DNS server can query porcupine.org.
smtpd_exp_test: smtpd_check smtpd_exp.in smtpd_exp.ref
- ../postmap/postmap hash:smtpd_check_access
- ./smtpd_check <smtpd_exp.in >smtpd_exp.tmp 2>&1
+ $(SHLIB_ENV) ../postmap/postmap hash:smtpd_check_access
+ $(SHLIB_ENV) ./smtpd_check <smtpd_exp.in >smtpd_exp.tmp 2>&1
diff smtpd_exp.ref smtpd_exp.tmp
rm -f smtpd_exp.tmp smtpd_check_access.*
smtpd_check_dsn_test: smtpd_check smtpd_check_dsn.in smtpd_check_dsn.ref smtpd_check_access
- ../postmap/postmap hash:smtpd_check_access
- ./smtpd_check <smtpd_check_dsn.in >smtpd_check.tmp 2>&1
+ $(SHLIB_ENV) ../postmap/postmap hash:smtpd_check_access
+ $(SHLIB_ENV) ./smtpd_check <smtpd_check_dsn.in >smtpd_check.tmp 2>&1
diff smtpd_check_dsn.ref smtpd_check.tmp
rm -f smtpd_check.tmp smtpd_check_access.*
# This requires that 168,100.189.7 is a local or virtual interface.
smtpd_check_backup_test: smtpd_check smtpd_check_backup.in smtpd_check_backup.ref
- ./smtpd_check <smtpd_check_backup.in >smtpd_check.tmp 2>&1
+ $(SHLIB_ENV) ./smtpd_check <smtpd_check_backup.in >smtpd_check.tmp 2>&1
diff smtpd_check_backup.ref smtpd_check.tmp
rm -f smtpd_check.tmp
smtpd_token_test: smtpd_token smtpd_token.in smtpd_token.ref
- ./smtpd_token <smtpd_token.in >smtpd_token.tmp 2>&1
+ $(SHLIB_ENV) ./smtpd_token <smtpd_token.in >smtpd_token.tmp 2>&1
diff smtpd_token.ref smtpd_token.tmp
rm -f smtpd_token.tmp
# This requires that the DNS server can query porcupine.org and rfc-ignorant.org
smtpd_dnswl_test: smtpd_check smtpd_dnswl.in smtpd_dnswl.ref
- ./smtpd_check <smtpd_dnswl.in >smtpd_dnswl.tmp 2>&1
+ $(SHLIB_ENV) ./smtpd_check <smtpd_dnswl.in >smtpd_dnswl.tmp 2>&1
diff smtpd_dnswl.ref smtpd_dnswl.tmp
rm -f smtpd_dnswl.tmp
smtpd_error_test: smtpd_check smtpd_error.in smtpd_error.ref
- ./smtpd_check <smtpd_error.in >smtpd_check.tmp 2>&1
+ $(SHLIB_ENV) ./smtpd_check <smtpd_error.in >smtpd_check.tmp 2>&1
diff smtpd_error.ref smtpd_check.tmp
rm -f smtpd_check.tmp
TESTPROG=
INC_DIR = ../../include
PROG = smtp-source smtp-sink qmqp-source qmqp-sink
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
TESTPROG=
PROG = spawn
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
DEFS = -I. -I$(INC_DIR) -D$(SYSTYPE)
CFLAGS = $(DEBUG) $(OPT) $(DEFS)
INCL =
-LIB = libtls.a
+LIB = lib$(LIB_PREFIX)tls$(LIB_SUFFIX)
TESTPROG= tls_dh tls_mgr tls_rsa tls_dane
-LIBS = ../../lib/libdns.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)dns$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
LIB_DIR = ../../lib
INC_DIR = ../../include
MAKES =
-.c.o:; $(CC) $(CFLAGS) -c $*.c
+.c.o:; $(CC) $(SHLIB_CFLAGS) $(CFLAGS) -c $*.c
all: $(LIB)
$(LIB): $(OBJS)
$(AR) $(ARFL) $(LIB) $?
$(RANLIB) $(LIB)
+ $(SHLIB_LD) -o $(LIB) $(OBJS)
$(LIB_DIR)/$(LIB): $(LIB)
cp $(LIB) $(LIB_DIR)
PROG = tlsmgr
INC_DIR = ../../include
# Fake libdns dependency, for early-binding shared-library builds.
-LIBS = ../../lib/libmaster.a ../../lib/libtls.a ../../lib/libdns.a \
- ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)tls$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)dns$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
TESTPROG=
PROG = tlsproxy
INC_DIR = ../../include
-LIBS = ../../lib/libtls.a ../../lib/libmaster.a ../../lib/libglobal.a \
- ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)tls$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)dns$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
LIB =
TESTPROG=
PROG = trivial-rewrite
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
LIB_DIR = ../../lib
INC_DIR = ../../include
BIN_DIR = ../../libexec
all: $(PROG) $(LIB)
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
readlline.c ring.c safe_getenv.c safe_open.c \
sane_accept.c sane_connect.c sane_link.c sane_rename.c \
sane_socketpair.c sane_time.c scan_dir.c set_eugid.c set_ugid.c \
+ load_lib.c dynamicmaps.c \
sigdelay.c skipblanks.c sock_addr.c spawn_command.c split_at.c \
split_nameval.c stat_as.c strcasecmp.c stream_connect.c \
stream_listen.c stream_recv_fd.c stream_send_fd.c stream_trigger.c \
host_port.o htable.o inet_addr_host.o inet_addr_list.o \
inet_addr_local.o inet_connect.o inet_listen.o inet_proto.o \
inet_trigger.o line_wrap.o lowercase.o lstat_as.o mac_expand.o \
+ load_lib.o dynamicmaps.o \
mac_parse.o make_dirs.o mask_addr.o match_list.o match_ops.o msg.o \
msg_output.o msg_syslog.o msg_vstream.o mvect.o myaddrinfo.o myflock.o \
mymalloc.o myrand.o mystrtok.o name_code.o name_mask.o netstring.o \
mymalloc.h myrand.h name_code.h name_mask.h netstring.h nvtable.h \
open_as.h open_lock.h percentm.h posix_signals.h readlline.h ring.h \
safe.h safe_open.h sane_accept.h sane_connect.h sane_fsops.h \
+ load_lib.h dynamicmaps.h \
sane_socketpair.h sane_time.h scan_dir.h set_eugid.h set_ugid.h \
sigdelay.h sock_addr.h spawn_command.h split_at.h stat_as.h \
stringops.h sys_defs.h timed_connect.h timed_wait.h trigger.h \
CFLAGS = $(DEBUG) $(OPT) $(DEFS)
FILES = Makefile $(SRCS) $(HDRS)
INCL =
-LIB = libutil.a
+LIB = lib$(LIB_PREFIX)util$(LIB_SUFFIX)
TESTPROG= dict_open dup2_pass_on_exec events exec_command fifo_open \
fifo_rdonly_bug fifo_rdwr_bug fifo_trigger fsspace fullname \
inet_addr_host inet_addr_local mac_parse make_dirs msg_syslog \
LIB_DIR = ../../lib
INC_DIR = ../../include
-.c.o:; $(CC) $(CFLAGS) -c $*.c
+.c.o:; $(CC) $(SHLIB_CFLAGS) $(CFLAGS) -c $*.c
all: $(LIB)
$(LIB): $(OBJS)
$(AR) $(ARFL) $(LIB) $?
$(RANLIB) $(LIB)
+ $(SHLIB_LD) -o $(LIB) $(OBJS)
$(LIB_DIR)/$(LIB): $(LIB)
cp $(LIB) $(LIB_DIR)
root_tests:
valid_hostname_test: valid_hostname valid_hostname.in valid_hostname.ref
- ./valid_hostname <valid_hostname.in 2>valid_hostname.tmp
+ $(SHLIB_ENV) ./valid_hostname <valid_hostname.in 2>valid_hostname.tmp
diff valid_hostname.ref valid_hostname.tmp
rm -f valid_hostname.tmp
mac_expand_test: mac_expand mac_expand.in mac_expand.ref
- ./mac_expand <mac_expand.in >mac_expand.tmp 2>&1
+ $(SHLIB_ENV) ./mac_expand <mac_expand.in >mac_expand.tmp 2>&1
diff mac_expand.ref mac_expand.tmp
rm -f mac_expand.tmp
unescape_test: unescape unescape.in unescape.ref
- ./unescape <unescape.in | od -cb >unescape.tmp
+ $(SHLIB_ENV) ./unescape <unescape.in | od -cb >unescape.tmp
diff -b unescape.ref unescape.tmp
rm -f unescape.tmp
hex_quote_test: hex_quote
- ./hex_quote <hex_quote.c | od -cb >hex_quote.tmp
+ $(SHLIB_ENV) ./hex_quote <hex_quote.c | od -cb >hex_quote.tmp
od -cb <hex_quote.c >hex_quote.ref
cmp hex_quote.ref hex_quote.tmp
rm -f hex_quote.ref hex_quote.tmp
ctable_test: ctable
- ./ctable <ctable.in >ctable.tmp 2>&1
+ $(SHLIB_ENV) ./ctable <ctable.in >ctable.tmp 2>&1
diff ctable.ref ctable.tmp
rm -f ctable.tmp
# On Linux, following test may require "modprobe ipv6" to enable IPv6.
inet_addr_list_test: inet_addr_list
- ./inet_addr_list `cat inet_addr_list.in` >inet_addr_list.tmp 2>&1
+ $(SHLIB_ENV) ./inet_addr_list `cat inet_addr_list.in` >inet_addr_list.tmp 2>&1
diff inet_addr_list.ref inet_addr_list.tmp
rm -f inet_addr_list.tmp
sane_basename_test: sane_basename
- ./sane_basename <sane_basename.in >sane_basename.tmp 2>&1
+ $(SHLIB_ENV) ./sane_basename <sane_basename.in >sane_basename.tmp 2>&1
diff sane_basename.ref sane_basename.tmp
rm -f sane_basename.tmp
base64_code_test: base64_code
- ./base64_code
+ $(SHLIB_ENV) ./base64_code
attr_scan64_test: attr_print64 attr_scan64 attr_scan64.ref
- (./attr_print64 2>&3 | (sleep 1; ./attr_scan64)) >attr_scan64.tmp 2>&1 3>&1
+ ($(SHLIB_ENV) ./attr_print64 2>&3 | (sleep 1; $(SHLIB_ENV) ./attr_scan64)) >attr_scan64.tmp 2>&1 3>&1
diff attr_scan64.ref attr_scan64.tmp
rm -f attr_scan64.tmp
attr_scan0_test: attr_print0 attr_scan0 attr_scan0.ref
- (./attr_print0 2>&3 | (sleep 1; ./attr_scan0)) >attr_scan0.tmp 2>&1 3>&1
+ ($(SHLIB_ENV) ./attr_print0 2>&3 | (sleep 1; $(SHLIB_ENV) ./attr_scan0)) >attr_scan0.tmp 2>&1 3>&1
diff attr_scan0.ref attr_scan0.tmp
rm -f attr_scan0.tmp
dict_test: dict_open testdb dict_test.in dict_test.ref
rm -f testdb.db testdb.dir testdb.pag
- ../postmap/postmap -N hash:testdb
- ./dict_open hash:testdb write < dict_test.in > dict_test.tmp 2>&1
+ $(SHLIB_ENV) ../postmap/postmap -N hash:testdb
+ $(SHLIB_ENV) ./dict_open hash:testdb write < dict_test.in > dict_test.tmp 2>&1
diff dict_test.ref dict_test.tmp
- ../postmap/postmap -n hash:testdb
- ./dict_open hash:testdb write < dict_test.in > dict_test.tmp 2>&1
+ $(SHLIB_ENV) ../postmap/postmap -n hash:testdb
+ $(SHLIB_ENV) ./dict_open hash:testdb write < dict_test.in > dict_test.tmp 2>&1
diff dict_test.ref dict_test.tmp
rm -f testdb.db testdb.dir testdb.pag dict_test.tmp
dict_pcre_test: dict_open dict_pcre.in dict_pcre.map dict_pcre.ref
- ./dict_open pcre:dict_pcre.map read <dict_pcre.in >dict_pcre.tmp 2>&1
+ $(SHLIB_ENV) ./dict_open pcre:dict_pcre.map read <dict_pcre.in >dict_pcre.tmp 2>&1
diff dict_pcre.ref dict_pcre.tmp
rm -f dict_pcre.tmp
dict_regexp_test: dict_open dict_regexp.in dict_regexp.map dict_regexp.ref
- ./dict_open regexp:dict_regexp.map read <dict_regexp.in >dict_regexp.tmp 2>&1
+ $(SHLIB_ENV) ./dict_open regexp:dict_regexp.map read <dict_regexp.in >dict_regexp.tmp 2>&1
diff dict_regexp.ref dict_regexp.tmp
rm -f dict_regexp.tmp
dict_cidr_test: dict_open dict_cidr.in dict_cidr.map dict_cidr.ref
- ./dict_open cidr:dict_cidr.map read <dict_cidr.in >dict_cidr.tmp 2>&1
+ $(SHLIB_ENV) ./dict_open cidr:dict_cidr.map read <dict_cidr.in >dict_cidr.tmp 2>&1
diff dict_cidr.ref dict_cidr.tmp
rm -f dict_cidr.tmp
dict_seq_test: dict_open testdb dict_seq.in dict_seq.ref
rm -f testdb.db testdb.dir testdb.pag
- ./dict_open hash:testdb create sync < dict_seq.in > dict_seq.tmp 2>&1
+ $(SHLIB_ENV) ./dict_open hash:testdb create sync < dict_seq.in > dict_seq.tmp 2>&1
diff dict_seq.ref dict_seq.tmp
rm -f testdb.db testdb.dir testdb.pag dict_seq.tmp
host_port_test: host_port host_port.in host_port.ref
- ./host_port <host_port.in >host_port.tmp 2>&1
+ $(SHLIB_ENV) ./host_port <host_port.in >host_port.tmp 2>&1
diff host_port.ref host_port.tmp
rm -f host_port.tmp
attr_scan_plain_test: attr_print_plain attr_scan_plain attr_scan_plain.ref
- (./attr_print_plain 2>&3 | (sleep 1; ./attr_scan_plain)) >attr_scan_plain.tmp 2>&1 3>&1
+ ($(SHLIB_ENV) ./attr_print_plain 2>&3 | (sleep 1; $(SHLIB_ENV) ./attr_scan_plain)) >attr_scan_plain.tmp 2>&1 3>&1
diff attr_scan_plain.ref attr_scan_plain.tmp
rm -f attr_scan_plain.tmp
htable_test: htable /usr/share/dict/words
- ./htable < /usr/share/dict/words
+ $(SHLIB_ENV) ./htable < /usr/share/dict/words
hex_code_test: hex_code
- ./hex_code
+ $(SHLIB_ENV) ./hex_code
timecmp_test: timecmp
- ./timecmp
+ $(SHLIB_ENV) ./timecmp
myaddrinfo_test: myaddrinfo myaddrinfo.ref myaddrinfo.ref2
- ./myaddrinfo all belly.porcupine.org 168.100.189.2 >myaddrinfo.tmp 2>&1
+ $(SHLIB_ENV) ./myaddrinfo all belly.porcupine.org 168.100.189.2 >myaddrinfo.tmp 2>&1
diff myaddrinfo.ref myaddrinfo.tmp
rm -f myaddrinfo.tmp
- ./myaddrinfo all null.porcupine.org 10.0.0.0 >myaddrinfo.tmp 2>&1
+ $(SHLIB_ENV) ./myaddrinfo all null.porcupine.org 10.0.0.0 >myaddrinfo.tmp 2>&1
diff myaddrinfo.ref2 myaddrinfo.tmp
rm -f myaddrinfo.tmp
myaddrinfo4_test: myaddrinfo4 myaddrinfo4.ref myaddrinfo4.ref2
- ./myaddrinfo4 all belly.porcupine.org 168.100.189.2 >myaddrinfo4.tmp 2>&1
+ $(SHLIB_ENV) ./myaddrinfo4 all belly.porcupine.org 168.100.189.2 >myaddrinfo4.tmp 2>&1
diff myaddrinfo4.ref myaddrinfo4.tmp
- ./myaddrinfo4 all null.porcupine.org 10.0.0.0 >myaddrinfo4.tmp 2>&1
+ $(SHLIB_ENV) ./myaddrinfo4 all null.porcupine.org 10.0.0.0 >myaddrinfo4.tmp 2>&1
diff myaddrinfo4.ref2 myaddrinfo4.tmp
rm -f myaddrinfo4.tmp
format_tv_test: format_tv format_tv.in format_tv.ref
- ./format_tv <format_tv.in >format_tv.tmp
+ $(SHLIB_ENV) ./format_tv <format_tv.in >format_tv.tmp
diff format_tv.ref format_tv.tmp
rm -f format_tv.tmp
ip_match_test: ip_match ip_match.in ip_match.ref
- ./ip_match <ip_match.in >ip_match.tmp
+ $(SHLIB_ENV) ./ip_match <ip_match.in >ip_match.tmp
diff ip_match.ref ip_match.tmp
rm -f ip_match.tmp
name_mask_test7 name_mask_test8 name_mask_test9
name_mask_test0: name_mask name_mask.in name_mask.ref0
- ./name_mask IGNORE IGNORE < name_mask.in > name_mask.tmp 2>&0
+ $(SHLIB_ENV) ./name_mask IGNORE IGNORE < name_mask.in > name_mask.tmp 2>&0
diff name_mask.ref0 name_mask.tmp
rm -f name_mask.tmp
name_mask_test1: name_mask name_mask.in name_mask.ref1
- ./name_mask NUMBER,WARN NUMBER < name_mask.in > name_mask.tmp 2>&1
+ $(SHLIB_ENV) ./name_mask NUMBER,WARN NUMBER < name_mask.in > name_mask.tmp 2>&1
diff name_mask.ref1 name_mask.tmp
rm -f name_mask.tmp
name_mask_test2: name_mask name_mask.in name_mask.ref2
- ./name_mask NUMBER,RETURN NUMBER < name_mask.in > name_mask.tmp 2>&1
+ $(SHLIB_ENV) ./name_mask NUMBER,RETURN NUMBER < name_mask.in > name_mask.tmp 2>&1
diff name_mask.ref2 name_mask.tmp
rm -f name_mask.tmp
name_mask_test3: name_mask name_mask.in name_mask.ref3
- ./name_mask WARN NUMBER < name_mask.in > name_mask.tmp 2>&1
+ $(SHLIB_ENV) ./name_mask WARN NUMBER < name_mask.in > name_mask.tmp 2>&1
diff name_mask.ref3 name_mask.tmp
rm -f name_mask.tmp
name_mask_test4: name_mask name_mask.in name_mask.ref4
- ./name_mask RETURN NUMBER < name_mask.in > name_mask.tmp 2>&1
+ $(SHLIB_ENV) ./name_mask RETURN NUMBER < name_mask.in > name_mask.tmp 2>&1
diff name_mask.ref4 name_mask.tmp
rm -f name_mask.tmp
name_mask_test5: name_mask name_mask.in name_mask.ref5
- ./name_mask NUMBER,WARN RETURN < name_mask.in > name_mask.tmp 2>&1
+ $(SHLIB_ENV) ./name_mask NUMBER,WARN RETURN < name_mask.in > name_mask.tmp 2>&1
diff name_mask.ref5 name_mask.tmp
rm -f name_mask.tmp
name_mask_test6: name_mask name_mask.in name_mask.ref6
- ./name_mask NUMBER,WARN WARN < name_mask.in > name_mask.tmp 2>&1
+ $(SHLIB_ENV) ./name_mask NUMBER,WARN WARN < name_mask.in > name_mask.tmp 2>&1
diff name_mask.ref6 name_mask.tmp
rm -f name_mask.tmp
name_mask_test7: name_mask name_mask.in name_mask.ref7
- ./name_mask NUMBER,WARN IGNORE < name_mask.in > name_mask.tmp 2>&1
+ $(SHLIB_ENV) ./name_mask NUMBER,WARN IGNORE < name_mask.in > name_mask.tmp 2>&1
diff name_mask.ref7 name_mask.tmp
rm -f name_mask.tmp
name_mask_test8: name_mask name_mask.in name_mask.ref8
- ./name_mask NUMBER,WARN NUMBER,COMMA < name_mask.in > name_mask.tmp 2>&1
+ $(SHLIB_ENV) ./name_mask NUMBER,WARN NUMBER,COMMA < name_mask.in > name_mask.tmp 2>&1
diff name_mask.ref8 name_mask.tmp
rm -f name_mask.tmp
name_mask_test9: name_mask name_mask.in name_mask.ref9
- ./name_mask NUMBER,WARN NUMBER,PIPE < name_mask.in > name_mask.tmp 2>&1
+ $(SHLIB_ENV) ./name_mask NUMBER,WARN NUMBER,PIPE < name_mask.in > name_mask.tmp 2>&1
diff name_mask.ref9 name_mask.tmp
rm -f name_mask.tmp
base32_code_test: base32_code
- ./base32_code
+ $(SHLIB_ENV) ./base32_code
dict_thash_test: ../postmap/postmap dict_thash.map
- ../postmap/postmap -s texthash:dict_thash.map >dict_thash.tmp 2>&1
+ $(SHLIB_ENV) ../postmap/postmap -s texthash:dict_thash.map >dict_thash.tmp 2>&1
sort dict_thash.tmp | diff -b dict_thash.map -
rm -f dict_thash.tmp
surrogate_test: dict_open surrogate.ref
cp /dev/null surrogate.tmp
- echo get foo|./dict_open cidr:/xx write >>surrogate.tmp 2>&1
- echo get foo|./dict_open cidr:/xx read >>surrogate.tmp 2>&1
- echo get foo|./dict_open pcre:/xx write >>surrogate.tmp 2>&1
- echo get foo|./dict_open pcre:/xx read >>surrogate.tmp 2>&1
- echo get foo|./dict_open regexp:/xx write >>surrogate.tmp 2>&1
- echo get foo|./dict_open regexp:/xx read >>surrogate.tmp 2>&1
- echo get foo|./dict_open unix:xx write >>surrogate.tmp 2>&1
- echo get foo|./dict_open unix:xx read >>surrogate.tmp 2>&1
- echo get foo|./dict_open texthash:/xx write >>surrogate.tmp 2>&1
- echo get foo|./dict_open texthash:/xx read >>surrogate.tmp 2>&1
- echo get foo|./dict_open hash:/xx read >>surrogate.tmp 2>&1
+ echo get foo|$(SHLIB_ENV) ./dict_open cidr:/xx write >>surrogate.tmp 2>&1
+ echo get foo|$(SHLIB_ENV) ./dict_open cidr:/xx read >>surrogate.tmp 2>&1
+ echo get foo|$(SHLIB_ENV) ./dict_open pcre:/xx write >>surrogate.tmp 2>&1
+ echo get foo|$(SHLIB_ENV) ./dict_open pcre:/xx read >>surrogate.tmp 2>&1
+ echo get foo|$(SHLIB_ENV) ./dict_open regexp:/xx write >>surrogate.tmp 2>&1
+ echo get foo|$(SHLIB_ENV) ./dict_open regexp:/xx read >>surrogate.tmp 2>&1
+ echo get foo|$(SHLIB_ENV) ./dict_open unix:xx write >>surrogate.tmp 2>&1
+ echo get foo|$(SHLIB_ENV) ./dict_open unix:xx read >>surrogate.tmp 2>&1
+ echo get foo|$(SHLIB_ENV) ./dict_open texthash:/xx write >>surrogate.tmp 2>&1
+ echo get foo|$(SHLIB_ENV) ./dict_open texthash:/xx read >>surrogate.tmp 2>&1
+ echo get foo|$(SHLIB_ENV) ./dict_open hash:/xx read >>surrogate.tmp 2>&1
diff surrogate.ref surrogate.tmp
rm -f surrogate.tmp
#include <split_at.h>
#include <htable.h>
#include <myflock.h>
+#include <dynamicmaps.h>
/*
* lookup table for available map types.
dict_type, dict_name);
if (dict_open_hash == 0)
dict_open_init();
- if ((dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type)) == 0)
+ if ((dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type)) == 0) {
+#ifdef USE_DYNAMIC_LIBS
+ dymap_open_t open_fn;
+
+ if ((open_fn = dymap_get_open_fn(dict_type)) == 0)
+ return (dict_surrogate(dict_type, dict_name, open_flags, dict_flags,
+ "unsupported dictionary type: %s", dict_type));
+ dict_open_register(dict_type, open_fn);
+ dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type);
+#else
return (dict_surrogate(dict_type, dict_name, open_flags, dict_flags,
"unsupported dictionary type: %s", dict_type));
+#endif
+ }
if ((dict = dp->open(dict_name, open_flags, dict_flags)) == 0)
return (dict_surrogate(dict_type, dict_name, open_flags, dict_flags,
"cannot open %s:%s: %m", dict_type, dict_name));
dp = (DICT_OPEN_INFO *) ht[0]->value;
argv_add(mapnames, dp->type, ARGV_END);
}
+#ifdef USE_DYNAMIC_LIBS
+ dymap_list(mapnames);
+#endif
qsort((void *) mapnames->argv, mapnames->argc, sizeof(mapnames->argv[0]),
dict_sort_alpha_cpp);
myfree((char *) ht_info);
--- /dev/null
+/*++
+/* NAME
+/* dynamicmaps 3
+/* SUMMARY
+/* load dictionaries dynamically
+/* SYNOPSIS
+/* #include <dynamicmaps.h>
+/*
+/* typedef void *(*dymap_mkmap_t) (const char *)
+/* typedef DICT *(*dymap_open_t) (const char *, int, int)
+/*
+/* void dymap_init(const char *path)
+/*
+/* ARGV *dymap_list(ARGV *map_names)
+/*
+/* dymap_open_t dymap_get_open_fn(const char *dict_type)
+/*
+/* dymap_mkmap_t dymap_get_mkmap_fn(const char *dict_type)
+/* DESCRIPTION
+/* This module reads the dynamicmaps.cf file and performs
+/* run-time loading of Postfix dictionaries. Each dynamicmaps.cf
+/* entry specifies the name of a dictionary type, the pathname
+/* of a shared-library object, the name of an "open" function
+/* for access to individual dictionary entries, and optionally
+/* the name of a "mkmap" function for bulk-mode dictionary
+/* creation.
+/*
+/* dymap_init() must be called at least once before any other
+/* functions in this module. This function reads the specified
+/* configuration file which is in dynamicmaps.cf format, and
+/* may be called multiple times during a process lifetime.
+/*
+/* dymap_list() appends to its argument the names of dictionary
+/* types available in dynamicmaps.cf.
+/*
+/* dymap_get_open_fn() loads the specified dictionary and
+/* returns a function pointer to its "open" function.
+/*
+/* dymap_get_mkmap_fn() loads the specified dictionary and
+/* returns a function pointer to its "mkmap" function.
+/* SEE ALSO
+/* load_lib(3) low-level run-time linker adapter
+/* DIAGNOSTICS
+/* Fatal errors: memory allocation problem, dictionary or
+/* dictionary function not available. Panic: invalid use.
+/* LICENSE
+/* .ad
+/* .fi
+/* The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/* LaMont Jones
+/* Hewlett-Packard Company
+/* 3404 Harmony Road
+/* Fort Collins, CO 80528, USA
+/*
+/* Wietse Venema
+/* IBM T.J. Watson Research
+/* P.O. Box 704
+/* Yorktown Heights, NY 10598, USA
+/*--*/
+
+ /*
+ * System library.
+ */
+#include <sys_defs.h>
+#include <sys/stat.h>
+#include <string.h>
+
+ /*
+ * Utility library.
+ */
+#include <msg.h>
+#include <mymalloc.h>
+#include <argv.h>
+#include <dict.h>
+#include <load_lib.h>
+#include <dynamicmaps.h>
+#include <load_lib.h>
+#include <vstring.h>
+#include <vstream.h>
+#include <vstring_vstream.h>
+#include <mvect.h>
+
+#ifdef USE_DYNAMIC_LIBS
+
+ /*
+ * Contents of one dynamicmaps.cf entry.
+ */
+typedef struct {
+ const char *dict_type;
+ const char *soname;
+ const char *open_name;
+ const char *mkmap_name;
+} DICT_DL_INFO;
+
+static DICT_DL_INFO *dict_dlinfo;
+
+#define STREQ(x, y) (strcmp((x), (y)) == 0)
+
+/* dymap_init - initialize dictionary type to soname etc. mapping */
+
+void dymap_init(const char *path)
+{
+ VSTREAM *conf_fp;
+ VSTRING *buf;
+ char *cp;
+ ARGV *argv;
+ static MVECT vector;
+ int nelm = 0;
+ int linenum = 0;
+
+ if (dict_dlinfo != 0)
+ mvect_free(&vector);
+
+ dict_dlinfo =
+ (DICT_DL_INFO *) mvect_alloc(&vector, sizeof(DICT_DL_INFO), 3, 0, 0);
+
+ /* Silently ignore missing dynamic maps file. */
+ if ((conf_fp = vstream_fopen(path, O_RDONLY, 0)) != 0) {
+ buf = vstring_alloc(100);
+ while (vstring_get_nonl(buf, conf_fp) != VSTREAM_EOF) {
+ cp = vstring_str(buf);
+ linenum++;
+ if (*cp == '#' || *cp == '\0')
+ continue;
+ argv = argv_split(cp, " \t");
+ if (argv->argc != 3 && argv->argc != 4) {
+ msg_fatal("%s: Expected \"dict_type .so-name open-function"
+ " [mkmap-function]\" at line %d", path, linenum);
+ }
+ if (STREQ(argv->argv[0], "*")) {
+ msg_warn("%s: wildcard dynamic map entry no longer supported.",
+ path);
+ continue;
+ }
+ if (argv->argv[1][0] != '/') {
+ msg_fatal("%s: .so name must begin with a \"/\" at line %d",
+ path, linenum);
+ }
+ if (nelm >= vector.nelm) {
+ dict_dlinfo = (DICT_DL_INFO *) mvect_realloc(&vector, vector.nelm + 3);
+ }
+ dict_dlinfo[nelm].dict_type = mystrdup(argv->argv[0]);
+ dict_dlinfo[nelm].soname = mystrdup(argv->argv[1]);
+ dict_dlinfo[nelm].open_name = mystrdup(argv->argv[2]);
+ if (argv->argc == 4)
+ dict_dlinfo[nelm].mkmap_name = mystrdup(argv->argv[3]);
+ else
+ dict_dlinfo[nelm].mkmap_name = NULL;
+ nelm++;
+ argv_free(argv);
+ }
+ vstring_free(buf);
+ vstream_fclose(conf_fp);
+ }
+ if (nelm >= vector.nelm) {
+ dict_dlinfo = (DICT_DL_INFO *) mvect_realloc(&vector, vector.nelm + 1);
+ }
+ dict_dlinfo[nelm].dict_type = NULL;
+ dict_dlinfo[nelm].soname = NULL;
+ dict_dlinfo[nelm].open_name = NULL;
+ dict_dlinfo[nelm].mkmap_name = NULL;
+}
+
+/* dymap_list - enumerate dynamically-linked database type names */
+
+ARGV *dymap_list(ARGV *map_names)
+{
+ static const char myname[] = "dymap_list";
+ DICT_DL_INFO *dl;
+
+ if (!dict_dlinfo)
+ msg_panic("%s: dlinfo==NULL", myname);
+ if (map_names == 0)
+ map_names = argv_alloc(2);
+ for (dl = dict_dlinfo; dl->dict_type; dl++) {
+ argv_add(map_names, dl->dict_type, ARGV_END);
+ }
+ return (map_names);
+}
+
+/* dymap_find - find dynamically-linked database metadata */
+
+static DICT_DL_INFO *dymap_find(const char *dict_type)
+{
+ static const char myname[] = "dymap_find";
+ DICT_DL_INFO *dp;
+
+ if (!dict_dlinfo)
+ msg_panic("%s: dlinfo==NULL", myname);
+
+ for (dp = dict_dlinfo; dp->dict_type; dp++) {
+ if (STREQ(dp->dict_type, dict_type))
+ return dp;
+ }
+ return (0);
+}
+
+/* dymap_get_open_fn - look up "dict_foo_open" function */
+
+dymap_open_t dymap_get_open_fn(const char *dict_type)
+{
+ struct stat st;
+ LIB_FN fn[2];
+ dymap_open_t open_fn;
+ DICT_DL_INFO *dl;
+
+ if ((dl = dymap_find(dict_type)) == 0
+ || stat(dl->soname, &st) < 0
+ || dl->open_name == 0)
+ return (0);
+ fn[0].name = dl->open_name;
+ fn[0].ptr = (void **) &open_fn;
+ fn[1].name = NULL;
+ load_library_symbols(dl->soname, fn, NULL);
+ return (open_fn);
+}
+
+/* dymap_get_mkmap_fn - look up "mkmap_foo_open" function */
+
+dymap_mkmap_t dymap_get_mkmap_fn(const char *dict_type)
+{
+ struct stat st;
+ LIB_FN fn[2];
+ dymap_mkmap_t mkmap_fn;
+ DICT_DL_INFO *dl;
+
+ dl = dymap_find(dict_type);
+ if (!dl)
+ msg_fatal("unsupported dictionary type: %s. "
+ "Is the postfix-%s package installed?",
+ dict_type, dict_type);
+ if (stat(dl->soname, &st) < 0) {
+ msg_fatal("unsupported dictionary type: %s (%s not found). "
+ "Is the postfix-%s package installed?",
+ dict_type, dl->soname, dict_type);
+ }
+ if (!dl->mkmap_name)
+ msg_fatal("unsupported dictionary type: %s does not support "
+ "bulk-mode creation.", dict_type);
+ fn[0].name = dl->mkmap_name;
+ fn[0].ptr = (void **) &mkmap_fn;
+ fn[1].name = NULL;
+ load_library_symbols(dl->soname, fn, NULL);
+ return (mkmap_fn);
+}
+
+#endif
--- /dev/null
+#ifndef _DYNAMICMAPS_H_INCLUDED_
+#define _DYNAMICMAPS_H_INCLUDED_
+
+/*++
+/* NAME
+/* dynamicmaps 3h
+/* SUMMARY
+/* load dictionaries dynamically
+/* SYNOPSIS
+/* #include <dynamicmaps.h>
+/* DESCRIPTION
+/* .nf
+
+ /*
+ * Utility library.
+ */
+#include <argv.h>
+
+ /*
+ * External interface.
+ */
+#ifdef USE_DYNAMIC_LIBS
+
+typedef DICT *(*dymap_open_t) (const char *, int, int);
+typedef void *(*dymap_mkmap_t) (const char *);
+
+extern void dymap_init(const char *);
+extern ARGV *dymap_list(ARGV *);
+extern dymap_open_t dymap_get_open_fn(const char *);
+extern dymap_mkmap_t dymap_get_mkmap_fn(const char *);
+
+#endif
+/* LICENSE
+/* .ad
+/* .fi
+/* The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/* LaMont Jones
+/* Hewlett-Packard Company
+/* 3404 Harmony Road
+/* Fort Collins, CO 80528, USA
+/*
+/* Wietse Venema
+/* IBM T.J. Watson Research
+/* P.O. Box 704
+/* Yorktown Heights, NY 10598, USA
+/*--*/
+
+#endif
--- /dev/null
+/*++
+/* NAME
+/* load_lib 3
+/* SUMMARY
+/* library loading wrappers
+/* SYNOPSIS
+/* #include <load_lib.h>
+/*
+/* extern int load_library_symbols(const char *, LIB_FN *, LIB_FN *);
+/* const char *libname;
+/* LIB_FN *libfuncs;
+/* LIB_FN *libdata;
+/*
+/* DESCRIPTION
+/* This module loads functions from libraries, returning pointers
+/* to the named functions.
+/*
+/* load_library_symbols() loads all of the desired functions, and
+/* returns zero for success, or exits via msg_fatal().
+/*
+/* SEE ALSO
+/* msg(3) diagnostics interface
+/* DIAGNOSTICS
+/* Problems are reported via the msg(3) diagnostics routines:
+/* library not found, symbols not found, other fatal errors.
+/* LICENSE
+/* .ad
+/* .fi
+/* The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/* LaMont Jones
+/* Hewlett-Packard Company
+/* 3404 Harmony Road
+/* Fort Collins, CO 80528, USA
+/*
+/* Wietse Venema
+/* IBM T.J. Watson Research
+/* P.O. Box 704
+/* Yorktown Heights, NY 10598, USA
+/*--*/
+
+/* System libraries. */
+
+#include "sys_defs.h"
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+#if defined(HAS_DLOPEN)
+#include <dlfcn.h>
+#elif defined(HAS_SHL_LOAD)
+#include <dl.h>
+#endif
+
+/* Application-specific. */
+
+#include "msg.h"
+#include "load_lib.h"
+
+int load_library_symbols(const char *libname, LIB_FN *libfuncs,
+ LIB_FN *libdata)
+{
+ static const char *myname = "load_library_symbols";
+ LIB_FN *fn;
+
+#if defined(HAS_DLOPEN)
+ void *handle;
+ char *emsg;
+
+ if ((handle = dlopen(libname, RTLD_NOW)) == 0) {
+ emsg = dlerror();
+ msg_fatal("%s: dlopen failure loading %s: %s", myname, libname, emsg);
+ }
+ if (libfuncs) {
+ for (fn = libfuncs; fn->name; fn++) {
+ if ((*(fn->ptr) = dlsym(handle, fn->name)) == 0) {
+ emsg = dlerror();
+ msg_fatal("%s: dlsym failure looking up %s in %s: %s", myname,
+ fn->name, libname, emsg);
+ }
+ if (msg_verbose > 1) {
+ msg_info("loaded %s = %lx", fn->name, *((long *) (fn->ptr)));
+ }
+ }
+ }
+ if (libdata) {
+ for (fn = libdata; fn->name; fn++) {
+ if ((*(fn->ptr) = dlsym(handle, fn->name)) == 0) {
+ emsg = dlerror();
+ msg_fatal("%s: dlsym failure looking up %s in %s: %s", myname,
+ fn->name, libname, emsg);
+ }
+ if (msg_verbose > 1) {
+ msg_info("loaded %s = %lx", fn->name, *((long *) (fn->ptr)));
+ }
+ }
+ }
+#elif defined(HAS_SHL_LOAD)
+ shl_t handle;
+
+ handle = shl_load(libname, BIND_IMMEDIATE, 0);
+
+ if (libfuncs) {
+ for (fn = libfuncs; fn->name; fn++) {
+ if (shl_findsym(&handle, fn->name, TYPE_PROCEDURE, fn->ptr) != 0) {
+ msg_fatal("%s: shl_findsym failure looking up %s in %s: %m",
+ myname, fn->name, libname);
+ }
+ if (msg_verbose > 1) {
+ msg_info("loaded %s = %x", fn->name, *((long *) (fn->ptr)));
+ }
+ }
+ }
+ if (libdata) {
+ for (fn = libdata; fn->name; fn++) {
+ if (shl_findsym(&handle, fn->name, TYPE_DATA, fn->ptr) != 0) {
+ msg_fatal("%s: shl_findsym failure looking up %s in %s: %m",
+ myname, fn->name, libname);
+ }
+ if (msg_verbose > 1) {
+ msg_info("loaded %s = %x", fn->name, *((long *) (fn->ptr)));
+ }
+ }
+ }
+#else
+ msg_fatal("%s: need dlopen or shl_load support for dynamic libraries",
+ myname);
+#endif
+ return 0;
+}
--- /dev/null
+#ifndef _LOAD_LIB_H_INCLUDED_
+#define _LOAD_LIB_H_INCLUDED_
+
+/*++
+/* NAME
+/* load_lib 3h
+/* SUMMARY
+/* library loading wrappers
+/* SYNOPSIS
+/* #include "load_lib.h"
+/* DESCRIPTION
+/* .nf
+
+ /*
+ * External interface.
+ */
+/* NULL name terminates list */
+typedef struct LIB_FN {
+ const char *name;
+ void **ptr;
+} LIB_FN;
+
+extern int load_library_symbols(const char *, LIB_FN *, LIB_FN *);
+
+/* LICENSE
+/* .ad
+/* .fi
+/* The Secure Mailer license must be distributed with this software.
+/* AUTHOR(S)
+/* LaMont Jones
+/* Hewlett-Packard Company
+/* 3404 Harmony Road
+/* Fort Collins, CO 80528, USA
+/*
+/* Wietse Venema
+/* IBM T.J. Watson Research
+/* P.O. Box 704
+/* Yorktown Heights, NY 10598, USA
+/*--*/
+
+#endif
#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
#define NATIVE_COMMAND_DIR "/usr/sbin"
#define NATIVE_DAEMON_DIR "/usr/libexec/postfix"
+#define HAS_DLOPEN
#endif
#ifdef FREEBSD2
#ifndef NO_POSIX_GETPW_R
# define HAVE_POSIX_GETPW_R
#endif
-
+#define HAS_DLOPEN
#endif
/*
#define STATFS_IN_SYS_VFS_H
#define PREPEND_PLUS_TO_OPTSTRING
#define HAS_POSIX_REGEXP
+#define HAS_DLOPEN
#define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
#define NATIVE_MAILQ_PATH "/usr/bin/mailq"
#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
#define USE_STATFS
#define STATFS_IN_SYS_VFS_H
#define HAS_POSIX_REGEXP
+#define HAS_DLOPEN
#define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
#define NATIVE_MAILQ_PATH "/usr/bin/mailq"
#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
#define USE_STATFS
#define STATFS_IN_SYS_VFS_H
#define HAS_POSIX_REGEXP
+#define HAS_SHL_LOAD
#define NATIVE_SENDMAIL_PATH "/usr/sbin/sendmail"
#define NATIVE_MAILQ_PATH "/usr/bin/mailq"
#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
#define USE_STATFS
#define STATFS_IN_SYS_VFS_H
#define HAS_POSIX_REGEXP
+#define HAS_SHL_LOAD
#define NATIVE_SENDMAIL_PATH "/usr/bin/sendmail"
#define NATIVE_MAILQ_PATH "/usr/bin/mailq"
#define NATIVE_NEWALIAS_PATH "/usr/bin/newaliases"
TESTPROG=
PROG = verify
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
PROG = virtual
TESTPROG=
INC_DIR = ../../include
-LIBS = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PREFIX)master$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
.c.o:; $(CC) $(CFLAGS) -c $*.c
$(PROG): $(OBJS) $(LIBS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
+ $(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
$(OBJS): ../../conf/makedefs.out
LIB = libxsasl.a
TESTPROG=
-LIBS = ../../lib/libglobal.a ../../lib/libutil.a
+LIBS = ../../lib/lib$(LIB_PERFIX)global$(LIB_SUFFIX) \
+ ../../lib/lib$(LIB_PERFIX)util$(LIB_SUFFIX)
LIB_DIR = ../../lib
INC_DIR = ../../include
MAKES =
root_tests:
$(LIB): $(OBJS)
- $(AR) $(ARFL) $(LIB) $?
- $(RANLIB) $(LIB)
+ $(_AR) $(ARFL) $(LIB) $?
+ $(_RANLIB) $(LIB)
$(LIB_DIR)/$(LIB): $(LIB)
cp $(LIB) $(LIB_DIR)
- $(RANLIB) $(LIB_DIR)/$(LIB)
+ $(_RANLIB) $(LIB_DIR)/$(LIB)
update: $(LIB_DIR)/$(LIB) $(HDRS)
-for i in $(HDRS); \