LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 01-15-2010, 03:34 PM   #1
glt
Member
 
Registered: Aug 2003
Distribution: RedHat
Posts: 39

Rep: Reputation: 15
Sendmail No route to host


Hi All,

Good to be back doing a linux task again. It's been a long time!

So here's my question:
I have two machines:

A.domain.com: (Old mail server): Red Hat 9 (Linux 2.4.20-30.9)
B.domain.com: (New mail server): RHEL Client 5 (2.6.18-164.2.1.el5)
(Both machines are in the same subnet and on the same switch).

I wanted to test the new mail server by sending an E-mail message
to it from the old one, but the maillog says

"
Jan 15 14:42:39 A sendmail[2737]: o0FJgXg9002731: to=<user@B.domain.com>,
ctladdr=<user@C.com> (1036/100), delay=00:00:00, xdelay=00:00:00, mailer=esmtp,
pri=30532, relay=B.domain.com. [x.x.x.x], dsn=4.0.0, stat=Deferred: B.domain.com.:
No route to host
".

I can ping from A.domain.com to B.domain.com and from B.domain.com to A.domain.com
I can traceroute -p 25 from A.domain.com to B.domain.com and from B.domain.com to A.domain.com
I can *telnet* on port 25 from B.domain.com to A.domain.com

BUT when I telnet on port 25 from A.domain.com to B.domain.com
I get "telnet: connect to address x.x.x.x: No route to host"

The resolved IP x.x.x.x is correct by the way. So I see no reason why
it should fail to telnet on port 25 to A.domain.com.

Anyone any ideas?

Cheers,
Geoff
 
Old 01-15-2010, 04:29 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 163Reputation: 163
Check your iptables configuration on both hosts (/firewalls between them).
 
Old 01-15-2010, 04:32 PM   #3
glt
Member
 
Registered: Aug 2003
Distribution: RedHat
Posts: 39

Original Poster
Rep: Reputation: 15
Hi rweaver,

We were thinking simultaneously.
I turned off the FireWal (temporarily) on Machine B.
Now I get "stat=Deferred: Connection refused by B.domain.com."

More on Monday I guess.

Thanks for the reply.

cheers,
Geoff
 
Old 01-16-2010, 07:52 PM   #4
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
First test is with pinging, second with telnet to port 25.

Next are with loking at the log of B.domain.com mailserver, to see why it is denying connections. Security measures like it denies if DNS record for domain and connecting IP are not the same? Or B server can not get reverse DNS record for IP of the A server?
 
Old 01-18-2010, 01:54 PM   #5
glt
Member
 
Registered: Aug 2003
Distribution: RedHat
Posts: 39

Original Poster
Rep: Reputation: 15
Hi DrLove73,

Regarding your suggestion, "First test is with pinging, second with telnet to port 25",
please see my original post.

More information:
=================
/var/log/maillog log in B.domain.com shows no entries when A.domain.com tries to
connect to send it the E-mail.

On B.domain.com
If I do:
telnet x.x.x.x 25
I get:
telnet: connect to address x.x.x.x: Connection refused
telnet: Unable to connect to remote host: Connection refused

But if I do:
telnet localhost 25
It works:...
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 B.domain.com ESMTP Sendmail 8.13.8/8.13.8; Mon, 18 Jan 2010 14:21:56 -0500

The Firewall is disabled right now, so what could prevent
B.domain.com from telnetting to itself on port 25 ?

Thanks for the help guys.
Cheers,
Geoff
 
Old 01-18-2010, 02:01 PM   #6
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by glt View Post
The Firewall is disabled right now, so what could prevent
B.domain.com from telnetting to itself on port 25 ?
Sendmail config of course, since connection is refused. I use Postfix with webmin web based configuration application, so I can not help you directly with this.
 
Old 01-18-2010, 04:32 PM   #7
glt
Member
 
Registered: Aug 2003
Distribution: RedHat
Posts: 39

Original Poster
Rep: Reputation: 15
Hi,

Ok DrLove73. Thanks for trying.

So can anyone else out there suggest an explanation for this:

On host x.x.x.x, if I do:
telnet x.x.x.x 25
I get:
telnet: connect to address x.x.x.x: Connection refused
telnet: Unable to connect to remote host: Connection refused

But if I do:
telnet localhost 25
It works:...
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).

Cheers,
Geoff
 
Old 01-18-2010, 05:10 PM   #8
glt
Member
 
Registered: Aug 2003
Distribution: RedHat
Posts: 39

Original Poster
Rep: Reputation: 15
Hi guys,

I found the problem. I needed to let sendmail listen to traffic
from other IPs other than localhost on port 25. So in sendmail.cf
Change:
O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
to
O DaemonPortOptions=Port=smtp,Addr=x.x.x.x, Name=MTA


Nice description is given here:
http://www.linuxjournal.com/article/5507

Cheers,
Geoff
 
  


Reply

Tags
sendmail


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail Error - No Route To Host mindfrost82 Linux - Software 3 11-17-2009 04:07 AM
ssh: connect to host .....No route to host soumyacs Linux - Newbie 5 10-27-2009 10:03 AM
Sendmail: no route to host. nightmooneagle Linux - Server 3 11-10-2008 02:19 AM
sendmail error no route to host jez_pag Programming 1 04-17-2007 06:08 AM


All times are GMT -5. The time now is 08:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration