FEATURE(nocanonify)
Don’t canonify with $[ and $] V8.1 and later
Ordinarily, sendmail tries to
canonify (add a domain to) any hostname that lacks a
domain part, and to canonify (ensure a correctly
formed domain) for any host with a domain. It does
this by passing the unadorned hostname to the
$[
and $]
operators (Canonicalize Hostname: $[ and $] on page 668). FEATURE(nocanonify)
prevents
sendmail from passing
addresses to $[
and $]
for
canonicalization. This is generally suitable for use
by sites that act only as mail gateways or that have
MUAs that do full canonicalization
themselves.
The form for FEATURE(nocanonify)
is:
FEATURE(`nocanonify')
If you only want hostnames without a domain part canonicalized, you can add a second argument like this:
FEATURE(`nocanonify', `canonify_hosts')
Note that FEATURE(nocanonify)
disables only one
possible use of $[
and $]
in the configuration file. If the
pre-V8.9 FEATURE(nouucp)
is omitted (thereby
including UUCP support), addresses that end in a
.UUCP
suffix
still have the preceding part of the address
canonified with $[
and $]
even if FEATURE(nocanonify)
was
declared.
Also note that the Modifiers=C
equate (DaemonPortOptions=Modify=
on page 996) for the DaemonPortOptions
option does the same
thing as this FEATURE(nocanonify)
, but does so on a
port-by-port basis.
Sending out any unqualified addresses can pose a risk. To illustrate, consider a header where the local host is here.us.edu:
To: hans@here.us.edu Cc: jane@here, george@fbi.us.gov From: you@here.us.edu ...
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.