Name
A=
Synopsis
The
program that is to be run (specified by the P=
delivery agent equate) is given its C-language char
**argv
array (list of command-line arguments) by this
A=
delivery agent equate. This delivery agent
equate is traditionally the last one specified because prior to V8.7,
the argv
arguments were all those from the
=
to the end of the line:
Mlocal, P=/bin/mail, F=rlsDFMmnP, S=10, R=20, A=mail -d $u ↑prior to V8.7, argv to end of line ...
Beginning with V8.7, the A=
is treated like any
other delivery agent equate, in that it ends at the end of line
or at the first comma. The backslash character
can be used as a prefix to embed commas in the A=
delivery agent equate.
Macros are expanded and can be used in this argv
array. For example:
A=mail -d $u
The A=
begins the declaration of the argument
array. The program that is specified by the P=
delivery agent equate (/bin/mail) will be
executed with an argv
of:
argv[0] = "mail" argv[1] = "-d" ← switch means perform final delivery argv[2] = "fred"← where sendmail macro $u contains fred
The macro value of $u
contains the current
recipient name or names ($u). Another
sendmail macro that commonly appears in
A=
fields is $h
, the recipient
host ($h). You are, of course, free to use
any sendmail macro you find necessary as a part
of this argv
array. Note that
$u
is special, in that if it is missing,
sendmail will speak SMTP to the delivery agent
(See this section), or LMTP if the delivery agent has the
F=z
flag set (F=z). Also note ...
Get Sendmail, 3rd 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.