Categories of Macros
At the end of this chapter we list all the macros in alphabetical order for easy lookup and explain each in detail. Here, we present them grouped by application with only a brief description.
Macros and the System Identity
The nature of email addresses requires that sendmail have a firm understanding of the machine on which it is running. The -d0.4
debugging switch (see -d0.4) causes sendmail to print its understanding of what the local machine is. A portion of that output displays the value of four key macros:
============ SYSTEM IDENTITY (after readcf) ============ (short domain name) $w = here (canonical domain name) $j = here.our.domain (subdomain name) $m = our.domain (node name) $k = here ========================================================
The short domain name (in $w
; see ) is simply the name of the local host without any domain information added as a suffix. The canonical domain name (in $j
; see ) is the fully qualified and official name of the local machine. The subdomain name (in $m
; see ) is just the domain part of the canonical name without a leading dot. And the node name (in $k
; see ) is the UUCP name of the local machine.
In addition to these macros, sendmail initializes the class $=w
with a list of alternative names for the local host (see $=w) and class $=m
with a list of the local domains (see $=m).
Macros and the Date
The concept of time can take on different meanings depending on whether we are talking about the sender, the recipient, the remote machine, or the local machine. To keep different times separate, sendmail employs an assortment of macros, as shown in Table 31.4.
Macro | Description | |
---|---|---|
$a
| $a | The origin date in RFC822 format |
$b
| The current date in RFC822 format | |
$d
| $d | The current date in UNIX ctime(3) format |
$t
| $t | Current time in seconds |