Operating System - HP-UX
1836451 Members
2596 Online
110100 Solutions
New Discussion

Re: E-mail to another server

 
Don Spare
Regular Advisor

E-mail to another server

I have been following a previous thread about sendmail to MS Exchange because I, too, am attempting the same thing. After much experimentation and many attempts (all of which failed) I finally tried to send mail from one unix server to the other (both HP-UX 11.0). That attempt also failed.

I believed I followed all the directions described in the other thread and those past threads that were referenced. It seems my sendmail is simply not transmitting outside of its own server.

The return email messages I get indicate a "server timeout" and that it will keep trying for 5 days.

Help!!!
11 REPLIES 11
Uday_S_Ankolekar
Honored Contributor

Re: E-mail to another server

Hi,

Couple of things you got to check.

DNS configuration : If you have configured DNS check for MX records entry.

Check whether sendmail daemon is running.

Try sending a test mail with sendmail -bv

Look for /var/adm/syslog/mail.log file for possible informations

Good luck

-USA..

Good Luck..
Sridhar Bhaskarla
Honored Contributor

Re: E-mail to another server

Don,

I assume the other system is in the same domain. Try few debugging things.

1. Stop and start sendmail using

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

2. Do a mailq and see if you have got anything
out there

3. Try to send a mail to an account on the
server itself.

$echo "test" |mailx -s "test" your_id@your_system

Check with elm or from commands to see if you have received the mail.

4. Try manually connecting to the other server through port 25.

$telnet other_server 25
HELO other_server
quit

5. Make sure your system is nslook-able on the other system. Try both regular and reverse look ups.

6. Make sure there are no firewals that are blocking the sendmail port in between.

7. Check your /var/adm/syslog/mail.log file for more errors.

-Sri



You may be disappointed if you fail, but you are doomed if you don't try
Don Spare
Regular Advisor

Re: E-mail to another server

Okay. Here's what I've got.

1. Stop and start sendmail using
I did this with no effect.

2. Do a mailq and see if you have got anything
out there
I have more than 10 messages in the queue.

3. Try to send a mail to an account on the
server itself.
I did this and it is stuck in the queue. When I don't include the server name it works fine. The mail was never received.

4. Try manually connecting to the other server through port 25.
This worked just fine.

5. Make sure your system is nslook-able on the other system. Try both regular and reverse look ups.
We are not using DNS. Only /etc/hosts


6. Make sure there are no firewals that are blocking the sendmail port in between.
All servers are in the same subnet.


7. Check your /var/adm/syslog/mail.log file for more errors.

I get the following error over and over. I checked the IP address and it seems to be pointing to the same server but it is not the primary IP address and I only have one NIC connected.

Oct 4 09:38:18 dwprod01 sendmail[12566]: gethostbyaddr(10.10.10.102) failed: 1


Now what??
Jeffrey S. Sims
Trusted Contributor

Re: E-mail to another server

Just an idea,

sendmail.org says the following:
confHOSTS_FILE
HostsFile [/etc/hosts]
The file to use when doing "file" type access of hosts names.

There is a like similar to the following in your /etc/mail/sendmail.cf file:

# hosts file (normally /etc/hosts)
#O HostsFile=/etc/hosts

You may want to try and uncomment that line, then stop and start sendmail and see if that works for you.
Don Spare
Regular Advisor

Re: E-mail to another server

Thanks for all the hints from everyone.... but what else can I do? This is still not working. My mail queue entries look like:

--Q-ID-- --Size-- -----Q-Time----- ------------Sender/Recipient------------
NAA13623 21 Thu Oct 4 13:29 root
(host map: lookup (dwdev001): deferred)
oracle@dwdev001
IAA01874 9 Thu Oct 4 08:18 root
(host map: lookup (dwdev001): deferred)
oracle@dwdev001

My /var/adm/syslog/mail.log looks like:

