{
    "mode": "man",
    "parameter": "spawn",
    "section": "8postfix",
    "url": "https://www.chedong.com/phpMan.php/man/spawn/8postfix/json",
    "generated": "2026-10-07T22:39:34Z",
    "synopsis": "spawn [generic Postfix daemon options] commandattributes...",
    "sections": {
        "NAME": {
            "content": "spawn - Postfix external command spawner\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "spawn [generic Postfix daemon options] commandattributes...\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The spawn(8) daemon provides the Postfix equivalent of inetd.  It listens on a port as speci‐\nfied  in  the  Postfix master.cf file and spawns an external command whenever a connection is\nestablished.  The connection can be made over local IPC (such as UNIX-domain sockets) or over\nnon-local IPC (such as TCP sockets).  The command's standard input, output and error  streams\nare connected directly to the communication endpoint.\n\nThis daemon expects to be run from the master(8) process manager.\n",
            "subsections": []
        },
        "COMMAND ATTRIBUTE SYNTAX": {
            "content": "The external command attributes are given in the master.cf file at the end of a service defi‐\nnition.  The syntax is as follows:\n\nuser=username (required)\n\nuser=username:groupname\nThe external command is executed with the rights of the specified username.  The soft‐\nware  refuses  to execute commands with root privileges, or with the privileges of the\nmail system owner. If groupname is specified, the corresponding group ID is  used  in‐\nstead of the group ID of username.\n\nargv=command... (required)\nThe command to be executed. This must be specified as the last command attribute.  The\ncommand  is executed directly, i.e. without interpretation of shell meta characters by\na shell command interpreter.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "In order to enforce standard Postfix process resource controls, the spawn(8) daemon runs only\none external command at a time.  As such, it presents a noticeable overhead by  wasting  pre‐\ncious  process resources. The spawn(8) daemon is expected to be replaced by a more structural\nsolution.\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "The spawn(8) daemon reports abnormal child exits.  Problems are logged to syslogd(8) or post‐\nlogd(8).\n",
            "subsections": []
        },
        "SECURITY": {
            "content": "This program needs root privilege in order to execute  external  commands  as  the  specified\nuser.  It  is therefore security sensitive.  However the spawn(8) daemon does not talk to the\nexternal command and thus is not vulnerable to data-driven attacks.\n",
            "subsections": []
        },
        "CONFIGURATION PARAMETERS": {
            "content": "Changes to main.cf are picked up automatically as spawn(8) processes run for only  a  limited\namount of time. Use the command \"postfix reload\" to speed up a change.\n\nThe  text below provides only a parameter summary. See postconf(5) for more details including\nexamples.\n\nIn the text below, transport is the first field of the entry in the master.cf file.\n",
            "subsections": []
        },
        "RESOURCE AND RATE CONTROL": {
            "content": "",
            "subsections": [
                {
                    "name": "transport_time_limit ($command_time_limit)",
                    "content": "A transport-specific override for the commandtimelimit parameter value, where trans‐\nport is the master.cf name of the message delivery transport.\n"
                }
            ]
        },
        "MISCELLANEOUS": {
            "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_timeout (18000s)",
                    "content": "How much time a Postfix daemon process may take to handle a request before it is  ter‐\nminated by a built-in watchdog timer.\n"
                },
                {
                    "name": "export_environment (see 'postconf -d' output)",
                    "content": "The  list  of  environment variables that a Postfix process will export to non-Postfix\nprocesses.\n"
                },
                {
                    "name": "ipc_timeout (3600s)",
                    "content": "The time limit for sending or receiving information  over  an  internal  communication\nchannel.\n"
                },
                {
                    "name": "mail_owner (postfix)",
                    "content": "The UNIX system account that owns the Postfix queue and most Postfix daemon processes.\n"
                },
                {
                    "name": "max_idle (100s)",
                    "content": "The  maximum  amount of time that an idle Postfix daemon process waits for an incoming\nconnection before terminating voluntarily.\n"
                },
                {
                    "name": "max_use (100)",
                    "content": "The maximal number of incoming connections that a Postfix daemon process will  service\nbefore terminating voluntarily.\n"
                },
                {
                    "name": "process_id (read-only)",
                    "content": "The process ID of a Postfix command or daemon process.\n"
                },
                {
                    "name": "process_name (read-only)",
                    "content": "The process name of a Postfix command or daemon process.\n"
                },
                {
                    "name": "queue_directory (see 'postconf -d' output)",
                    "content": "The location of the Postfix top-level queue directory.\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.3 and later:\n"
                },
                {
                    "name": "service_name (read-only)",
                    "content": "The master.cf service name of a Postfix daemon process.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "postconf(5), configuration parameters\nmaster(8), process manager\npostlogd(8), Postfix logging\nsyslogd(8), system logging\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "The Secure Mailer license must be distributed with this software.\n\nAUTHOR(S)\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\nSPAWN(8postfix)",
            "subsections": []
        }
    },
    "summary": "spawn - Postfix external command spawner",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "postconf",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/postconf/5/json"
        },
        {
            "name": "master",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/master/8/json"
        },
        {
            "name": "postlogd",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/postlogd/8/json"
        },
        {
            "name": "syslogd",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/syslogd/8/json"
        }
    ]
}