Operating System - HP-UX
1821188 Members
3354 Online
109631 Solutions
New Discussion юеВ

Re: Sendmail Problem - host name lookup failure

 

Sendmail Problem - host name lookup failure

I have two HP9000 KSeries servers...one in New York, one in Boston. Both are running HP-UX10.2. I recently attempted to setup sendmail to work on both of these servers. I have the Boston server working correctly - I can send email from the server to myself. The New York server, however, cannot send email, despite the fact that I configured it identical to the one in Boston.

One thing I noticed is that the new York server is not accepting connections on port 25, whereas New York is. See below:

msphbos0ROOT:ps -eaf | grep sendmail
root 6225 1 0 Feb 24 ? 0:31 sendmail: accepting connections on port 25



msphnyc1ROOT:ps -eaf | grep sendmail
root 26104 1 0 08:54:31 ? 0:00 sendmail: accepting connections


Is there some sort of config file where i should specify new York to use port 25 for sendmail?
14 REPLIES 14
Steven E. Protter
Exalted Contributor

Re: Sendmail Problem - host name lookup failure

Shalom,

It would be helpful to see the actual error message from mail.log.the

The patching of two systems may not be the same.

swlist -l product | grep -i sendmail

A likely cause of the problem is inability to resolve the domain name.

Check /etc/nsswitch.conf for resolve order.

Check that the systems /etc/resolv.conf servers can be reached via the network and they resolve the domian name of the mail correctly.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sunny123_1
Esteemed Contributor

Re: Sendmail Problem - host name lookup failure

Hi

configuration file for sendmail is sendmail.cf

Regards
Sunny

Re: Sendmail Problem - host name lookup failure

===FROM MAIL LOG===

Jul 23 09:24:32 msphnyc1 sendmail[8508]: KAA12547: to=me@verizon.com,
ctladdr=bkjb830 (129/20), delay=22:48:00, xdelay=00:00:00, mailer=relay,
relay=bagate.verizon.com, stat=Deferred: Name server: bagate.verizon.com:
host name lookup failure


===PATCHING===
msphbos0ROOT:swlist -l product | grep -i sendmail
PHKL_15997 B.10.00.00.AA PANIC on disquota while executing sendmail
PHNE_17135 B.10.00.00.AA sendmail(1m) 8.8.6 cumulative patch.

msphnyc1ROOT:swlist -l product | grep -i sendmail
PHKL_15997 B.10.00.00.AA PANIC on disquota while executing sendmail


===NSSWITCH.CONF===

passwd: files
group: files
hosts: files
services: files
protocols: files
rpc: files
networks: files
rpc: files
netgroup: files
automount: files
aliases: files


NOTE: /etc/resolv.conf not in use. No DNS.
Mel Burslan
Honored Contributor

Re: Sendmail Problem - host name lookup failure

in order to "send" mail, the mail server is not required to accept connections on port 25 or any other port for that matter. Listening mail server is used for receiving mail and I am sure you are not using this server (or servers) as mail gateways. Or are you ?

But to send email out, from an hpux server which has no direct mail access, you will need to use your organization's mail relay server and you should have access to this server via port 25.

Make sure:

1. you have this line

DSmailrelayhost.mydomain.com

in your /etc/mail/sendmail.cf

2. check with the administrators of mailrelayhost to verify this server is authorized (by ip address) for mail forwarding

3. make sure you can telnet to port 25 of this mailrelayhost and get something like

220 EHLO yourserver.domain.com

or similar message. if it is timing out, it is time to talk to your network folks.

Hope this helps
________________________________
UNIX because I majored in cryptology...
Mel Burslan
Honored Contributor

Re: Sendmail Problem - host name lookup failure

my previous message came at the same time as your second message. From the looks of the log messages, your server is trying to connect to the mail server in verizon itself, without the help of a mail relay server.

please provide output for the output of this command from both Boston and Newyork servers:

grep ^DS /etc/mail/sendmail.cf

________________________________
UNIX because I majored in cryptology...
Steven E. Protter
Exalted Contributor

Re: Sendmail Problem - host name lookup failure

Shalom,

It is nsswitch.conf most likely.

hosts: files

For name resolution to work, you would need to have the IP address of the MX mail exchange server in /etc/hosts for file based resolution.

Check nsswitch.conf on the working system and see if it has DNS. Take hits hosts configuration and then make sure the name servers in /etc/resolv.conf work for at least the domain name in use in this process.

Also note that port 25 or port 53 (DNS) are often blocked in a Corporate environment.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: Sendmail Problem - host name lookup failure

===SENDMAIL.CF===

msphbos0ROOT:grep ^DS /etc/mail/sendmail.cf
DSbagate.verizon.com

msphnyc1ROOT:grep ^DS /etc/mail/sendmail.cf
DSbagate.verizon.com


===NSSWITCH.CONF===

msphbos0ROOT:tail -15 nsswitch.conf
# See the Adminstering Internet Services Manual and the switch(4) man
# page for more information on the name service switch.
#

passwd: files
group: files
hosts: files
services: files
protocols: files
rpc: files
networks: files
rpc: files
netgroup: files
automount: files
aliases: files

msphnyc1ROOT:tail -15 nsswitch.conf
# See the Adminstering Internet Services Manual and the switch(4) man
# page for more information on the name service switch.
#

passwd: files
group: files
hosts: files
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files
Mel Burslan
Honored Contributor

Re: Sendmail Problem - host name lookup failure

what does

nslookup bagate.verizon.com

say on both servers ? Does it resolve to an ip address and the correct one at that ?

also

please post the screen capture from both Boston and NY servers after running this command on both (copy and paste the output is fine, you do not need to attach graphical screen capture):

telnet bagate.verizon.com 25

________________________________
UNIX because I majored in cryptology...

Re: Sendmail Problem - host name lookup failure

Notice that Boston says..."looking up FILES" while New York does not:


msphbos0ROOT:nslookup bagate.verizon.com
Using /etc/hosts on: msphbos0

looking up FILES
Name: bagate.verizon.com
Address: 138.83.34.66

===========================================
msphnyc1ROOT:nslookup bagate.verizon.com
Using /etc/hosts on: msphnyc1

Name: bagate.verizon.com
Address: 138.83.34.66

Re: Sendmail Problem - host name lookup failure

msphbos0ROOT:telnet bagate.verizon.com 25
Trying...
Connected to bagate.verizon.com.
Escape character is '^]'.
220 smtpirv2.verizon.com ESMTP Sendmail 8.13.3/8.13.3; Thu, 23 Jul 2009 09:05:28 -0500 (CDT)


============================================

msphnyc1ROOT:telnet bagate.verizon.com 25
Trying...
Connected to bagate.verizon.com.
Escape character is '^]'.
220 smtpirv2.verizon.com ESMTP Sendmail 8.13.3/8.13.3; Thu, 23 Jul 2009 09:05:32 -0500 (CDT)
Mel Burslan
Honored Contributor

Re: Sendmail Problem - host name lookup failure

one more test please:

echo test | sendmail -v you@someplace.com

please post the detailed output of this command. It is very strange that you have access to mail relay and still not able to send mail.
________________________________
UNIX because I majored in cryptology...

Re: Sendmail Problem - host name lookup failure

msphbos0ROOT:echo test | sendmail -v you@someplace.com
you@someplace.com... Connecting to bagate.verizon.com via relay...
220 smtpirv2.verizon.com ESMTP Sendmail 8.13.3/8.13.3; Thu, 23 Jul 2009 09:32:28 -0500 (CDT)
>>> EHLO msphbos0.verizon.com
250-smtpirv2.verizon.com Hello [172.26.46.12], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 50000000
250-DSN
250-DELIVERBY
250 HELP
>>> MAIL From: SIZE=5
250 2.1.0 ... Sender ok
>>> RCPT To:
250 2.1.5 ... Recipient ok
>>> DATA
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 n6NEWSZB027086 Message accepted for delivery
you@someplace.com... Sent (2.0.0 n6NEWSZB027086 Message accepted for delivery)
Closing connection to bagate.verizon.com
>>> QUIT
221 2.0.0 smtpirv2.verizon.com closing connection

=========================================


msphnyc1ROOT:echo test | sendmail -v you@someplace.com
you@someplace.com... Deferred: Name server: bagate.verizon.com: host name lookup failure
Mel Burslan
Honored Contributor

Re: Sendmail Problem - host name lookup failure

it is obvious from the combination of messages above that "name lookup failure" message is bogus as far as the OS goes. On the other hand upon a little more careful reading of your previous messages, I have noticed you do not have any sendmail cumulative patch on the NY server, which might be the cause of your woes.

Since hpux 10.20 is out of support now, I am not sure if you can find this patch somewhere but, almost certainly you will need it. Try digging up your old patch CD's and tapes and try to locate a sendmail cumulative patch and then apply it.
________________________________
UNIX because I majored in cryptology...
Vinod Kumar Yadav
Trusted Contributor

Re: Sendmail Problem - host name lookup failure

Hi,

In the most environments a smtp relay server is provided for send a email.

You take the IP address or host name of the server for accept mail from your server then.

Edit /etc/mail/sendmail.cf

Change DS to:

DSname_of_smtp_relay_server

or

DSIP address of smtp relay server

ex

DS telcon.co.in

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

Then check few thing for sending the mail sucessfully.

Check the permission of the files related sendmail /var/spool/mqueue or check the
/etc/resolv.conf & Please check the sendmail services running.

root # ps -ef | grep -i sendmail
root 1700 1 0 Jul 11 ? 0:04 sendmail: accepting connections
root 29011 23487 0 16:13:46 pts/tb 0:00 grep -i sendmail

root # ls -ld /var/spool/mqueue
drwxr-xr-x 2 root bin 1024 Jul 13 16:13 /var/spool/mqueue

root # ls -ld resolv.conf
-rw-r--r-- 1 root sys 110 Jun 16 2007 resolv.conf

Try with Permission send mail & check the log /var/adm/syslog/mail.log


Thanks
Vinod Kumar Yadav
Jai Shiv Shankar