File: spawn.8.html

package info (click to toggle)
postfix 3.10.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 27,976 kB
  • sloc: ansic: 134,721; makefile: 17,984; sh: 6,971; perl: 2,796; python: 1,448; awk: 158
file content (159 lines) | stat: -rw-r--r-- 8,426 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
        "https://www.w3.org/TR/html4/loose.dtd">
<html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel='stylesheet' type='text/css' href='postfix-doc.css'>
<title> Postfix manual - spawn(8) </title>
</head> <body> <pre>
SPAWN(8)                                                              SPAWN(8)

<b><a name="name">NAME</a></b>
       spawn - Postfix external command spawner

<b><a name="synopsis">SYNOPSIS</a></b>
       <b>spawn</b> [generic Postfix daemon options] command_attributes...

<b><a name="description">DESCRIPTION</a></b>
       The  <a href="spawn.8.html"><b>spawn</b>(8)</a>  daemon monitors a TCP or UNIX-domain stream socket, con-
       figured in <a href="master.5.html"><b>master.cf</b></a> with a service type <b>inet</b> or <b>unix</b>.

       This daemon spawns an external command whenever a connection is  estab-
       lished, with the standard input, output and error file descriptors con-
       nected to the remote client.

       The command process is subject to the time  limit  specified  with  the
       parameter   <a href="postconf.5.html#transport_time_limit"><i>transport</i>_time_limit</a>  (default:  <a href="postconf.5.html#command_time_limit">command_time_limit</a>)  where
       <i>transport</i> equals the service name field in <a href="master.5.html">master.cf</a>.  A  process  that
       exceeds the time limit will receive a SIGKILL signal.

       The  <a href="spawn.8.html"><b>spawn</b>(8)</a>  daemon  service typically has a process limit &gt; 1 in its
       <a href="master.5.html"><b>master.cf</b></a> service definition, so that the number of processes can scale
       with demand.

<b><a name="command_attribute_syntax">COMMAND ATTRIBUTE SYNTAX</a></b>
       The  external command attributes are given in the <a href="master.5.html"><b>master.cf</b></a> file at the
       end of a service definition.  The syntax is as follows:

       <b>user</b>=<i>username</i> (required)

       <b>user</b>=<i>username</i>:<i>groupname</i>
              The external command is executed with the rights of  the  speci-
              fied  <i>username</i>.   The  software refuses to execute commands with
              root privileges, or with  the  privileges  of  the  mail  system
              owner.  If <i>groupname</i> is specified, the corresponding group ID is
              used instead of the group ID of <i>username</i>.

       <b>argv</b>=<i>command</i>... (required)
              The command to be executed. This must be specified as  the  last
              command attribute.  The command is executed directly, i.e. with-
              out interpretation of shell meta characters by a  shell  command
              interpreter.

              If  a  command argument must contain whitespace, or if a command
              argument must begin with "{", enclose the argument with "{"  and
              "}".  This  form  will ignore whitespace after the outer "{" and
              before the outer "}". Example:

                  argv=/bin/sh -c { shell syntax here }

<b><a name="diagnostics">DIAGNOSTICS</a></b>
       The <a href="spawn.8.html"><b>spawn</b>(8)</a> daemon reports abnormal child exits.  Problems are  logged
       to <b>syslogd</b>(8) or <a href="postlogd.8.html"><b>postlogd</b>(8)</a>.

<b><a name="security">SECURITY</a></b>
       The  <a href="spawn.8.html"><b>spawn</b>(8)</a>  daemon needs root privilege in order to execute external
       commands as the specified user. It is therefore security sensitive.

       However, the <a href="spawn.8.html"><b>spawn</b>(8)</a> daemon does not receive data from or  about  ser-
       vice  clients  or  external  commands,  and  thus  is not vulnerable to
       data-driven attacks.

<b><a name="configuration_parameters">CONFIGURATION PARAMETERS</a></b>
       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
       run for only a limited amount of time. Use the command "<b>postfix reload</b>"
       to speed up a change.

       The text below provides only a parameter summary. See  <a href="postconf.5.html"><b>postconf</b>(5)</a>  for
       more details including examples.

       In  the  text  below,  <i>transport</i> is the first field of the entry in the
       <a href="master.5.html"><b>master.cf</b></a> file.

<b><a name="resource_and_rate_control">RESOURCE AND RATE CONTROL</a></b>
       <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>
              A transport-specific override for the <a href="postconf.5.html#command_time_limit">command_time_limit</a> parame-
              ter  value, where <i>transport</i> is the <a href="master.5.html">master.cf</a> name of the message
              delivery transport.

<b><a name="miscellaneous">MISCELLANEOUS</a></b>
       <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
              The default location of the Postfix <a href="postconf.5.html">main.cf</a> and  <a href="master.5.html">master.cf</a>  con-
              figuration files.

       <b><a href="postconf.5.html#daemon_timeout">daemon_timeout</a> (18000s)</b>
              How  much  time  a  Postfix  daemon process may take to handle a
              request before it is terminated by a built-in watchdog timer.

       <b><a href="postconf.5.html#export_environment">export_environment</a> (see 'postconf -d' output)</b>
              The list of environment variables that a  Postfix  process  will
              export to non-Postfix processes.

       <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
              The  time  limit  for  sending  or receiving information over an
              internal communication channel.

       <b><a href="postconf.5.html#mail_owner">mail_owner</a> (postfix)</b>
              The UNIX system account that owns the  Postfix  queue  and  most
              Postfix daemon processes.

       <b><a href="postconf.5.html#max_idle">max_idle</a> (100s)</b>
              The  maximum  amount of time that an idle Postfix daemon process
              waits for an incoming connection before terminating voluntarily.

       <b><a href="postconf.5.html#max_use">max_use</a> (100)</b>
              The maximal number of incoming connections that a Postfix daemon
              process will service before terminating voluntarily.

       <b><a href="postconf.5.html#process_id">process_id</a> (read-only)</b>
              The process ID of a Postfix command or daemon process.

       <b><a href="postconf.5.html#process_name">process_name</a> (read-only)</b>
              The process name of a Postfix command or daemon process.

       <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
              The location of the Postfix top-level queue directory.

       <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
              The syslog facility of Postfix logging.

       <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
              A prefix that  is  prepended  to  the  process  name  in  syslog
              records, so that, for example, "smtpd" becomes "prefix/smtpd".

       Available in Postfix 3.3 and later:

       <b><a href="postconf.5.html#service_name">service_name</a> (read-only)</b>
              The <a href="master.5.html">master.cf</a> service name of a Postfix daemon process.

<b><a name="see_also">SEE ALSO</a></b>
       <a href="postconf.5.html">postconf(5)</a>, configuration parameters
       <a href="master.8.html">master(8)</a>, process manager
       <a href="postlogd.8.html">postlogd(8)</a>, Postfix logging
       syslogd(8), system logging

<b><a name="license">LICENSE</a></b>
       The Secure Mailer license must be distributed with this software.

<b>AUTHOR(S)</b>
       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

                                                                      SPAWN(8)
</pre> </body> </html>