NAME
postmulti - Postfix multi-instance manager
SYNOPSIS
postmulti -l [-aRv] [-g group] [-i name]
postmulti -p [-av] [-g group] [-i name] command...
postmulti -x [-aRv] [-g group] [-i name] command...
postmulti -e init [-v]
postmulti -e create [-av] [-g group] [-i name] [-G group] [-I name] [param=value ...]
postmulti -e import [-av] [-g group] [-i name] [-G group] [-I name] [config_directory=/path]
postmulti -e destroy [-v] -i name
postmulti -e deport [-v] -i name
postmulti -e enable [-v] -i name
postmulti -e disable [-v] -i name
postmulti -e assign [-v] -i name [-I name] [-G group]
DESCRIPTION
The postmulti(1) command allows a Postfix administrator to manage multiple Postfix instances on a single host.
postmulti(1) implements two fundamental modes of operation. In iterator mode, it executes the same command for multiple Postfix instances. In life-cycle management mode, it adds or deletes one instance, or changes the multi-instance status of one instance.
Each mode of operation has its own command syntax. For this reason, each mode is documented in separate sections below.
BACKGROUND
A multi-instance configuration consists of one primary Postfix instance, and one or more secondary instances whose configuration directory pathnames are recorded in the primary instances main.cf file. Postfix instances share program files and documentation, but have their own configuration, queue and data directories.
Currently, only the default Postfix instance can be used as primary instance in a multi-instance configuration. The postmulti(1) command does not currently support a -c option to select an alternative primary instance, and exits with a fatal error if the MAIL_CONFIG environment variable is set to a non-default configuration directory.
See the MULTI_INSTANCE_README tutorial for a more detailed discussion of multi-instance management with postmulti(1).
ITERATOR MODE
In iterator mode, postmulti performs the same operation on all Postfix instances in turn.
If multi-instance support is not enabled, the requested command is performed just for the primary instance.
Iterator mode implements the following command options:
Instance selection
-a | Perform the operation on all instances. This is the default. |
-g group | Perform the operation only for members of the named group. |
-i name | Perform the operation only for the instance with the specified name. You can specify either the instance name or the absolute pathname of the instances configuration directory. Specify "-" to select the primary Postfix instance. |
-R |
Reverse the iteration order. This may be appropriate when
updating a multi-instance system, where "sink" instances
are started before "source" instances.
This option cannot be used with -p. |
List mode
-l | List Postfix instances with their instance name, instance group name, enable/disable status and configuration directory. |
Postfix-wrapper mode
-p |
Invoke postfix(1) to execute the specified command.
This option implements the postfix-wrapper(5) interface.
| ||||||||
The -p option can also be used interactively to
start/stop/etc. a named instance or instance group. For
example, to start just the instances in the group "msa",
invoke postmulti(1) as follows:
| |||||||||
Command mode
-x | Execute the specified command for all Postfix instances. The command runs with appropriate environment settings for MAIL_CONFIG, command_directory, daemon_directory, config_directory, queue_directory, data_directory, multi_instance_name, multi_instance_group and multi_instance_enable. |
Other options
-v | Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose. |
LIFE-CYCLE MANAGEMENT MODE
With the -e option postmulti(1) can be used to add or delete a Postfix instance, and to manage the multi-instance status of an existing instance.
The following options are implemented:
Existing instance selection
-a | When creating or importing an instance, place the new instance at the front of the secondary instance list. |
-g group | When creating or importing an instance, place the new instance before the first secondary instance that is a member of the specified group. |
-i name |
When creating or importing an instance, place the new
instance before the matching secondary instance.
With other life-cycle operations, apply the operation to the named existing instance. Specify "-" to select the primary Postfix instance. |
New or existing instance name assignment
-I name | Assign the specified instance name to an existing instance, newly-created instance, or imported instance. Instance names other than "-" (which makes the instance "nameless") must start with "postfix-". This restriction reduces the likelihood of name collisions with system files. |
-G group | Assign the specified group name to an existing instance or to a newly created or imported instance. |
Instance creation/deletion/status change
-e action |
"Edit" managed instances. The following actions are supported:
| ||||||||||||||||||||||||
Other options
-v | Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose. |
ENVIRONMENT
The postmulti(1) command exports the following environment variables before executing the requested command for a given instance:
MAIL_VERBOSE | This is set when the -v command-line option is present. |
MAIL_CONFIG | The location of the configuration directory of the instance. |
CONFIGURATION PARAMETERS
config_directory (see postconf -d output) | The default location of the Postfix main.cf and master.cf configuration files. |
daemon_directory (see postconf -d output) | The directory with Postfix support programs and daemon programs. |
import_environment (see postconf -d output) | The list of environment parameters that a Postfix process will import from a non-Postfix parent process. |
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_group (empty) | The optional instance group name of this Postfix instance. |
multi_instance_name (empty) | The optional instance name of this Postfix instance. |
multi_instance_enable (no) | Allow this Postfix instance to be started, stopped, etc., by a multi-instance manager. |
postmulti_start_commands (start) | The postfix(1) commands that the postmulti(1) instance manager treats as "start" commands. |
postmulti_stop_commands (see postconf -d output) | The postfix(1) commands that the postmulti(1) instance manager treats as "stop" commands. |
postmulti_control_commands (reload flush) | The postfix(1) commands that the postmulti(1) instance manager treats as "control" commands, that operate on running instances. |
syslog_facility (mail) | The syslog facility of Postfix logging. |
syslog_name (see postconf -d output) | The mail system name that is prepended to the process name in syslog records, so that "smtpd" becomes, for example, "postfix/smtpd". |
FILES
$daemon_directory/main.cf, stock configuration file $daemon_directory/master.cf, stock configuration file $daemon_directory/postmulti-script, life-cycle helper program
SEE ALSO
postfix(1), Postfix control program postfix-wrapper(5), Postfix multi-instance API
README FILES
Use "postconf readme_directory" or "postconf html_directory" to locate this information. MULTI_INSTANCE_README, Postfix multi-instance management
HISTORY
The postmulti(1) command was introduced with Postfix version 2.6.
LICENSE
The Secure Mailer license must be distributed with this software.
AUTHOR(S)
Victor Duchovni
Morgan Stanley
Wietse Venema
IBM T.J. Watson Research
P.O. Box 704
Yorktown Heights, NY 10598, USA