postmulti â Postfix multi-instance manager
| Use Case | Command | Description |
|---|---|---|
| đ Init multi-instance | postmulti -e init |
Enable multi-instance management for the primary instance |
| đ List instances | postmulti -l |
List all instances with name, group, status, and config directory |
| âļī¸ Start all instances | postmulti -p start |
Start all Postfix instances |
| âšī¸ Stop all instances | postmulti -p stop |
Stop all Postfix instances |
| âļī¸ Start a group | postmulti -g msa -p start |
Start instances in a specific group |
| â Create instance | postmulti -e create -I name |
Create a new Postfix instance |
| â Destroy instance | postmulti -e destroy -i name |
Destroy a stopped, disabled instance |
| â Enable instance | postmulti -e enable -i name |
Mark an instance as enabled |
| â Disable instance | postmulti -e disable -i name |
Mark an instance as disabled |
| đĻ Execute command | postmulti -x unix-command |
Run a Unix command across all instances with appropriate environment |
postmulti -e init [-v]
postmulti -l [-aRv] [-g group] [-i name]
postmulti -p [-av] [-g group] [-i name] postfix-command...
postmulti -x [-aRv] [-g group] [-i name] unix-command...
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]
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:
Each mode has its own command syntax, documented in separate sections below.
A multi-instance configuration consists of one primary Postfix instance and one or more secondary instances. The secondary instances' configuration directory pathnames are recorded in the primary instance's 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 the primary instance. The postmulti(1) command does not 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.
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.
-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 the instance name or the absolute pathname of its configuration directory. Specify "-" to select the primary Postfix instance.-R â Reverse the iteration order. This may be appropriate when updating a multi-instance system (e.g., "sink" instances started before "source" instances). This option cannot be used with -p.-l â List Postfix instances with their instance name, instance group name, enable/disable status, and configuration directory.-p postfix-command â Invoke postfix(1) to execute postfix-command. This implements the postfix-wrapper(5) interface.Behavior by command type:
postmulti_start_commands parameter.postmulti_stop_commands parameter.postmulti_control_commands parameter.The -p option can also be used interactively to start/stop a named instance or group. For example:
# postmulti -g msa -p start
-x unix-command â Execute the specified Unix 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.-v â Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose.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.
-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.-I name â Assign the specified instance name to an existing, newly-created, or imported instance. Instance names other than "-" (which makes the instance "nameless") must start with "postfix-". This reduces the risk of name collisions with system files.-G group â Assign the specified group name to an existing, newly created, or imported instance.-e action â "Edit" managed instances. The following actions are supported:init â Required before postmulti(1) can be used. Updates the primary instance's main.cf by setting multi_instance_wrapper and multi_instance_enable = yes.create â Create a new Postfix instance and add it to the multi_instance_directories parameter of the primary instance. The -I name option is recommended to give the instance a short name. Optional "name=value" arguments specify the instance's config_directory, queue_directory, and data_directory.import â Import an existing instance into the list of managed instances. For existing instances, create and import are identical.destroy â Destroy a secondary Postfix instance. The instance must be disabled, stopped, and its queue must be empty. The instance is removed from the primary instance's alternate_config_directories parameter, and its data, queue, and configuration directories are cleaned. This triggers potentially dangerous file removal operations.deport â Deport a secondary instance from the list of managed instances. Deletes the configuration directory from the primary instance's multi_instance_directories list, but does not remove any files or directories.assign â Assign a new instance name or a new group name to the selected instance. Use "-" to specify "no group" or "no name".enable â Mark the selected instance as enabled (sets multi_instance_enable = yes).disable â Mark the selected instance as disabled (will not be started with postfix start, etc.).-v â Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose.The postmulti(1) command exports the following environment variables before executing the requested command for a given instance:
MAIL_VERBOSE â Set when the -v command-line option is present.MAIL_CONFIG â The location of the configuration directory of the instance.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 privileged Postfix process will import from a non-Postfix parent process, or name=value environment overrides.multi_instance_directories (empty) â An optional list of non-default Postfix configuration directories; these belong to additional Postfix instances that share executable files and documentation.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 postmulti(1) treats as "start" commands.postmulti_stop_commands (see 'postconf -d' output) â The postfix(1) commands that postmulti(1) treats as "stop" commands.postmulti_control_commands (reload flush) â The postfix(1) commands that postmulti(1) treats as "control" commands, that operate on running instances.syslog_facility (mail) â The syslog facility of Postfix logging.syslog_name (see 'postconf -d' output) â A prefix that is prepended to the process name in syslog records.Available in Postfix 3.0 and later:
meta_directory (see 'postconf -d' output) â The location of non-executable files shared among multiple Postfix instances, such as postfix-files, dynamicmaps.cf, and the multi-instance template files main.cf.proto and master.cf.proto.shlib_directory (see 'postconf -d' output) â The location of Postfix dynamically-linked libraries (libpostfix-*.so), and the default location of Postfix database plugins.$meta_directory/main.cf.proto â Stock configuration file$meta_directory/master.cf.proto â Stock configuration file$daemon_directory/postmulti-script â Life-cycle helper programUse "postconf readme_directory" or "postconf html_directory" to locate this information.
The postmulti(1) command was introduced with Postfix version 2.6.
The Secure Mailer license must be distributed with this software.
Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-09 15:56 @216.73.216.150
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)