System Administration Guide: Network Services

Additional Defined Macros From Version 8.12 of sendmail

The following table describes additional macros that are reserved for use by the sendmail program. The macros' values are assigned internally. For more information, refer to the sendmail(1M) man page.

Table 14–21 Additional Defined Macros for sendmail




Identifies the current address as an envelope sender or a recipient address. 


Holds the result of the resolve call for ${client_name}: OK, FAIL, FORGED, or TEMP.


Specifies the current delivery mode sendmail is using instead of the value of the DeliveryMode option.

${dsn_notify}, ${dsn_envid}, ${dsn_ret}

Holds the corresponding DSN parameter values. 


Provides the interface's address for the incoming connection if the interface does not belong to the loopback net. This macro is especially useful for virtual hosting. 

${if_addr_out}, ${if_name_out}, ${if_family_out}

Avoids the reuse of ${if_addr}. Holds the following values respectively:

The address of the interface for the outgoing connection 

The host name of the interface for the outgoing connection 

The family of the interface for the outgoing connection 


Provides the interface's host name for the incoming connection and is especially useful for virtual hosting.  


Checks and reports the current average number of jobs in the run queue. 


Holds the value of the message size (SIZE=parameter) in an ESMTP dialogue before the message has been collected. Thereafter, the macro holds the message size as computed by sendmail and is used in check_compat. For information about check_compat, refer to Table 14–25.


Holds the number of validated recipients. 


Holds the number of delivery attempts. 

${rcpt_mailer}, ${rcpt_host}, ${rcpt_addr}, ${mail_mailer}, ${mail_host}, ${mail_addr}

Holds the results of parsing the RCPT and MAIL arguments, which is the resolved right-hand side (RHS) triplet from the mail delivery agent ($#mailer), the host ($@host), and the user ($:addr).