Operating System - HP-UX
1753928 Members
8852 Online
108810 Solutions
New Discussion юеВ

sendmail: host name lookup failure

 
SOLVED
Go to solution
Geetam
Frequent Advisor

sendmail: host name lookup failure

This host (HP-UX 10.20) is not receiving mail (no sendmail daemon), just sending:
. to users on local host
. to users on another host (MicroSoft Exchange, I am afraid)

My host is NOT using DNS, DHCP, or any other fancy lookups, just /etc/hosts

I can 'ping' the mail server (it is in /etc/hosts)
I can also telnet to port 25 on the Exchange server

I have looked at the following files, and I think the contents is correct
/etc/nsswitch.conf
hosts: files
/etc/resolve.conf
domain kymata.com
/etc/mail/service.switch
hosts files
aliases files

I have stayed away from setting DS in sendmail.cf, because I think that might send all mail (also to user@localhost) to the Smart Host? (and then I need a sendmail daemon to receive it again...)

I seem to remember (but my memory is vague and my notes illegible... it's my age) that sendmail does not by default use /etc/hosts to resolve hostnames and that I need to create a file /etc/netsvc.* with the contents host=local

Can someone point me in the right direction, please?

5 REPLIES 5
Kofi ARTHIABAH
Honored Contributor
Solution

Re: sendmail: host name lookup failure

If you are not using dns, remove the /etc/resolv.conf.

check your /etc/mail/sendmail.cw - it should only list your localhost. if it lists your domain, then sendmail will fail... if you have your sendmail.cw properly setup, should be able to modify the DS directive to point to the exchange server... it willonly relay if the mail cannot be delivered locally (as specified in your /etc/mail/sendmail.cw)

Good luckk
nothing wrong with me that a few lines of code cannot fix!
CHRIS ANORUO
Honored Contributor

Re: sendmail: host name lookup failure

Check the permissions of /etc/hosts. Also check is the /etc/hosts file has the correct ip address for the right aliase.
Install sendmail 8.9.3., recopy /usr/newconfig/etc/nsswitch.conf to /etc and modify accordingly.
Cross check you /etc/mail/sendmail.cf file.
Restart sendmail - (/sbin/init.d/sendmail stop/start)
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Jason Luginbuhl
Frequent Advisor

Re: sendmail: host name lookup failure

Use the DS macro to relay your mail to the Exchange server. Then if you wish local mail to remain local then you can uncomment the following ruleset to accomplish that:

# See if we are supposed to deliver to hosts in the local domain
R$* < @ $* > $* $: $>check_local < $m > $1 < @ $2 > $3 Local Domain?
"Unfortunately you can't out-program stupidity"
Jason Luginbuhl
Frequent Advisor

Re: sendmail: host name lookup failure

The sendmail error is complaining about the hostname lookup failure. Make sure that you can resolve your own hostname and the hostname of the relay:

# hostname
# nslookup IP_of_local_box
The above two should match.

# nslookup hostname_of_exchange_server
This should display the correct IP of the server that you will be relaying to.

Also, as mentioned earlier, if you are not using DNS, then you should move /etc/resolv.conf out of the way. You could save it as /etc/resolv.conf.old or something such as this.
"Unfortunately you can't out-program stupidity"
Tim Nelson
Honored Contributor

Re: sendmail: host name lookup failure

Had this problem about a year ago. One of the latter versions of sendmail demands that DNS be used. ( unacceptable to me, and HP did not help with this ). Basicall all my mail was broke !! Here is the trick. In the sendmail.cf config edit the section that talks about rules for smtp,esmtp, etc.. put 0 (zero) in front of the DNS config lines. This will disable it. See below. Hope this helps as I got no help from the vendor.

##### @(#)smtp.m4 8.33 (Berkeley) 7/9/96 #####
#CHANGED PUT 0 in front of each F= statement

Msmtp, P=[IPC], F=0mDFMuX, S=11/31, R=21, E=rn, L=990,
T=DNS/RFC822/SMTP,
A=IPC $h
Mesmtp, P=[IPC], F=0mDFMuXa, S=11/31, R=21, E=rn, L=990,
T=DNS/RFC822/SMTP,
A=IPC $h
Msmtp8, P=[IPC], F=0mDFMuX8, S=11/31, R=21, E=rn, L=990,
T=DNS/RFC822/SMTP,
A=IPC $h
Mrelay, P=[IPC], F=0mDFMuXa8, S=11/31, R=61, E=rn, L=2040,
T=DNS/RFC822/SMTP,
A=IPC $h