In our sample, we accept the Cw command as
written, and let sendmail define the value for w internally. This is
the most common method for desktop systems like
rodent. On the system crab,
which is also known by the name wtb-gw, we would
add values to class w as follows:
Cwlocalhost wtb-gw wtb-gw.wrotethebook.com
Now mail addressed to
user@wtb-gw.wrotethebook.com would be accepted
by crab and not rejected as being addressed to
the wrong host.
Some mail servers might need to be configured to accept mail for many
different hostnames. In that case, you may want to load class w from
a file containing all the hostnames. You can do that with the
F command. The
generic-linux.cf file already has an
F command, so we could just place the client
hostnames in the file
/etc/mail/local-host-names.
No modification is necessary for the j macro definition because, on
this system, sendmail obtains a fully qualified domain name for the j
macro from DNS. On most systems this is the case; on other systems
sendmail obtains the hostname without the domain extension. If j
doesn't contain the full name, initialize j with the hostname
($w) and the domain name. In the sample file, we
would do this by "uncommenting" the Dj
command and editing the domain string to be
wrotethebook.com. However, there is no need to
do this because j has the correct value.
The configuration file has macro definitions for several mail relays.
None of these are assigned a value in our sample file. You only need
a relay host if your system cannot deliver the mail because it lacks
capability or connectivity. Unix systems do not lack capability, but
a firewall might limit connectivity. Some sites use a mail relay so
that only one system needs a full sendmail.cf
configuration. The other hosts at the site simply forward their mail
to the smart host for delivery. If this is the configuration policy
of your site, enter the name of the mail relay as the
"smart" relay. For example: