Operating System - HP-UX
1753795 Members
6940 Online
108799 Solutions
New Discussion юеВ

Re: Host unknown error response

 
Thomas Kopp
Occasional Advisor

Host unknown error response

Hi,
sendmail tries to resolv for "every" mail
the hostname of th remote Mail-Server.
If the DNS Server is not availble I get of course the error message .
Now sendmail deletes the messages
(does not send it to the queue).

Question: How can I avoid this situation, and sendmail storage the message in the queue.
3 REPLIES 3
Stefan Farrelly
Honored Contributor

Re: Host unknown error response

This is not easy. If you are sending emails to hundreds of different domains then you simply have to rely on dns to lookup their IP numbers. If your dns servers arent responding quickly enough then you can lengthen the lookup time (see man nslookuprc), or else contact whomever looks after your dns servers and tell them they are overloaded causing timeouts and it needs to be fixed.

.nslookuprc is a file in roots home dir (/ or could be elsewhere). It contains a timeout and retry line, eg;

retry=1
timeout=2

We have reduced ours, but you can try increasing them - eg. retry=5, timeout=5

We had to resort to inserting lines into our /etc/hosts file for domains where its critical mail gets through immediately, ie. copy the hostname and IP and put it into /etc/hosts, now reconfigure /etc/nsswitch.conf to look in /etc/hosts if it cant find it via dns, eg;

hosts: dns [NOTFOUND=continue] files

Then even if dns is down you can resolve important domains aok and mail will go out immediately.
Im from Palmerston North, New Zealand, but somehow ended up in London...
James Specht
Trusted Contributor

Re: Host unknown error response

What we do here is setup the mail server as a DNS slave server. We then set the mail server's primary dns server to itself. This way if your primary dns server is down you can still deliver mail. It is also a little faster to run dns locally than it is to run off of your primary dns server.
"Everyone can be taught to sculpt: Michelangelo would have had to be taught how not to. So it is with the great programmers."
RolandH
Honored Contributor

Re: Host unknown error response

Hi Thomas,

only a suggestion. Configure your mail server as secondary DNS, too. And then reconfigure the /etc/resolv.conf that your mail server will use itself as DNS.
You have big advantages.
- DNS resolutions are cached on your system.
- accordingly your resolution is faster.
- you are independent if primary DNS dies.


HTH
Roland
Sometimes you lose and sometimes the others win