Operating System - HP-UX
1821868 Members
3207 Online
109638 Solutions
New Discussion юеВ

Sendmail error: gethostbyaddr

 
SOLVED
Go to solution
Manuales
Super Advisor

Sendmail error: gethostbyaddr

Hi .. could you tell me what is the meaning of the following error located into syslog.log file :

sendmail[4906]: gethostbyaddr(10.10.27.16) failed: 1

Thanks, Manuales.
3 REPLIES 3
Yang Qin_1
Honored Contributor
Solution

Re: Sendmail error: gethostbyaddr

Is that 10.10.27.16 a known IP? You may try to use "O DontProbeInterfaces=True" in your /etc/mail/sendmail.cf
Mustafa Gulercan
Respected Contributor

Re: Sendmail error: gethostbyaddr

Hi;

From the Sendmail ReleaseNotes we have :

The Name Service Switch feature allows you to configure the name
service policy for hostname and address lookups. This policy is used
by gethostbyname() and gethostbyaddr() library calls. You can choose
any combination of the supported name services: DNS, NIS, and files
(local hosts file).


Therefore the fix for this issue is to either :

a) ignore the message, or
b) add hostname resolution to either your /etc/hosts file, your
dns server, or your nis database depending on the hostname
resolution method incorporated within your environment.

regards;
mustafa
Bill Hassell
Honored Contributor

Re: Sendmail error: gethostbyaddr

There are a couple of locations to check for proper DNS resolution in sendmail. The first is /etc/nsswitch.conf which defines the rules for searching. The best solution is to have the hosts: line read this way:

hosts: files [NOTFOUND=continue UNAVAIL=continue] dns

This will ensure that if DNS cannot find an address, you can simply add the IP and hostname to /etc/hosts. To test the name resolution in your HP-UX system, use this command:

nsquery hosts 10.10.26.16

The other files to check are /etc/mail/sendmail.cw and /etc/mail/service.switch. The .cw file should have (after all the comments):

localhost
myhostname
myhostname.domain.org

where myhostname and domain.org are your local machine ID's. The service.switch file should have at the end:

hosts files dns
aliases files

Once changes have been made, restart sendmail with:

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start


Bill Hassell, sysadmin