''${if_addr_out}'' '''


The IP address of the send interface V8.12 and above

The sendmail program can send SMTP email over one or more network interfaces, where each interface can have one or more addresses associated with it. When sendmail sends a network email message, it begins by connecting to a host on the network. Once that connection has been made (once the other site accepts the connection), sendmail records the address associated with the interface over which it made that outbound connection in the ${if_addr_out} macro.

If the connection uses an interface with an IPv4 address, that IP number is stored as, for example:

If the connection uses an interface with an IPv6 address, the address stored is prefixed with a literal IPv6:. For example:


If the connection uses the loopback interface, the value stored in ${if_addr_out} is for IPv4, and IPv6:::1 for IPv6.

${if_addr_out} is available for use in rule sets, and can be useful for rejecting spam or restricting connections to particular addresses. Note that a $& prefix is necessary when you reference this macro in rules (that is, use $&{if_addr_out}, not ${if_addr_out}).

${if_addr_out} is transient. If it is defined in the configuration file or in the command line, that definition can be ignored by sendmail.

    Part I: Build and Install
    Part II: Administration
    Part III: The Configuration File
    Chapter 21. The D (Define a Macro) Configuration Command
    Chapter 24. The O (Options) Configuration Command