Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Sendmail DNS issue? localhost]: host name lookup failure

Status
Not open for further replies.

ns2

MIS
Jan 30, 2003
5
US
Whenever an email gets sent out I get the following error message in /var/spool/clientmqueue/ folder. I think the unable to resolve nameserver is the key in the error message. I am however able to ping machines by hostname. Any ideas? thanks
V6
T1043937905
K1043937905
N1
P90313
MDeferred: Name server: [localhost]: host name lookup failure
Fbs
$_apache@localhost
${daemon_flags}c u
 
I think you're right. It may be looking at the loopback device (127.0.0.1) instead of eth0. Look in you sendmail.mc and check to see if the line that starts with DEAMON_OPTIONS has the loopback ip in the line. If so, change it to your external ip or delete/comment out the line. If this isn't the case, make sure your eth0 is setup in your network configs. It should be setup to use your ISP's dns servers, unless you have a router. If you do, the router will be set to those dns servers and eth0 will be set to the router's internal ip for the dns servers.
 
Thanks for your help. I tried what you suggested an am having the same problem. What I am trying to setup is a relay from my sendmailserver to my exchnage server but am unable to resolve this DNS? issue. I am using a private dns server and can ping by hostname the entire private network from my redhat\sendmail server.
 
So you can send and receive ok as far as sendmail goes but you can't get it to your exchange? The reason I'm asking, is to find out if the problem is with your local dns (bind?) or external dns configs.
 
No it appears that when I send out an email it bounces back with the error in my title. I tried sending a test message to a another working sendmail server. I am able to ping by dns and when I type in hostname it comes back with the proper computer name. I also verified that sendmail is started and I can telnet to it by port 25.
 
What I mean by error in title is the output from tail /var/log/maillog is localhost]: host name lookup failure. Thanks
 
I'm still leaning toward the dns issue. If you can ping domains (not ip addresses) outside of your network, then dns is setup correctly. If you can't, then it seems to only be looking at your dns server (bind) and resolving just your network. If this is the case, then you need to tell your server's network interface (eth0) the ip address of the dns servers. If you have a router or gateway, it should have already been configured with the dns server ip addresses. So you would use you router's internal ip address as the gateway and dns server ip addresses.
 
I can ping internally by hostname to all local machines mostly windows and I can also ping yahoo.com and it resovolves it to the proper ip address. However I do have dns server configured on my redhat box as well could this be confusing things?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top