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