Oct 4 14:07:37 dwprod01 sendmail[18494]: gethostbyaddr(10.10.10.102) failed: 1
Oct 4 14:07:37 dwprod01 sendmail[18495]: starting daemon (8.9.3 (PHNE_18546)): queueing@00:05:00
Oct 4 14:08:22 dwprod01 sendmail[18532]: gethostbyaddr(10.10.10.102) failed: 1
Oct 4 14:10:22 dwprod01 sendmail[19072]: gethostbyaddr(10.10.10.102) failed: 1
Oct 4 14:12:22 dwprod01 sendmail[19169]: gethostbyaddr(10.10.10.102) failed: 1
Oct 4 14:14:22 dwprod01 sendmail[19383]: gethostbyaddr(10.10.10.102) failed: 1
Oct 4 14:16:23 dwprod01 sendmail[19799]: gethostbyaddr(10.10.10.102) failed: 1
Oct 4 14:17:20 dwprod01 sendmail[19830]: gethostbyaddr(10.10.10.102) failed: 1


None of the messages are being sent except within the local server and only if they are not addressed with a domain (i.e., user name only).

What else can I do?

Anu Mathew
Valued Contributor

Re: E-mail to another server

Hi,

Looks like issues with your resolving cause this.

Do you use FQDN (fully qualified domain names in the /etc/hosts file? It appears not.

From your posting, it is apparent that you're sending mails from the server "dwdev001" to the server "dwprod01" . Please post the relevant lines from the /etc/hosts file from both the servers, along with the /etc/resolv.conf of both of them?

Have you noted the 5th item on Sridhar's reply? I am sure that this is a problem with resolving your host names.

HTH,

Anu Mathew
Uday_S_Ankolekar
Honored Contributor

Re: E-mail to another server

Hi,

May be you have tried all these following steps.

What is your DS in Sendmail.cf file..?? on source server.

Did you try telnet 25 option with destination server.?? What is the result.

What is resolve.conf says.?
Is /etc/nsswitch.conf configured properly..??

Did you try sending mail otherway round..??

Good luck

-USA...


Good Luck..
Kevin Wright
Honored Contributor

Re: E-mail to another server

If your not using dns, you got your work cut out for you. especially with the newer versions of sendmail, sendmail likes to use dns for it underlying processes. but here's some hints to help.
use FQDN in /etc/hosts
uncomment the hosts file in sendmail.cf..as stated earlier.
uncomment the ServiceSwitchFile in sendmail.conf. use hosts first..this is like nsswitch.conf.
try setting the smart host server in sendmail.cf..both of them, DS and the other one farther down..FallBackMX.uncomment it and restart sendmail.

I would recommend implementing DNS if you need to send emails though. You might want to think about it.
Don Spare
Regular Advisor

Re: E-mail to another server

Thanks to all for your hints. However, I finally called HP support and with their help it is finally working. The problem is that sendmail 8.9.3 does not use the /etc/mail/service.switch file. It uses the /etc/nsswitch.conf file instead.
The setup suggestions of /etc/mail/sendmail.cf were okay but didn't go quite far enough. The rule for checking on the local domain comes commented out. Removing the # fixed the server-to-server problem.

Thanks for your assistance.
daniel figueroa
Occasional Advisor

Re: E-mail to another server

I'm having the same problem of getting messages hanging up in the queue that should be going to an Exchange server:
# sendmail -bp
Mail Queue (2 requests)
--Q-ID-- --Size-- -----Q-Time----- ------------Sender/Recipient------------
MAA04672 19 Fri Oct 12 12:05 root
(host map: lookup (roseville.ca.us): deferred)
dfigueroa@roseville.ca.us

But I'm not getting this error:


Oct 4 14:07:37 dwprod01 sendmail[18494]: gethostbyaddr(10.10.10.102) failed: 1
my /etc/nsswitch.conf file looks like this, where my /etc/hosts file has the mail machine with a FQDN entry:


hosts: dns [NOTFOUND=continue] files
services: files
protocols: files
networks: files
rpc: files
netgroup: files

Thanks in advance,
Daniel
Paul Kuhn_3
New Member

Re: E-mail to another server

I was getting that message as well the problem
for me was that in the sendmail.cf I did'nt have the DS option set correctly.
DSexchangename is what fixed it for me.