O'Reilly logo

Sendmail, 3rd Edition by Bryan Costales

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required