Name

$u

Synopsis

The parse rule set 0 (Section 19.5) is used to resolve the recipient address into a triple: the delivery agent (with $#), the host part of the address (with $@), and the recipient’s address (with $:). The recipient’s address is then processed by rule set 2 (the generic rule set for all recipient addresses), then by the rule set indicated by the R= equate of the delivery agent (the custom recipient address processing), and finally by the final rule set 4 (post-processing for all addresses).

If the delivery agent has the F=A flag set (F=A), that rewritten recipient’s address is looked up in the aliases file and replaced with its alias if one exists. If it is not replaced and if the F=5 flag (F=5) is set, the address is rewritten by the localaddr rule set 5 to possibly pick a new delivery agent and repeat this process.[21]

After aliasing, the rewritten recipient’s address is then assigned to $u. If the delivery agent’s F=w flag (F=w) is set,[22] the value of $u is then used to look up information about that user with the method defined by the MailboxDatabase option (MailboxDatabase)[23] The user’s home directory is made the value of $z, which in turn is used to access the user’s ~/.forward and dead.letter files.

For all delivery agents the final value of $u can be used as a component of the delivery agent’s A= (A=) equate. For example:

A=uux - $h!rmail ($u)

Note that $u is special (See this section) in delivery agent A= equates. If it is absent, sendmail speaks SMTP or ...

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.