Name
$g
Synopsis
The
$g macro is identical to $f
except that it undergoes additional rule-set processing to translate
it into a full return address. During delivery the
sender’s address is processed by the
canonify rule set 3, the rule set 1, and the
final rule set 4, and then placed into
$f. That rewritten address is further processed by
the canonify rule set 3 and rule set 1 again, then
rewritten by the rule set specified in the S=
equate of the delivery agent. Finally, it is rewritten by the
final rule set 4, and the result is placed into
$g.
$g holds the official return address for the
sender. As such, it should be used in the From:
and Return-Path: header definitions.
The S= equate for each delivery agent must perform
all necessary translations to produce a value for
$g that is correct. Because the form of a correct
return address varies depending on the delivery agent, other rule
sets should generally not be used for this translation.
Ordinarily, RFC2822 comments (Section 25.3.4) are
restored when $g is used in headers. To omit those
comments (perhaps for security reasons), you can use the
F=c delivery agent flag (F=c).
$g is transient. If it is defined in the
configuration file or in the command line, that definition can be
ignored by sendmail. Note that a
$& prefix is necessary when you reference this
macro in rules (that is, use $&g, not
$g).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access