${server_name}
The hostname of the connected-to machine V8.11 and later
When sendmail connects to another
machine to send email, it gathers two pieces of
information about that machine: its name and its IP
address. If the connection is over a network, the
host name is stored in this ${server_name}
macro. If the connection
is local, as with LMTP, this ${server_name}
macro is
given the name of the delivery agent as its value.
If neither situation is true, this ${server_name}
macro is
given the literal value local
.
The ${server_name}
macro is used primarily with the authinfo
(Authinfo and the access database (V8.12 and
later) on page 195), tls_server
(The access database with tls_server and
tls_client
on page 214), and try_tls
(Disable STARTTLS with the try_tls rule
set
on page 217) rule sets.
The ${server_name}
macro is available for your use in rule sets, and
can be useful, for example, in policy control. Note
that a $&
prefix is necessary when you reference this macro in
rules (that is, use $&{server_name}
, not ${server_name}
).
${server_name}
is
transient. If it is defined in the configuration
file or in the command line, that definition can be
ignored by sendmail. ${server_name}
must
never be set with the macro
database map (macro on page 925)
to a value that is empty.
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.