Operating System - HP-UX
1822497 Members
2653 Online
109642 Solutions
New Discussion юеВ

Sendmail gethostbyaddr failure

 
MTSU_SAN
Regular Advisor

Sendmail gethostbyaddr failure

I just added a new lan dedicated to it's own network, and sendmail 8.11.1 is generating
Aug 1 09:46:22 frank sendmail[29941]: gethostbyaddr(192.1.1.2) failed: 1
errors. I would like to know how to reconfigure it to stop paying attention to this lan.
7 REPLIES 7
Stefan Farrelly
Honored Contributor

Re: Sendmail gethostbyaddr failure


Add an entry to your /etc/hosts files for 192.1.1.2

and ensure your /etc/nsswitch.conf (DNS lookup) file is configured to check hosts also;

hosts: dns [NOTFOUND=continue] files

Then when you do; nslookup 192.1.1.2
it will resolve so gethostbyaddr will not produce an error.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Sajid_1
Honored Contributor

Re: Sendmail gethostbyaddr failure

John Dvorchak
Honored Contributor

Re: Sendmail gethostbyaddr failure

I don't know if you can. But you can make and entry in /etc/hosts resolving that address and the errors will quit. Of course you will have to make sure that you host looks in /etc/hosts via the /etc/nsswitch.conf file if present.
If it has wheels or a skirt, you can't afford it.
Christopher McCray_1
Honored Contributor

Re: Sendmail gethostbyaddr failure

Hello,

I'm assuming you are using dns and the new lan cards are entered in /etc/hosts.

Make sure your /etc/nsswitch.conf looks like this:

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

What I believe is happening is that you have return instead of continue, which means that if the ip isn't found, it bombs. Having continue lets it go on to files if not found in dns.

Hope this helps

Chris
It wasn't me!!!!
Hai Nguyen_1
Honored Contributor

Re: Sendmail gethostbyaddr failure

Jerry,

If you are using /etc/hosts for host name lookup, add a fake_hostname associated with this IP.

Is it true that it takes 2,3 minutes each time you restart sendmail manually currently?

Hai
Bill McNAMARA_1
Honored Contributor

Re: Sendmail gethostbyaddr failure

try adding
192.1.1.2 frankie frankie.

into /etc/hosts
just the dot will do..

Later,
Bill
It works for me (tm)
MTSU_SAN
Regular Advisor

Re: Sendmail gethostbyaddr failure

Thanks everyone. When I did a search on forums, Manuals and documents for "sendmail + gethostbyaddr" why didn't the darn thing find the document referenced?!