Delivery Via Programs
When any of the addresses to the right of a colon in
the alias list begin with a |
character, delivery is made by piping
the mail message through a program. This is
automatic with modern configuration files.[200] Beginning with V8.7
sendmail, any delivery agent
for which the F=|
flag (F=| (vertical bar) on page 765) is set can also pipe messages
through programs. To disable this ability, simply
remove the F=|
flag from all delivery agent declarations in your
configuration file.
The forms that a program address can legally take in the aliases(5) file (or ~/.forward file; see Piping Through Programs on page 504) are as follows:
|prg "|prg args" |"prg args"
Here, prg
is the
full path of the program to be run (the environment
variable PATH is not available). If command-line
arguments are needed for the program, they must
follow prg
, and
the entire expression must be quoted. The leading
full quotation mark can either precede or follow the
|
. If the
address is quoted with full quotation marks, the
leading quotation mark is ignored in determining the
leading |
character.
To execute the program, sendmail
executes the command in the P=
equate of the prog
delivery agent.
That command is usually one of the following:
/bin/sh -c /usr/bin/smrsh -c
These tell sendmail to run
/bin/sh (the Bourne shell) or
/usr/bin/smrsh (the
sendmail restricted shell) to
execute the program specified by prg
. The -c
tells that shell to take any arguments that follow and execute them as though they ...
Get sendmail, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.