On Tue, Sep 25, 2012 at 3:30 PM, Alexander Hall <[email protected]> wrote:
> I had a problem with sendmail not honoring /etc/hosts.
What problem are you trying to solve that makes you want to use
/etc/hosts? e.g., "I need to ignore a bogus MX entry for a specific
host"?
> and after some
> googeling I found my way back to the Fine FAQ of ours, stating the
> following:
...
> Now I happily created that file and HUP'd sendmail, but did not notice any
> change in behaviour. Looking further I noted this:
Quoting /usr/src/gnu/usr.sbin/sendmail/doc/op.me's description of the
service switch file:
-----
Notice: since sendmail must access MX records for
correct operation, it will use DNS if it is configured
in the ServiceSwitchFile file. Hence an entry like
hosts files dns
will not avoid DNS lookups even if a host can be found
in /etc/hosts.
-----
I.e., if the sendmail.cf direct the MTA to do MX lookups, they will
still happen via DNS. The service switch just controls
hostname->address lookups.
Depending on what you're really try to do, the right solution is
*probably* to use a mailertable entry with an IP or hostname in square
brackets.
Philip Guenther