The spawn(8) daemon provides the Postfix equivalent
It listens on a port as specified in the Postfix master.cf file
and spawns an external command whenever a connection is established.
The connection can be made over local IPC (such as UNIX-domain
sockets) or over non-local IPC (such as TCP sockets).
The command's standard input, output and error streams are connected
directly to the communication endpoint.
This daemon expects to be run from the master(8) process
The external command attributes are given in the master.cf
file at the end of a service definition. The syntax is as follows:
The external command is executed with the rights of the
specified username. The software refuses to execute
commands with root privileges, or with the privileges of the
mail system owner. If groupname is specified, the
corresponding group ID is used instead of the group ID
The command to be executed. This must be specified as the
last command attribute.
The command is executed directly, i.e. without interpretation of
shell meta characters by a shell command interpreter.
In order to enforce standard Postfix process resource controls,
the spawn(8) daemon runs only one external command at a time.
As such, it presents a noticeable overhead by wasting precious
process resources. The spawn(8) daemon is expected to be
replaced by a more structural solution.
This program needs root privilege in order to execute external
commands as the specified user. It is therefore security sensitive.
However the spawn(8) daemon does not talk to the external command
and thus is not vulnerable to data-driven attacks.