{
    "mode": "man",
    "parameter": "postmulti",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/postmulti/1/json",
    "generated": "2026-10-20T18:04:04Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "postmulti - Postfix multi-instance manager\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "Enabling multi-instance management:",
                    "content": "postmulti -e init [-v]\n"
                },
                {
                    "name": "Iterator mode:",
                    "content": "postmulti -l [-aRv] [-g group] [-i name]\n\npostmulti -p [-av] [-g group] [-i name] postfix-command...\n\npostmulti -x [-aRv] [-g group] [-i name] unix-command...\n"
                },
                {
                    "name": "Life-cycle management:",
                    "content": "postmulti -e create [-av] [-g group] [-i name] [-G group] [-I name] [param=value ...]\n\npostmulti -e import [-av] [-g group] [-i name] [-G group] [-I name] [configdirectory=/path]\n\npostmulti -e destroy [-v] -i name\n\npostmulti -e deport [-v] -i name\n\npostmulti -e enable [-v] -i name\n\npostmulti -e disable [-v] -i name\n\npostmulti -e assign [-v] -i name [-I name] [-G group]\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "The  postmulti(1) command allows a Postfix administrator to manage multiple Postfix instances\non a single host.\n\npostmulti(1) implements two fundamental modes of operation.  In iterator  mode,  it  executes\nthe  same  command for multiple Postfix instances.  In life-cycle management mode, it adds or\ndeletes one instance, or changes the multi-instance status of one instance.\n\nEach mode of operation has its own command syntax. For this reason, each mode  is  documented\nin separate sections below.\n",
            "subsections": []
        },
        "BACKGROUND": {
            "content": "A multi-instance configuration consists of one primary Postfix instance, and one or more sec‐\nondary  instances  whose  configuration  directory  pathnames are recorded in the primary in‐\nstance's main.cf file. Postfix instances share program  files  and  documentation,  but  have\ntheir own configuration, queue and data directories.\n\nCurrently,  only  the default Postfix instance can be used as primary instance in a multi-in‐\nstance configuration. The postmulti(1) command does not currently support a -c option to  se‐\nlect  an  alternative primary instance, and exits with a fatal error if the MAILCONFIG envi‐\nronment variable is set to a non-default configuration directory.\n\nSee the MULTIINSTANCEREADME tutorial for a more detailed discussion of multi-instance  man‐\nagement with postmulti(1).\n",
            "subsections": []
        },
        "ITERATOR MODE": {
            "content": "In iterator mode, postmulti performs the same operation on all Postfix instances in turn.\n\nIf  multi-instance  support  is  not enabled, the requested command is performed just for the\nprimary instance.\n\nIterator mode implements the following command options:\n",
            "subsections": []
        },
        "Instance selection": {
            "content": "",
            "subsections": [
                {
                    "name": "-a",
                    "content": "",
                    "flag": "-a"
                },
                {
                    "name": "-g _",
                    "content": "Perform the operation only for members of the named group.\n",
                    "flag": "-g"
                },
                {
                    "name": "-i _",
                    "content": "Perform the operation only for the instance with the specified name.  You can  specify\neither  the instance name or the absolute pathname of the instance's configuration di‐\nrectory.  Specify \"-\" to select the primary Postfix instance.\n",
                    "flag": "-i"
                },
                {
                    "name": "-R",
                    "content": "system, where \"sink\" instances are started before \"source\" instances.\n\nThis option cannot be used with -p.\n\nList mode",
                    "flag": "-R"
                },
                {
                    "name": "-l",
                    "content": "status and configuration directory.\n",
                    "flag": "-l"
                }
            ]
        },
        "Postfix-wrapper mode": {
            "content": "",
            "subsections": [
                {
                    "name": "-p _",
                    "content": "Invoke postfix(1) to  execute  postfix-command.   This  option  implements  the  post‐\nfix-wrapper(5) interface.\n\n•      With  \"start\"-like commands, \"postfix check\" is executed for instances that are\nnot  enabled.  The  full  list  of  commands  is  specified  with   the   post‐\nmultistartcommands parameter.\n\n•      With  \"stop\"-like  commands,  the iteration order is reversed, and disabled in‐\nstances are skipped. The full list of commands  is  specified  with  the  post‐\nmultistopcommands parameter.\n\n•      With  \"reload\" and other commands that require a started instance, disabled in‐\nstances are skipped. The full list of commands  is  specified  with  the  post‐\nmulticontrolcommands parameter.\n\n•      With  \"status\"  and  other  commands that don't require a started instance, the\ncommand is executed for all instances.\n\nThe -p option can also be used interactively to start/stop/etc.  a named  instance  or\ninstance  group.  For  example, to start just the instances in the group \"msa\", invoke\npostmulti(1) as follows:\n\n# postmulti -g msa -p start\n",
                    "flag": "-p"
                }
            ]
        },
        "Command mode": {
            "content": "",
            "subsections": [
                {
                    "name": "-x _",
                    "content": "Execute the specified unix-command for all Postfix instances.  The command  runs  with\nappropriate environment settings for MAILCONFIG, commanddirectory, daemondirectory,\nconfigdirectory,   queuedirectory,  datadirectory,  multiinstancename,  multiin‐\nstancegroup and multiinstanceenable.\n",
                    "flag": "-x"
                }
            ]
        },
        "Other options": {
            "content": "",
            "subsections": [
                {
                    "name": "-v      -v",
                    "content": "increasingly verbose.\n",
                    "flag": "-v"
                }
            ]
        },
        "LIFE-CYCLE MANAGEMENT MODE": {
            "content": "With  the -e option postmulti(1) can be used to add or delete a Postfix instance, and to man‐\nage the multi-instance status of an existing instance.\n\nThe following options are implemented:\n",
            "subsections": []
        },
        "Existing instance selection": {
            "content": "",
            "subsections": [
                {
                    "name": "-a",
                    "content": "secondary instance list.\n",
                    "flag": "-a"
                },
                {
                    "name": "-g _",
                    "content": "When  creating  or importing an instance, place the new instance before the first sec‐\nondary instance that is a member of the specified group.\n",
                    "flag": "-g"
                },
                {
                    "name": "-i _",
                    "content": "When creating or importing an instance, place the new  instance  before  the  matching\nsecondary instance.\n\nWith  other life-cycle operations, apply the operation to the named existing instance.\nSpecify \"-\" to select the primary Postfix instance.\n",
                    "flag": "-i"
                }
            ]
        },
        "New or existing instance name assignment": {
            "content": "",
            "subsections": [
                {
                    "name": "-I _",
                    "content": "Assign the specified instance name to an existing instance, newly-created instance, or\nimported instance.  Instance names other than \"-\" (which  makes  the  instance  \"name‐\nless\")  must  start  with \"postfix-\".  This restriction reduces the likelihood of name\ncollisions with system files.\n",
                    "flag": "-I"
                },
                {
                    "name": "-G _",
                    "content": "Assign the specified group name to an existing instance or to a newly created  or  im‐\nported instance.\n",
                    "flag": "-G"
                }
            ]
        },
        "Instance creation/deletion/status change": {
            "content": "",
            "subsections": [
                {
                    "name": "-e _",
                    "content": "\"Edit\" managed instances. The following actions are supported:\n\ninit   This  command is required before postmulti(1) can be used to manage Postfix in‐\nstances.  The \"postmulti  -e  init\"  command  updates  the  primary  instance's\nmain.cf file by setting:\n\nmultiinstancewrapper =\n${commanddirectory}/postmulti -p --\nmultiinstanceenable = yes\n\nYou can set these by other means if you prefer.\n\ncreate Create  a new Postfix instance and add it to the multiinstancedirectories pa‐\nrameter of the primary instance.  The \"-I name\" option is recommended  to  give\nthe instance a short name that is used to construct default values for the pri‐\nvate directories of the new instance. The \"-G group\" option may be specified to\nassign  the instance to a group, otherwise, the new instance is not a member of\nany group.\n\nThe new instance main.cf is the stock main.cf with the parameters that  specify\nthe locations of shared files cloned from the primary instance.  For \"nameless\"\ninstances,  you should manually adjust \"syslogname\" to yield a unique \"logtag\"\nstarting with \"postfix-\" that will uniquely identify the instance in  the  mail\nlogs.  It is simpler to assign the instance a short name with the \"-I name\" op‐\ntion.\n\nOptional  \"name=value\"  arguments  specify   the   instance   configdirectory,\nqueuedirectory and datadirectory.  For example:\n\n# postmulti -I postfix-mumble \\\n-G mygroup -e create \\\nconfigdirectory=/my/config/dir \\\nqueuedirectory=/my/queue/dir \\\ndatadirectory=/my/data/dir\n\nIf any of these pathnames is not supplied, the program attempts to generate the\nmissing  pathname(s) by taking the corresponding primary instance pathname, and\nreplacing the last pathname component by the value of the -I option.\n\nIf the instance configuration directory already exists,  and  contains  both  a\nmain.cf and master.cf file, create will \"import\" the instance as-is. For exist‐\ning instances, create and import are identical.\n\nimport Import  an  existing  instance  into the list of instances managed by the post‐\nmulti(1) multi-instance manager.  This  adds  the  instance  to  the  multiin‐\nstancedirectories  list  of  the primary instance.  If the \"-I name\" option is\nprovided it specifies the new name for the instance and is used to define a de‐\nfault location for the instance configuration directory (as with create above).\nThe \"-G group\" option may be used to assign the instance  to  a  group.  Add  a\n\"configdirectory=/path\"  argument  to override a default pathname based on \"-I\nname\".\n\ndestroy\nDestroy a secondary Postfix instance. To be a candidate for destruction an  in‐\nstance  must  be disabled, stopped and its queue must not contain any messages.\nAttempts to destroy the primary Postfix instance trigger a fatal error, without\ndestroying the instance.\n\nThe instance is removed from the primary instance main.cf file's alternatecon‐\nfigdirectories parameter and its data, queue and configuration directories are\ncleaned of files and directories created by the Postfix system. The main.cf and\nmaster.cf files are removed from the configuration directory even if they  have\nbeen  modified since initial creation. Finally, the instance is \"deported\" from\nthe list of managed instances.\n\nIf other files are present in instance private directories, the directories may\nnot be fully removed, a warning is logged to alert the administrator. It is ex‐\npected that an instance built using \"fresh\" directories via the  create  action\nwill  be  fully  removed  by the destroy action (if first disabled). If the in‐\nstance configuration and queue directories are populated with additional  files\n(access  and rewriting tables, chroot jail content, etc.) the instance directo‐\nries will not be fully removed.\n\nThe destroy action triggers potentially dangerous file removal operations. Make\nsure the instance's data, queue and configuration directories are set correctly\nand do not contain any valuable files.\n\ndeport Deport a secondary instance from the list of managed  instances.  This  deletes\nthe  instance  configuration  directory  from  the primary instance's multiin‐\nstancedirectories list, but does not remove any files or directories.\n\nassign Assign a new instance name or a new group name to the selected  instance.   Use\n\"-G -\" to specify \"no group\" and \"-I -\" to specify \"no name\".  If you choose to\nmake  an  instance  \"nameless\", set a suitable syslogname in the corresponding\nmain.cf file.\n\nenable Mark the selected instance as enabled. This just sets the multiinstanceenable\nparameter to \"yes\" in the instance's main.cf file.\n\ndisable\nMark the selected instance as disabled. This means that the instance  will  not\nbe  started  etc. with \"postfix start\", \"postmulti -p start\" and so on. The in‐\nstance can still be started etc. with \"postfix -c config-directory start\".\n",
                    "flag": "-e"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "The postmulti(1) command exports the following environment variables before executing the re‐\nquested command for a given instance:\n\nMAILVERBOSE\nThis is set when the -v command-line option is present.\n\nMAILCONFIG\nThe location of the configuration directory of the instance.\n",
            "subsections": []
        },
        "CONFIGURATION PARAMETERS": {
            "content": "",
            "subsections": [
                {
                    "name": "config_directory (see 'postconf -d' output)",
                    "content": "The default location of the Postfix main.cf and master.cf configuration files.\n"
                },
                {
                    "name": "daemon_directory (see 'postconf -d' output)",
                    "content": "The directory with Postfix support programs and daemon programs.\n"
                },
                {
                    "name": "import_environment (see 'postconf -d' output)",
                    "content": "The list of environment variables that a privileged Postfix process will import from a\nnon-Postfix parent process, or name=value environment overrides.\n"
                },
                {
                    "name": "multi_instance_directories (empty)",
                    "content": "An  optional  list of non-default Postfix configuration directories; these directories\nbelong to additional Postfix instances that share the  Postfix  executable  files  and\ndocumentation  with the default Postfix instance, and that are started, stopped, etc.,\ntogether with the default Postfix instance.\n"
                },
                {
                    "name": "multi_instance_group (empty)",
                    "content": "The optional instance group name of this Postfix instance.\n"
                },
                {
                    "name": "multi_instance_name (empty)",
                    "content": "The optional instance name of this Postfix instance.\n"
                },
                {
                    "name": "multi_instance_enable (no)",
                    "content": "Allow this Postfix instance to be started, stopped, etc., by a multi-instance manager.\n"
                },
                {
                    "name": "postmulti_start_commands (start)",
                    "content": "The postfix(1) commands that the postmulti(1) instance manager treats as \"start\"  com‐\nmands.\n"
                },
                {
                    "name": "postmulti_stop_commands (see 'postconf -d' output)",
                    "content": "The  postfix(1)  commands that the postmulti(1) instance manager treats as \"stop\" com‐\nmands.\n"
                },
                {
                    "name": "postmulti_control_commands (reload flush)",
                    "content": "The postfix(1) commands that the postmulti(1) instance  manager  treats  as  \"control\"\ncommands, that operate on running instances.\n"
                },
                {
                    "name": "syslog_facility (mail)",
                    "content": "The syslog facility of Postfix logging.\n"
                },
                {
                    "name": "syslog_name (see 'postconf -d' output)",
                    "content": "A  prefix  that is prepended to the process name in syslog records, so that, for exam‐\nple, \"smtpd\" becomes \"prefix/smtpd\".\n\nAvailable in Postfix 3.0 and later:\n"
                },
                {
                    "name": "meta_directory (see 'postconf -d' output)",
                    "content": "The location of non-executable files that are shared among multiple Postfix instances,\nsuch  as  postfix-files,  dynamicmaps.cf,  and  the  multi-instance   template   files\nmain.cf.proto and master.cf.proto.\n"
                },
                {
                    "name": "shlib_directory (see 'postconf -d' output)",
                    "content": "The  location  of  Postfix dynamically-linked libraries (libpostfix-*.so), and the de‐\nfault location of Postfix database plugins (postfix-*.so) that have a  relative  path‐\nname in the dynamicmaps.cf file.\n"
                }
            ]
        },
        "FILES": {
            "content": "$metadirectory/main.cf.proto, stock configuration file\n$metadirectory/master.cf.proto, stock configuration file\n$daemondirectory/postmulti-script, life-cycle helper program\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "postfix(1), Postfix control program\npostfix-wrapper(5), Postfix multi-instance API\n",
            "subsections": []
        },
        "README FILES": {
            "content": "Use \"postconf readmedirectory\" or \"postconf htmldirectory\" to locate this information.\nMULTIINSTANCEREADME, Postfix multi-instance management\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "The postmulti(1) command was introduced with Postfix version 2.6.\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "The Secure Mailer license must be distributed with this software.\n\nAUTHOR(S)\nVictor Duchovni\nMorgan Stanley\n\nWietse Venema\nIBM T.J. Watson Research\nP.O. Box 704\nYorktown Heights, NY 10598, USA\n\nWietse Venema\nGoogle, Inc.\n111 8th Avenue\nNew York, NY 10011, USA\n\nPOSTMULTI(1)",
            "subsections": []
        }
    },
    "summary": "postmulti - Postfix multi-instance manager",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "postfix",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/postfix/1/json"
        },
        {
            "name": "postfix-wrapper",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/postfix-wrapper/5/json"
        }
    ],
    "tldr": {
        "source": "not_found",
        "examples": []
    }
}