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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389
|
.TH PIPE 8
.ad
.fi
.SH NAME
pipe
\-
Postfix delivery to external command
.SH "SYNOPSIS"
.na
.nf
\fBpipe\fR [generic Postfix daemon options] command_attributes...
.SH DESCRIPTION
.ad
.fi
The \fBpipe\fR(8) daemon processes requests from the Postfix queue
manager to deliver messages to external commands.
This program expects to be run from the \fBmaster\fR(8) process
manager.
Message attributes such as sender address, recipient address and
next-hop host name can be specified as command-line macros that are
expanded before the external command is executed.
The \fBpipe\fR(8) daemon updates queue files and marks recipients
as finished, or it informs the queue manager that delivery should
be tried again at a later time. Delivery status reports are sent
to the \fBbounce\fR(8), \fBdefer\fR(8) or \fBtrace\fR(8) daemon as
appropriate.
.SH "SINGLE-RECIPIENT DELIVERY"
.na
.nf
.ad
.fi
Some external commands cannot handle more than one recipient
per delivery request. Examples of such transports are pagers
or fax machines.
To prevent Postfix from sending multiple recipients per delivery
request, specify
.ti +4
\fItransport\fB_destination_recipient_limit = 1\fR
in the Postfix \fBmain.cf\fR file, where \fItransport\fR
is the name in the first column of the Postfix \fBmaster.cf\fR
entry for the pipe-based delivery transport.
.SH "COMMAND ATTRIBUTE SYNTAX"
.na
.nf
.ad
.fi
The external command attributes are given in the \fBmaster.cf\fR
file at the end of a service definition. The syntax is as follows:
.IP "\fBchroot=\fIpathname\fR (optional)"
Change the process root directory and working directory to
the named directory. This happens before switching to the
privileges specified with the \fBuser\fR attribute, and
before executing the optional \fBdirectory=\fIpathname\fR
directive. Delivery is deferred in case of failure.
.sp
This feature is available as of Postfix 2.3.
.IP "\fBdirectory=\fIpathname\fR (optional)"
Change to the named directory before executing the external command.
The directory must be accessible for the user specified with the
\fBuser\fR attribute (see below).
The default working directory is \fB$queue_directory\fR.
Delivery is deferred in case of failure.
.sp
This feature is available as of Postfix 2.2.
.IP "\fBeol=\fIstring\fR (optional, default: \fB\en\fR)"
The output record delimiter. Typically one would use either
\fB\er\en\fR or \fB\en\fR. The usual C-style backslash escape
sequences are recognized: \fB\ea \eb \ef \en \er \et \ev
\e\fIddd\fR (up to three octal digits) and \fB\e\e\fR.
.IP "\fBflags=BDFORhqu.>\fR (optional)"
Optional message processing flags. By default, a message is
copied unchanged.
.RS
.IP \fBB\fR
Append a blank line at the end of each message. This is required
by some mail user agents that recognize "\fBFrom \fR" lines only
when preceded by a blank line.
.IP \fBD\fR
Prepend a "\fBDelivered-To: \fIrecipient\fR" message header with the
envelope recipient address. Note: for this to work, the
\fItransport\fB_destination_recipient_limit\fR must be 1.
.sp
This feature is available as of Postfix 2.0.
.IP \fBF\fR
Prepend a "\fBFrom \fIsender time_stamp\fR" envelope header to
the message content.
This is expected by, for example, \fBUUCP\fR software.
.IP \fBO\fR
Prepend an "\fBX-Original-To: \fIrecipient\fR" message header
with the recipient address as given to Postfix. Note: for this to
work, the \fItransport\fB_destination_recipient_limit\fR must be 1.
.sp
This feature is available as of Postfix 2.0.
.IP \fBR\fR
Prepend a \fBReturn-Path:\fR message header with the envelope sender
address.
.IP \fBh\fR
Fold the command-line \fB$recipient\fR domain name and \fB$nexthop\fR
host name to lower case.
This is recommended for delivery via \fBUUCP\fR.
.IP \fBq\fR
Quote white space and other special characters in the command-line
\fB$sender\fR and \fB$recipient\fR address localparts (text to the
left of the right-most \fB@\fR character), according to an 8-bit
transparent version of RFC 822.
This is recommended for delivery via \fBUUCP\fR or \fBBSMTP\fR.
.sp
The result is compatible with the address parsing of command-line
recipients by the Postfix \fBsendmail\fR(1) mail submission command.
.sp
The \fBq\fR flag affects only entire addresses, not the partial
address information from the \fB$user\fR, \fB$extension\fR or
\fB$mailbox\fR command-line macros.
.IP \fBu\fR
Fold the command-line \fB$recipient\fR address localpart (text to
the left of the right-most \fB@\fR character) to lower case.
This is recommended for delivery via \fBUUCP\fR.
.IP \fB.\fR
Prepend "\fB.\fR" to lines starting with "\fB.\fR". This is needed
by, for example, \fBBSMTP\fR software.
.IP \fB>\fR
Prepend "\fB>\fR" to lines starting with "\fBFrom \fR". This is expected
by, for example, \fBUUCP\fR software.
.RE
.IP "\fBnull_sender\fR=\fIreplacement\fR (default: MAILER-DAEMON)"
Replace the null sender address, which is typically used
for delivery status notifications, with the specified text
when expanding the \fB$sender\fR command-line macro, and
when generating a From_ or Return-Path: message header.
If the null sender replacement text is a non-empty string
then it is affected by the \fBq\fR flag for address quoting
in command-line arguments.
The null sender replacement text may be empty; this form
is recommended for content filters that feed mail back into
Postfix. The empty sender address is not affected by the
\fBq\fR flag for address quoting in command-line arguments.
.sp
Caution: a null sender address is easily mis-parsed by
naive software. For example, when the \fBpipe\fR(8) daemon
executes a command such as:
.ti +4
command -f$sender -- $recipient (\fIbad\fR)
the command will mis-parse the -f option value when the
sender address is a null string. For correct parsing,
specify \fB$sender\fR as an argument by itself:
.ti +4
command -f $sender -- $recipient (\fIgood\fR)
This feature is available with Postfix 2.3 and later.
.IP "\fBsize\fR=\fIsize_limit\fR (optional)"
Messages greater in size than this limit (in bytes) will
be returned to the sender as undeliverable.
.IP "\fBuser\fR=\fIusername\fR (required)"
.IP "\fBuser\fR=\fIusername\fR:\fIgroupname\fR"
Execute the external command with the rights of the
specified \fIusername\fR. The software refuses to execute
commands with root privileges, or with the privileges of the
mail system owner. If \fIgroupname\fR is specified, the
corresponding group ID is used instead of the group ID of
\fIusername\fR.
.IP "\fBargv\fR=\fIcommand\fR... (required)"
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.
.sp
In the command argument vector, the following macros are recognized
and replaced with corresponding information from the Postfix queue
manager delivery request.
.sp
In addition to the form ${\fIname\fR}, the forms $\fIname\fR and
$(\fIname\fR) are also recognized. Specify \fB$$\fR where a single
\fB$\fR is wanted.
.RS
.IP \fB${\fBclient_address\fR}\fR
This macro expands to the remote client network address.
.sp
This is available in Postfix 2.2 and later.
.IP \fB${\fBclient_helo\fR}\fR
This macro expands to the remote client HELO command parameter.
.sp
This is available in Postfix 2.2 and later.
.IP \fB${\fBclient_hostname\fR}\fR
This macro expands to the remote client hostname.
.sp
This is available in Postfix 2.2 and later.
.IP \fB${\fBclient_protocol\fR}\fR
This macro expands to the remote client protocol.
.sp
This is available in Postfix 2.2 and later.
.IP \fB${\fBextension\fR}\fR
This macro expands to the extension part of a recipient address.
For example, with an address \fIuser+foo@domain\fR the extension is
\fIfoo\fR.
.sp
A command-line argument that contains \fB${\fBextension\fR}\fR expands
into as many command-line arguments as there are recipients.
.sp
This information is modified by the \fBu\fR flag for case folding.
.IP \fB${\fBmailbox\fR}\fR
This macro expands to the complete local part of a recipient address.
For example, with an address \fIuser+foo@domain\fR the mailbox is
\fIuser+foo\fR.
.sp
A command-line argument that contains \fB${\fBmailbox\fR}\fR
expands to as many command-line arguments as there are recipients.
.sp
This information is modified by the \fBu\fR flag for case folding.
.IP \fB${\fBnexthop\fR}\fR
This macro expands to the next-hop hostname.
.sp
This information is modified by the \fBh\fR flag for case folding.
.IP \fB${\fBrecipient\fR}\fR
This macro expands to the complete recipient address.
.sp
A command-line argument that contains \fB${\fBrecipient\fR}\fR
expands to as many command-line arguments as there are recipients.
.sp
This information is modified by the \fBhqu\fR flags for quoting
and case folding.
.IP \fB${\fBsasl_method\fR}\fR
This macro expands to the SASL authentication mechanism used
during the reception of the message. An empty string is passed
if the message has been received without SASL authentication.
.sp
This is available in Postfix 2.2 and later.
.IP \fB${\fBsasl_sender\fR}\fR
This macro expands to the SASL sender name (i.e. the original
submitter as per RFC 2554) used during the reception of the message.
.sp
This is available in Postfix 2.2 and later.
.IP \fB${\fBsasl_username\fR}\fR
This macro expands to the SASL user name used during the reception
of the message. An empty string is passed if the message has been
received without SASL authentication.
.sp
This is available in Postfix 2.2 and later.
.IP \fB${\fBsender\fR}\fR
This macro expands to the envelope sender address. By default,
the null sender address expands to MAILER-DAEMON; this can
be changed with the \fBnull_sender\fR attribute, as described
above.
.sp
This information is modified by the \fBq\fR flag for quoting.
.IP \fB${\fBsize\fR}\fR
This macro expands to Postfix's idea of the message size, which
is an approximation of the size of the message as delivered.
.IP \fB${\fBuser\fR}\fR
This macro expands to the username part of a recipient address.
For example, with an address \fIuser+foo@domain\fR the username
part is \fIuser\fR.
.sp
A command-line argument that contains \fB${\fBuser\fR}\fR expands
into as many command-line arguments as there are recipients.
.sp
This information is modified by the \fBu\fR flag for case folding.
.RE
.SH "STANDARDS"
.na
.nf
RFC 3463 (Enhanced status codes)
.SH DIAGNOSTICS
.ad
.fi
Command exit status codes are expected to
follow the conventions defined in <\fBsysexits.h\fR>.
Exit status 0 means normal successful completion.
Postfix version 2.3 and later support RFC 3463-style enhanced
status codes. If a command terminates with a non-zero exit
status, and the command output begins with an enhanced
status code, this status code takes precedence over the
non-zero exit status.
Problems and transactions are logged to \fBsyslogd\fR(8).
Corrupted message files are marked so that the queue manager
can move them to the \fBcorrupt\fR queue for further inspection.
.SH "SECURITY"
.na
.nf
.fi
.ad
This program needs a dual personality 1) to access the private
Postfix queue and IPC mechanisms, and 2) to execute external
commands as the specified user. It is therefore security sensitive.
.SH "CONFIGURATION PARAMETERS"
.na
.nf
.ad
.fi
Changes to \fBmain.cf\fR are picked up automatically as \fBpipe\fR(8)
processes run for only a limited amount of time. Use the command
"\fBpostfix reload\fR" to speed up a change.
The text below provides only a parameter summary. See
\fBpostconf\fR(5) for more details including examples.
.SH "RESOURCE AND RATE CONTROLS"
.na
.nf
.ad
.fi
In the text below, \fItransport\fR is the first field in a
\fBmaster.cf\fR entry.
.IP "\fItransport\fB_destination_concurrency_limit ($default_destination_concurrency_limit)\fR"
Limit the number of parallel deliveries to the same destination,
for delivery via the named \fItransport\fR.
The limit is enforced by the Postfix queue manager.
.IP "\fItransport\fB_destination_recipient_limit ($default_destination_recipient_limit)\fR"
Limit the number of recipients per message delivery, for delivery
via the named \fItransport\fR.
The limit is enforced by the Postfix queue manager.
.IP "\fItransport\fB_time_limit ($command_time_limit)\fR"
Limit the time for delivery to external command, for delivery via
the named \fItransport\fR.
The limit is enforced by the pipe delivery agent.
.SH "MISCELLANEOUS CONTROLS"
.na
.nf
.ad
.fi
.IP "\fBconfig_directory (see 'postconf -d' output)\fR"
The default location of the Postfix main.cf and master.cf
configuration files.
.IP "\fBdaemon_timeout (18000s)\fR"
How much time a Postfix daemon process may take to handle a
request before it is terminated by a built-in watchdog timer.
.IP "\fBdelay_logging_resolution_limit (2)\fR"
The maximal number of digits after the decimal point when logging
sub-second delay values.
.IP "\fBexport_environment (see 'postconf -d' output)\fR"
The list of environment variables that a Postfix process will export
to non-Postfix processes.
.IP "\fBipc_timeout (3600s)\fR"
The time limit for sending or receiving information over an internal
communication channel.
.IP "\fBmail_owner (postfix)\fR"
The UNIX system account that owns the Postfix queue and most Postfix
daemon processes.
.IP "\fBmax_idle (100s)\fR"
The maximum amount of time that an idle Postfix daemon process
waits for the next service request before exiting.
.IP "\fBmax_use (100)\fR"
The maximal number of connection requests before a Postfix daemon
process terminates.
.IP "\fBprocess_id (read-only)\fR"
The process ID of a Postfix command or daemon process.
.IP "\fBprocess_name (read-only)\fR"
The process name of a Postfix command or daemon process.
.IP "\fBqueue_directory (see 'postconf -d' output)\fR"
The location of the Postfix top-level queue directory.
.IP "\fBrecipient_delimiter (empty)\fR"
The separator between user names and address extensions (user+foo).
.IP "\fBsyslog_facility (mail)\fR"
The syslog facility of Postfix logging.
.IP "\fBsyslog_name (postfix)\fR"
The mail system name that is prepended to the process name in syslog
records, so that "smtpd" becomes, for example, "postfix/smtpd".
.SH "SEE ALSO"
.na
.nf
qmgr(8), queue manager
bounce(8), delivery status reports
postconf(5), configuration parameters
master(5), generic daemon options
master(8), process manager
syslogd(8), system logging
.SH "LICENSE"
.na
.nf
.ad
.fi
The Secure Mailer license must be distributed with this software.
.SH "AUTHOR(S)"
.na
.nf
Wietse Venema
IBM T.J. Watson Research
P.O. Box 704
Yorktown Heights, NY 10598, USA
|