Preassigned sendmail Macros

When sendmail first begins to run, it preassigns values to certain sendmail macros. The complete list of these macros is shown in Table 21-1. Each is described in detail at the end of this chapter, in Section 21.9.

Table 21-1. Preassigned macros

Macro

§

Description

$b

$b

The current date in RFC822 format

${deliveryMode}

${deliveryMode}

The current delivery mode (V8.9 and above)

$j

$j

The canonical hostname

$k

$k

UUCP node name (V8.1 and above)

${load_avg}

${load_avg}

The current load average (V8.10 and above)

$m

$m

The domain name (V8.1 and above)

$n

$n

The bounced mail sender

${opMode}

${opMode}

The startup operating mode (V8.7 and above)

$v

$v

The sendmail program’s version

$w

$w

The short name of this host

All preassigned sendmail macros can be redefined in the configuration file or in the command line. The -d35.9 (-d35.9) debugging switch (when run on an empty configuration file) can be used to watch sendmail predefine its macros.[2]

Note that the mc configuration technique uses many more macros than are shown here (see Table 21-5). But even with that technique this short list of macros is all that are internally defined by the sendmail program when it first starts up.

Also note that many more macros are defined while sendmail sends and receives messages, and processes its queue (see Section 21.9 for a list of all macros).

Macros and the System Identity

The nature of email addresses requires that sendmail have a firm ...

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.