SPAWN(8postfix)
π SPAWN(8postfix) π
okay so bestie, we're reading the spawn(8postfix) page today and honestly? it's giving "the humble little overachiever of the Postfix family." let's get into it β¨
β¨ NAME β¨
spawn β the Postfix external command spawner π£
πΈ SYNOPSIS πΈ
spawn [generic Postfix daemon options] command_attributes...
π¦ DESCRIPTION π¦
so the spawn(8) daemon is literally Postfix's version of inetd. iconic behavior, no cap. it sits there listening on a port (whatever port the Postfix master.cf file told it to use, bestie) and then β the moment a connection shows up β it spawns an external command. main character energy fr fr. π
and that connection can come in over local IPC (think UNIX-domain sockets, the cozy ones) or over non-local IPC (think TCP sockets, the long-distance ones π).
the command's standard input, output and error streams? they get wired directly to the communication endpoint. no middleman, no filter, just vibes.
lowkey important: this daemon expects to be run from the master(8) process manager. that's its whole situation. don't try to freelance it.
π COMMAND ATTRIBUTE SYNTAX π
the external command attributes go in the master.cf file, at the end of a service definition. the syntax is literally this:
user=username (required)
user=username:groupname
- the external command runs with the rights of the
usernameyou specified. periodt. - the software refuses to execute commands with
rootprivileges, or with the privileges of the mail system owner. it said no and it meant no π ββοΈ - if you also give
groupname, then that group ID is used instead of the group ID ofusername. mix and match, bestie.
argv=command... (required)
- the command to be executed. this one must be specified as the last command attribute β it's the finale, the last song of the setlist π€
- the command is executed directly, i.e. without interpretation of shell meta characters by a shell command interpreter. no shell, no drama, no sneaky
$expansion. just the raw command.
π BUGS π
okay so here's the tea and it's a lil tragic. π
in order to enforce standard Postfix process resource controls, the spawn(8) daemon runs only one external command at a time. one. at a time. as such, it presents a noticeable overhead by wasting precious process resources. it's out here burning through the good stuff for no reason.
the spawn(8) daemon is expected to be replaced by a more structural solution. so likeβ¦ it knows. we all know. it's a transitional era. π«Ά
π©Ί DIAGNOSTICS π©Ί
the spawn(8) daemon reports abnormal child exits. if something's wrong, problems are logged to syslogd(8) or postlogd(8). so if you're confused, go read the logs, babe, the logs always know. π
π₯ SECURITY π₯
this program needs root privilege in order to execute external commands as the specified user. so yeah, it's security sensitive β highkey, not lowkey.
however (and this is the slay part β¨): the spawn(8) daemon does not talk to the external command, and thus is not vulnerable to data-driven attacks. it's the strong silent type. it just introduces people and leaves the group chat. π
β CONFIGURATION PARAMETERS β
changes to main.cf are picked up automatically, because spawn(8) processes run for only a limited amount of time. if you're impatient (valid), use the command:
postfix reload
to speed up a change. β¨
the text below provides only a parameter summary. see postconf(5) for more details including examples. iykyk.
in the text below, transport is the first field of the entry in the master.cf file.
π RESOURCE AND RATE CONTROL π
transport_time_limit($command_time_limit) β a transport-specific override for thecommand_time_limitparameter value, where transport is themaster.cfname of the message delivery transport.
π MISCELLANEOUS π
config_directory(seepostconf -doutput) β the default location of the Postfixmain.cfandmaster.cfconfiguration files.daemon_timeout(18000s) β how much time a Postfix daemon process may take to handle a request before it is terminated by a built-in watchdog timer. β°export_environment(seepostconf -doutput) β the list of environment variables that a Postfix process will export to non-Postfix processes.ipc_timeout(3600s) β the time limit for sending or receiving information over an internal communication channel.mail_owner(postfix) β the UNIX system account that owns the Postfix queue and most Postfix daemon processes.max_idle(100s) β the maximum amount of time that an idle Postfix daemon process waits for an incoming connection before terminating voluntarily.max_use(100) β the maximal number of incoming connections that a Postfix daemon process will service before terminating voluntarily.process_id(read-only) β the process ID of a Postfix command or daemon process.process_name(read-only) β the process name of a Postfix command or daemon process.queue_directory(seepostconf -doutput) β the location of the Postfix top-level queue directory.syslog_facility(mail) β the syslog facility of Postfix logging.syslog_name(seepostconf -doutput) β a prefix that is prepended to the process name in syslog records, so that, for example,smtpdbecomesprefix/smtpd.
available in Postfix 3.3 and later: π
service_name(read-only) β themaster.cfservice name of a Postfix daemon process.
π SEE ALSO π
postconf(5), configuration parametersmaster(8), process managerpostlogd(8), Postfix loggingsyslogd(8), system logging
π LICENSE π
the Secure Mailer license must be distributed with this software.
π AUTHOR(S) π
Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA
Wietse Venema Google, Inc. 111 8th Avenue New York, NY 10011, USA
and that's the whole spawn(8postfix) manual page, bestie β you read the entire thing and i'm so proud of you π₯Ήπ«Ά this was the SPAWN(8postfix) page, straight from the Postfix source, and we are officially obsessed. go forth and spawn responsibly. πβ¨π
π¦ where this page comes from
- debian bookworm: postfix 3.7.11-0+deb12u1
- ubuntu noble: postfix 3.8.6-1build2
- ubuntu noble: postfix 3.8.6-1ubuntu0.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms