1<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN" 2 "http://www.w3.org/TR/html4/loose.dtd"> 3<html> <head> 4<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5<title> Postfix manual - spawn(8) </title> 6</head> <body> <pre> 7SPAWN(8) SPAWN(8) 8 9<b>NAME</b> 10 spawn - Postfix external command spawner 11 12<b>SYNOPSIS</b> 13 <b>spawn</b> [generic Postfix daemon options] command_attributes... 14 15<b>DESCRIPTION</b> 16 The <a href="spawn.8.html"><b>spawn</b>(8)</a> daemon provides the Postfix equivalent of <b>inetd</b>. It lis- 17 tens on a port as specified in the Postfix <a href="master.5.html"><b>master.cf</b></a> file and spawns an 18 external command whenever a connection is established. The connection 19 can be made over local IPC (such as UNIX-domain sockets) or over 20 non-local IPC (such as TCP sockets). The command's standard input, 21 output and error streams are connected directly to the communication 22 endpoint. 23 24 This daemon expects to be run from the <a href="master.8.html"><b>master</b>(8)</a> process manager. 25 26<b>COMMAND ATTRIBUTE SYNTAX</b> 27 The external command attributes are given in the <a href="master.5.html"><b>master.cf</b></a> file at the 28 end of a service definition. The syntax is as follows: 29 30 <b>user</b>=<i>username</i> (required) 31 32 <b>user</b>=<i>username</i>:<i>groupname</i> 33 The external command is executed with the rights of the speci- 34 fied <i>username</i>. The software refuses to execute commands with 35 root privileges, or with the privileges of the mail system 36 owner. If <i>groupname</i> is specified, the corresponding group ID is 37 used instead of the group ID of <i>username</i>. 38 39 <b>argv</b>=<i>command</i>... (required) 40 The command to be executed. This must be specified as the last 41 command attribute. The command is executed directly, i.e. with- 42 out interpretation of shell meta characters by a shell command 43 interpreter. 44 45<b>BUGS</b> 46 In order to enforce standard Postfix process resource controls, the 47 <a href="spawn.8.html"><b>spawn</b>(8)</a> daemon runs only one external command at a time. As such, it 48 presents a noticeable overhead by wasting precious process resources. 49 The <a href="spawn.8.html"><b>spawn</b>(8)</a> daemon is expected to be replaced by a more structural 50 solution. 51 52<b>DIAGNOSTICS</b> 53 The <a href="spawn.8.html"><b>spawn</b>(8)</a> daemon reports abnormal child exits. Problems are logged 54 to <b>syslogd</b>(8) or <a href="postlogd.8.html"><b>postlogd</b>(8)</a>. 55 56<b>SECURITY</b> 57 This program needs root privilege in order to execute external commands 58 as the specified user. It is therefore security sensitive. However the 59 <a href="spawn.8.html"><b>spawn</b>(8)</a> daemon does not talk to the external command and thus is not 60 vulnerable to data-driven attacks. 61 62<b>CONFIGURATION PARAMETERS</b> 63 Changes to <a href="postconf.5.html"><b>main.cf</b></a> are picked up automatically as <a href="spawn.8.html"><b>spawn</b>(8)</a> processes 64 run for only a limited amount of time. Use the command "<b>postfix reload</b>" 65 to speed up a change. 66 67 The text below provides only a parameter summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for 68 more details including examples. 69 70 In the text below, <i>transport</i> is the first field of the entry in the 71 <a href="master.5.html"><b>master.cf</b></a> file. 72 73<b>RESOURCE AND RATE CONTROL</b> 74 <b><a href="postconf.5.html#transport_time_limit">transport_time_limit</a> ($<a href="postconf.5.html#command_time_limit">command_time_limit</a>)</b> 75 A transport-specific override for the <a href="postconf.5.html#command_time_limit">command_time_limit</a> parame- 76 ter value, where <i>transport</i> is the <a href="master.5.html">master.cf</a> name of the message 77 delivery transport. 78 79<b>MISCELLANEOUS</b> 80 <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b> 81 The default location of the Postfix <a href="postconf.5.html">main.cf</a> and <a href="master.5.html">master.cf</a> con- 82 figuration files. 83 84 <b><a href="postconf.5.html#daemon_timeout">daemon_timeout</a> (18000s)</b> 85 How much time a Postfix daemon process may take to handle a 86 request before it is terminated by a built-in watchdog timer. 87 88 <b><a href="postconf.5.html#export_environment">export_environment</a> (see 'postconf -d' output)</b> 89 The list of environment variables that a Postfix process will 90 export to non-Postfix processes. 91 92 <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b> 93 The time limit for sending or receiving information over an 94 internal communication channel. 95 96 <b><a href="postconf.5.html#mail_owner">mail_owner</a> (postfix)</b> 97 The UNIX system account that owns the Postfix queue and most 98 Postfix daemon processes. 99 100 <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b> 101 The maximum amount of time that an idle Postfix daemon process 102 waits for an incoming connection before terminating voluntarily. 103 104 <b><a href="postconf.5.html#max_use">max_use</a> (100)</b> 105 The maximal number of incoming connections that a Postfix daemon 106 process will service before terminating voluntarily. 107 108 <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b> 109 The process ID of a Postfix command or daemon process. 110 111 <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b> 112 The process name of a Postfix command or daemon process. 113 114 <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b> 115 The location of the Postfix top-level queue directory. 116 117 <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b> 118 The syslog facility of Postfix logging. 119 120 <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b> 121 A prefix that is prepended to the process name in syslog 122 records, so that, for example, "smtpd" becomes "prefix/smtpd". 123 124 Available in Postfix 3.3 and later: 125 126 <b><a href="postconf.5.html#service_name">service_name</a> (read-only)</b> 127 The <a href="master.5.html">master.cf</a> service name of a Postfix daemon process. 128 129<b>SEE ALSO</b> 130 <a href="postconf.5.html">postconf(5)</a>, configuration parameters 131 <a href="master.8.html">master(8)</a>, process manager 132 <a href="postlogd.8.html">postlogd(8)</a>, Postfix logging 133 syslogd(8), system logging 134 135<b>LICENSE</b> 136 The Secure Mailer license must be distributed with this software. 137 138<b>AUTHOR(S)</b> 139 Wietse Venema 140 IBM T.J. Watson Research 141 P.O. Box 704 142 Yorktown Heights, NY 10598, USA 143 144 Wietse Venema 145 Google, Inc. 146 111 8th Avenue 147 New York, NY 10011, USA 148 149 SPAWN(8) 150</pre> </body> </html> 151