'HostsFile'' ''''

HostsFile

Specify alternate /etc/hosts file V8.7 and later

When canonifying a host's name, sendmail will use the method described under the ServiceSwitchFile option (ServiceSwitchFile). When that method is files, sendmail parses the /etc/hosts file to find the canonical name. If a different file should be used on your system, you can specify it with this HostsFile option:

O HostsFile=path            configuration file (V8.7 and later) 
-OHostsFile=path            command line (V8.7 and later) 
define(`confHOSTS_FILE',path)   mc configuration (V8.7 and later) 

Here, path is of type string. If path is missing, the name of the /etc/hosts file becomes an empty string. If the entire option is missing, the default is the value that was given to _PATH_HOSTS when sendmail was compiled (_PATH...). If the path cannot be opened for reading (for any reason at all), host canonification by this method is silently skipped.

One example of a use for the HostsFile option would be to use a switched-service file to cause all host lookups to use DNS first, then files:

hosts:    dns files

In that case you would use a special file to hold information about internal hosts that are not known to DNS. Such a file might look like this:

123.45.67.89    secret.internal.host.domain

This special file would be defined with the HostsFile option.

The HostsFile option is not safe. If specified from the command line, it can cause sendmail to relinquish its special privileges.



    Part I: Build and Install
    Part II: Administration
    Part III: The Configuration File
    Chapter 21. The D (Define a Macro) Configuration Command
    Chapter 24. The O (Options) Configuration Command