Sendmail - relay Host unknown since adding dns

Hi
ever since we�ve added the server in DNS, sendmail stopped working, but everything seems to be configured properly although in the mail logs we see:

Jul 10 16:52:58 itc01 sendmail[5593]: t6AEqrHT005593: from=root, size=6, class=0, nrcpts=1, msgid=<201507101452.t6AEqrHT005593@itc01.headquarter.tmm>, relay=root@localhost
Jul 10 16:53:08 itc01 sendmail[5593]: t6AEqrHT005593: to=myname@dominio.co.yy, ctladdr=root (0/3), delay=00:00:15, xdelay=00:00:10, mailer=relay, pri=30006, relay=192.168.1.39, dsn=5.1.2, stat=Host unknown (Name server: 192.168.1.39: host not found)
itc01[320]/etc/mail #

but in /etc/hosts file I have:

192.168.1.39    exchange-hub.headquarter.tmm

the

/etc/resolv.conf

is:

more /etc/resolv.conf
domain dominio.co.yy
nameserver 192.168.1.69
nameserver 192.168.1.39
search headquarter.tmm

and the

/etc/nsswitch.conf

:

passwd:       compat
group:        compat
hosts:        files dns
ipnodes:      dns [NOTFOUND=return] nis [NOTFOUND=return] files
networks:     nis [NOTFOUND=return] files
protocols:    nis [NOTFOUND=return] files
rpc:          nis [NOTFOUND=return] files
publickey:    nis [NOTFOUND=return] files
netgroup:     nis [NOTFOUND=return] files
automount:    files nis
#aliases:      files nis
aliases:      files
services:     nis [NOTFOUND=return] files

Please can you help?

---------- Post updated at 05:23 PM ---------- Previous update was at 05:07 PM ----------

problem solved , I have put the FQDN of the server DS macro of

sendmail.cf
host 192.168.1.39

and

getent hosts 192.168.1.39

should give the same hostname.
getent (if available on your system) uses the libc defaults that is normally /etc/nsswitch.conf, eventually through a nscd cache.

For ipnodes (Solaris?) I recommend only "files". In few configurations "files dns" can make sense, but always "files" first, and "localhost" should be in /etc/hosts file.
(Not relevant here: also services should be "files" first, for performance reason.)
Do you have nscd with hosts caching (and ipnodes caching) enabled? (See /etc/nscd.conf and command nscd -g ) Then restart nscd.

Are we actually discussing this thread again?

Robin

:wink:
Now I see, it is HP-UX. Does not have nscd, and no getent.
My /etc/nsswitch.conf recommendations are valid nevertheless.
While I wonder what HP-UX does with ipnodes...it looks like this line was blindly copied from the Sun/Solaris nsswitch.conf and does not have an effect.
--
DS in sendmail.cf is the valid line to set the relayhost.
Normally sendmail does

nslookup -q=mx relayhost

and if not successful

nslookup -q=a relayhost

or

nslookup -q=aaaa relayhost