table of contents
- NAME
- DESCRIPTION
- GENERAL OPERATION
- MANAGING AN INDIVIDUAL POSTFIX INSTANCE
- ENABLING POSTFIX(1) MULTI-INSTANCE MODE
- PER-INSTANCE MULTI-INSTANCE MANAGER CONTROLS
- MAINTAINING SHARED AND NON-SHARED FILES
- MULTI-INSTANCE API SUMMARY
- ENVIRONMENT VARIABLES
- CONFIGURATION PARAMETERS
- NON-SHARED FILES
- SEE ALSO
- LICENSE
- AUTHOR(S)
other versions
- wheezy 2.9.6-2
- wheezy-backports 2.11.2-1~bpo70+1
- jessie 2.11.3-1+deb8u2
- testing 3.1.4-7
- unstable 3.1.4-7
- experimental 3.2.0-1
POSTFIX-WRAPPER(5) | File Formats Manual | POSTFIX-WRAPPER(5) |
NAME¶
postfix-wrapper - Postfix multi-instance APIDESCRIPTION¶
Support for managing multiple Postfix instances is available as of version 2.6. Instances share executable files and documentation, but have their own directories for configuration, queue and data files.
GENERAL OPERATION¶
Multi-instance support is backwards compatible: when you run only one Postfix instance, commands such as "postfix start" will not change behavior at all.
- # postfix start
- # postfix status
MANAGING AN INDIVIDUAL POSTFIX INSTANCE¶
To manage a specific Postfix instance, specify its configuration directory on the postfix(1) command line:
- # postfix -c /path/to/config_directory command
ENABLING POSTFIX(1) MULTI-INSTANCE MODE¶
By default, the postfix(1) command operates in single-instance mode. In this mode the command invokes the postfix-script file directly (currently installed in the daemon directory). This file contains the commands that start or stop one Postfix instance, that upgrade the configuration of one Postfix instance, and so on.
-
/etc/postfix/main.cf: multi_instance_wrapper = $daemon_directory/postfix-wrapper multi_instance_directories = /etc/postfix-test
-
#!/bin/sh : ${command_directory?"do not invoke this command directly"} POSTCONF=$command_directory/postconf POSTFIX=$command_directory/postfix instance_dirs=`$POSTCONF -h multi_instance_directories | sed 's/,/ /'` || exit 1 err=0 for dir in $config_directory $instance_dirs do case "$1" in stop|abort|flush|reload|drain) test "`$POSTCONF -c $dir -h multi_instance_enable`" \ = yes || continue;; start) test "`$POSTCONF -c $dir -h multi_instance_enable`" \ = yes || { $POSTFIX -c $dir check || err=$? continue };; esac $POSTFIX -c $dir "$@" || err=$? done exit $err
PER-INSTANCE MULTI-INSTANCE MANAGER CONTROLS¶
Each Postfix instance has its own main.cf file with parameters that control how the multi-instance manager operates on that instance. This section discusses the most important settings.
MAINTAINING SHARED AND NON-SHARED FILES¶
Some files are shared between Postfix instances, such as executables and manpages, and some files are per-instance, such as configuration files, mail queue files, and data files. See the NON-SHARED FILES section below for a list of per-instance files.
MULTI-INSTANCE API SUMMARY¶
Only the multi-instance manager implements support for the multi_instance_enable configuration parameter. The multi-instance manager will start only Postfix instances whose main.cf file has "multi_instance_enable = yes". A setting of "no" allows a Postfix instance to be tested by hand.
ENVIRONMENT VARIABLES¶
- MAIL_CONFIG
- When present, this forces the postfix(1) command to operate only on the specified Postfix instance. This environment variable is exported by the postfix(1) -c option, so that postfix(1) commands in descendant processes will work correctly.
CONFIGURATION PARAMETERS¶
The text below provides only a parameter summary. See postconf(5) for more details.
- multi_instance_directories (empty)
- An optional list of non-default Postfix configuration directories; 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.
- multi_instance_wrapper (empty)
- The pathname of a multi-instance manager command that the postfix(1) command invokes when the multi_instance_directories parameter value is non-empty.
- multi_instance_name (empty)
- The optional instance name of this Postfix instance.
- multi_instance_group (empty)
- The optional instance group name of this Postfix instance.
- multi_instance_enable (no)
- Allow this Postfix instance to be started, stopped, etc., by a multi-instance manager.
NON-SHARED FILES¶
- config_directory (see 'postconf -d' output)
- The default location of the Postfix main.cf and master.cf configuration files.
- data_directory (see 'postconf -d' output)
- The directory with Postfix-writable data files (for example: caches, pseudo-random numbers).
- queue_directory (see 'postconf -d' output)
- The location of the Postfix top-level queue directory.
SEE ALSO¶
postfix(1) Postfix control program postmulti(1) full-blown multi-instance manager $daemon_directory/postfix-wrapper simple multi-instance manager
LICENSE¶
The Secure Mailer license must be distributed with this software.
AUTHOR(S)¶
Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA