home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


sendmail Desktop Reference

sendmail Desktop ReferenceSearch this book
Previous: 2.3 Delivery Agent F= Flags Chapter 2
The sendmail.cf File
Next: 2.5 Class Macros
 

2.4 Defined Macros

Defined macros allow strings of text to be represented symbolically. A defined macro is one whose symbol represents a single string.


D


Xstring

The symbolic name (here X ) is either a single letter or a multi-character name. If multi-character, it must be surrounded by curly braces:


D


{XXX}string

The value in a defined macro is referenced by prefixing its name with a $ . Because defined macros in rules are expanded when the configuration file is read, a $& prefix can be used when deferred expansion is desired.

The sendmail program reserves all macros but those beginning with an uppercase letter for its own internal use. Since the m4 configuration technique is not internal (to the program), it uses uppercase macro names. Here we show the internal macros currently used by sendmail and the external macros currently used by the m4 technique.

$_

Holds the RFC1413-validation text, and any IP source route information that was found (see §31.10.1).

$a

Contains the origin date in RFC822 format (see §31.10.2).

$b

Contains the current date in RFC822 format (see §31.10.3).

${bodytype}

Contains the ESMTP BODY parameter for the current message (see §31.10.4).

$B

Specifies the BITNET relay (see §31.10.5). This macro can be set using the m4 technique by defining BITNET_RELAY .

$c

Contains the current hop count (see §31.10.6).

${client_addr}

Stores the current connecting host's IP address (see §31.10.7).

${client_name}

Stores the current connecting host's canonical name (see §31.10.8).

$C

Specifies the hostname of the DECnet relay (see §31.10.9). This macro can be set using the m4 technique by defining DECNET_RELAY .

$d

Contains the current date in UNIX ctime (3) format (see §31.10.10).

${envid}

Holds the original DSN envelope ID (see §31.10.12).

$E

Specifies the X.400 relay (unused, see §31.10.13).

$f

Contains the current sender's (the From:) address (see §31.10.14).

$F

Specifies the FAX relay (see §31.10.15). This macro can be set using the m4 technique by defining FAX_RELAY .

$g

Contains the current sender's address relative to the recipient (see §31.10.16).

$h

Contains the host part of the current recipient address (see §31.10.17).

$H

Specifies the mail hub (see §31.10.18). This macro can be set using the m4 technique by defining MAIL_HUB .

$i

Contains the queue identifier for the current message (see §31.10.19).

$j

Holds the official canonical name of the local machine (see §31.10.20). This macro can be set using the m4 technique by defining confDOMAIN_NAME .

$k

Holds the UUCP name of the local machine (see §31.10.21).

$L

Specifies the "local user" relay (see §31.10.23). This macro can be set using the m4 technique by defining LUSER_RELAY.

$m

Holds the official domain name for the local machine (see §31.10.24).

$M

Specifies who we are masquerading as (see §31.10.25). This macro can be set using the m4 technique using the MASQUERADE_AS construct.

$n

Specifies whom error messages should be from (see §31.10.26). This macro can be set using the m4 technique by defining confMAILER_NAME .

${opMode}

Contains the operating mode that sendmail started in (see §31.10.28).

$p

Contains the current sendmail process' pid (see §31.10.29).

$r

Contains the protocol used to receive the current message (see §31.10.31).

$R

Specifies the relay for user names that lack an @host.domain part (see §31.10.32). This macro can be set using the m4 technique by defining LOCAL_RELAY .

$s

Contains the current sender host's name (see §31.10.33).

$S

Specifies the Smart Host (see §31.10.34). This macro can be set using the m4 technique by defining SMART_HOST .

$t

Contains the current time in seconds (see §31.10.35).

$u

Contains the current recipient's user name (can be auto-replicated in the A= equate of a delivery agent if F=m is present) (see §31.10.36).

$U

Specifies the UUCP name to override $k (see §31.10.37).

$v

Holds the sendmail program's version (see §31.10.38).

$V

Specifies the UUCP relay (for the class $=V ) (see §31.10.39).

$w

Holds the short name of the local host (see §31.10.40).

$W

Specifies the UUCP relay (for the class $=W ) (see §31.10.41).

$x

Contains the "full name" of the current sender (see §31.10.42).

$X

Specifies the UUCP relay (for the class $=X ) (see §31.10.43).

$y

Holds the name of the controlling tty (see §31.10.44).

$Y

Specifies the UUCP relay for unclassified hosts (see §31.10.45).

$z

Contains the current recipient's home directory (see §31.10.46).

$Z

Specifies the version of this m4 configuration (see §31.10.47). This macro can be appended to using the m4 technique by defining confCF_VERSION .


Previous: 2.3 Delivery Agent F= Flags sendmail Desktop Reference Next: 2.5 Class Macros
2.3 Delivery Agent F= Flags   2.5 Class Macros