2000-04-30 22:52:26 +04:00
|
|
|
.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 daemon processes requests from the Postfix queue
|
2001-04-02 14:55:13 +04:00
|
|
|
manager to deliver messages to external commands.
|
2000-04-30 22:52:26 +04:00
|
|
|
This program expects to be run from the \fBmaster\fR(8) process
|
|
|
|
manager.
|
|
|
|
|
|
|
|
The \fBpipe\fR 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 problem reports are sent
|
|
|
|
to the \fBbounce\fR(8) or \fBdefer\fR(8) daemon as appropriate.
|
2001-04-02 14:55:13 +04:00
|
|
|
.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,
|
|
|
|
fax machines, and so on.
|
|
|
|
|
|
|
|
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.
|
2000-04-30 22:52:26 +04:00
|
|
|
.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:
|
2001-03-13 20:45:02 +03:00
|
|
|
.IP "\fBflags=BFR.>\fR (optional)"
|
2000-04-30 22:52:26 +04:00
|
|
|
Optional message processing flags. By default, a message is
|
|
|
|
copied unchanged.
|
|
|
|
.RS
|
2001-03-13 20:45:02 +03:00
|
|
|
.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.
|
2000-04-30 22:52:26 +04:00
|
|
|
.IP \fBF\fR
|
|
|
|
Prepend a "\fBFrom \fIsender time_stamp\fR" envelope header to
|
|
|
|
the message content.
|
2001-03-13 20:45:02 +03:00
|
|
|
This is expected by, for example, \fBUUCP\fR software.
|
2000-04-30 22:52:26 +04:00
|
|
|
.IP \fBR\fR
|
|
|
|
Prepend a \fBReturn-Path:\fR message header with the envelope sender
|
|
|
|
address.
|
|
|
|
.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 "\fBuser\fR=\fIusername\fR (required)"
|
|
|
|
.IP "\fBuser\fR=\fIusername\fR:\fIgroupname\fR"
|
|
|
|
The external command is executed 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
|
2001-03-13 20:45:02 +03:00
|
|
|
\fIusername\fR.
|
|
|
|
.IP "\fBeol=string\fR (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\fIoctal\fR and \fB\e\e\fR.
|
|
|
|
.IP "\fBsize\fR=\fIsize_limit\fR (optional)"
|
|
|
|
Messages greater in size than this limit (in bytes) will be bounced
|
|
|
|
back to the sender.
|
2000-04-30 22:52:26 +04:00
|
|
|
.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:
|
|
|
|
.RS
|
|
|
|
.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.
|
2001-04-02 14:55:13 +04:00
|
|
|
.sp
|
2000-04-30 22:52:26 +04:00
|
|
|
A command-line argument that contains \fB${\fBextension\fR}\fR expands
|
|
|
|
into as many command-line arguments as there are recipients.
|
|
|
|
.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.
|
2001-04-02 14:55:13 +04:00
|
|
|
.sp
|
2000-04-30 22:52:26 +04:00
|
|
|
A command-line argument that contains \fB${\fBmailbox\fR}\fR
|
|
|
|
expands into as many command-line arguments as there are recipients.
|
|
|
|
.IP \fB${\fBnexthop\fR}\fR
|
|
|
|
This macro expands to the next-hop hostname.
|
|
|
|
.IP \fB${\fBrecipient\fR}\fR
|
|
|
|
This macro expands to the complete recipient address.
|
2001-04-02 14:55:13 +04:00
|
|
|
.sp
|
2000-04-30 22:52:26 +04:00
|
|
|
A command-line argument that contains \fB${\fBrecipient\fR}\fR
|
|
|
|
expands into as many command-line arguments as there are recipients.
|
|
|
|
.IP \fB${\fBsender\fR}\fR
|
|
|
|
This macro expands to the envelope sender address.
|
2001-03-13 20:45:02 +03:00
|
|
|
.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.
|
2000-04-30 22:52:26 +04:00
|
|
|
.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.
|
2001-04-02 14:55:13 +04:00
|
|
|
.sp
|
2000-04-30 22:52:26 +04:00
|
|
|
A command-line argument that contains \fB${\fBuser\fR}\fR expands
|
|
|
|
into as many command-line arguments as there are recipients.
|
|
|
|
.RE
|
|
|
|
.PP
|
|
|
|
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.
|
|
|
|
.SH DIAGNOSTICS
|
|
|
|
.ad
|
|
|
|
.fi
|
|
|
|
Command exit status codes are expected to
|
|
|
|
follow the conventions defined in <\fBsysexits.h\fR>.
|
|
|
|
|
|
|
|
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
|
|
|
|
The following \fBmain.cf\fR parameters are especially relevant to
|
|
|
|
this program. See the Postfix \fBmain.cf\fR file for syntax details
|
|
|
|
and for default values. Use the \fBpostfix reload\fR command after
|
|
|
|
a configuration change.
|
|
|
|
.SH Miscellaneous
|
|
|
|
.ad
|
|
|
|
.fi
|
2001-03-13 20:45:02 +03:00
|
|
|
.IP \fBexport_environment\fR
|
|
|
|
List of names of environment parameters that can be exported
|
|
|
|
to non-Postfix processes.
|
2000-04-30 22:52:26 +04:00
|
|
|
.IP \fBmail_owner\fR
|
|
|
|
The process privileges used while not running an external command.
|
|
|
|
.SH "Resource controls"
|
|
|
|
.ad
|
|
|
|
.fi
|
|
|
|
In the text below, \fItransport\fR is the first field in a
|
|
|
|
\fBmaster.cf\fR entry.
|
|
|
|
.IP \fItransport\fB_destination_concurrency_limit\fR
|
|
|
|
Limit the number of parallel deliveries to the same destination,
|
|
|
|
for delivery via the named \fItransport\fR. The default limit is
|
|
|
|
taken from the \fBdefault_destination_concurrency_limit\fR parameter.
|
|
|
|
The limit is enforced by the Postfix queue manager.
|
|
|
|
.IP \fItransport\fB_destination_recipient_limit\fR
|
|
|
|
Limit the number of recipients per message delivery, for delivery
|
|
|
|
via the named \fItransport\fR. The default limit is taken from
|
|
|
|
the \fBdefault_destination_recipient_limit\fR parameter.
|
|
|
|
The limit is enforced by the Postfix queue manager.
|
|
|
|
.IP \fItransport\fB_time_limit\fR
|
|
|
|
Limit the time for delivery to external command, for delivery via
|
|
|
|
the named \fBtransport\fR. The default limit is taken from the
|
|
|
|
\fBcommand_time_limit\fR parameter.
|
|
|
|
The limit is enforced by the Postfix queue manager.
|
|
|
|
.SH SEE ALSO
|
|
|
|
.na
|
|
|
|
.nf
|
|
|
|
bounce(8) non-delivery status reports
|
|
|
|
master(8) process manager
|
|
|
|
qmgr(8) queue 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
|