F=f

Delivery agent adds -f to argv All versions

If sendmail is run with a -f command-line switch (-f on page 241) and if the F=f delivery agent flag is specified, the A= for this delivery agent will have the two additional arguments -f and $g inserted between its argv[0] and argv[1]. For example, if sendmail is run as:

/usr/lib/sendmail -f jim host!bill

and if the delivery agent for sending to host is defined as:

Muucp, P=/bin/uux, F=fmsDFMhuU, S=13, R=23, A=uux - -r $h!rmail ($u)

the f in F=fmsDFMhuU causes the A= of:

A=uux - -r $h@rmail ($u)

to be rewritten as:

A=uux -f $g - -r $h@rmail ($u)

Here, $g is jim from the original command line (but rewritten to be a return address relative to the recipient). The original -f argument jim is first rewritten by the canonify rule set 3, the rule set 1, and then the final rule set 4. The result of those rewrites is placed into $f. The $f sendmail macro is rewritten by the canonify rule set 3, the rule set 1, the S= rule set, and then the final rule set 4, and the result is placed into $g. ($f and $g are described in $g on page 824.)

Note that the F=f and the F=r delivery agent flags are very similar and easily confused.

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.