FEATURE(use_cw_file)

Use /etc/mail/local-host-names V8.1 and later

FEATURE(use_cw_file) causes the file /etc/mail/local-host-names (V8.10 and later) or /etc/sendmail.cw (V8.9 and earlier) to be read to obtain alternative names for the local host. One use for such a file might be to declare a list of hosts for which the local host is acting as the MX recipient. The use_cw_file is used like this:

FEATURE(`use_cw_file')

This feature causes the following F configuration command (The F Class Command on page 857) to appear in the configuration file:

Fw/etc/sendmail.cw              ← V8.9 and earlier
Fw/etc/mail/local-host-names    ← V8.10 and later

The actual filename can be changed from the default by defining the confCW_FILE macro:

define(`confCW_FILE', `-o /etc/mail/local.list')

Here, we both rename the file and make its presence optional by adding the -o switch (The F Class Command on page 857).

If the local host is known by only a few names, an alternative is to instead include the mc macro in place of the earlier feature:

LOCAL_DOMAIN(`name1 name2')

Here, name1 and name2 are alternative names for the local host.

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.