${if_name}
The name of the receive interface V8.10 and later
Network interfaces can have one or more addresses associated with each interface, and each address will have a hostname associated with it. For example, on a machine with two interfaces, the one connected to the outside world might have the name host.your.domain, whereas the interface that is connected to the internal network might have the name host.sub.your.domain.
When sendmail first starts up as a listening daemon, it binds to a port on all interfaces or on a particular interface (DaemonPortOptions=Addr= on page 994). It then waits to accept connections from hosts or programs (clients) that wish to route mail through it.
When a client connects to the local machine,
sendmail records the local IP
address of the connected-to interface in the
${if_addr}
macro (${if_addr}
on page 827), the family of that address in the
${if_family}
macro (${if_family} on page 828), and the name associated with the
interface over which the connection was made in this
${if_name}
macro. If the connection is on the local host’s
loopback interface, the
${if_name}
macro is undefined.
The ${if_name}
macro can be useful when you are set up to do
virtual hosting. You can have
sendmail give its greeting
message in a form that makes it appear to be the
host that is associated with the interface:
LOCAL_CONFIG define(`confSMTP_LOGIN_MSG', `$?{if_name}${if_name}$|$j$. ESMTP MTA')
Here, we define sendmail’s
initial greeting message with the SmtpGreetingMessage ...
Get sendmail, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.