Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"no route to host" error message

1,450 views
Skip to first unread message

Engin qwert

unread,
Jul 13, 2012, 6:39:49 AM7/13/12
to
Hello, I set my postfix server using a ready made shell script. The Mail server is working as excepted except the localhost it self. So the Mail Server can not send mail using Icedove, Telnet nor PHP' mail () function. When I run "mailq" command the error message is as shown below.
--------------
679D8120710      611 Fri Jul 13 12:34:05  some_sender@some_domain.tld
               (connect to mx2.hotmail.com[65.55.92.184]:25: No route to host)
                                         some_re...@hotmail.com
--------------
Note: I changed the receipent and the sender addresses

Reindl Harald

unread,
Jul 13, 2012, 6:59:41 AM7/13/12
to
this is clearly a network-layer problem
what says "ping 65.55.92.184" from this machine and other ones?

this can vary at different locations and be caused by a temporary
problem of a router between you and hotmail, that is why a MTA
treis many times to deliver a message

from here no problem

[harry@srv-rhsoft:~]$ ping 65.55.92.184
PING 65.55.92.184 (65.55.92.184) 56(84) bytes of data.
64 bytes from 65.55.92.184: icmp_req=1 ttl=243 time=152 ms
64 bytes from 65.55.92.184: icmp_req=2 ttl=243 time=152 ms
64 bytes from 65.55.92.184: icmp_req=3 ttl=243 time=149 ms
64 bytes from 65.55.92.184: icmp_req=4 ttl=243 time=150 ms
64 bytes from 65.55.92.184: icmp_req=5 ttl=243 time=150 ms

signature.asc

Engin qwert

unread,
Jul 13, 2012, 7:05:54 AM7/13/12
to
I run the ping command at the Mail Server the result is as below:
---
root@xn--hadibakalm-5ub:~# ping 65.55.92.184
PING 65.55.92.184 (65.55.92.184) 56(84) bytes of data.
64 bytes from 65.55.92.184: icmp_req=1 ttl=243 time=180 ms
64 bytes from 65.55.92.184: icmp_req=2 ttl=243 time=179 ms
64 bytes from 65.55.92.184: icmp_req=3 ttl=243 time=179 ms
64 bytes from 65.55.92.184: icmp_req=4 ttl=243 time=177 ms
---
But I am sure it is not temporary situation because. I am now outside my network and with my remote client I can send mail using Icedove relaying to my Mail Server. I have been strugling this situation about 10 days but cannot manage to set up correctly. My main goal is to send mail using PHP's mail function. But I suppose if I send mail from the local server, then the Telnet, PHP is as well could send mail.

> Date: Fri, 13 Jul 2012 12:59:41 +0200
> From: h.re...@thelounge.net
> To: postfi...@postfix.org
> Subject: Re: "no route to host" error message

Duncan B.

unread,
Jul 13, 2012, 6:49:50 AM7/13/12
to

On Fri, 13 Jul 2012, Reindl Harald wrote:

>> --------------
>> 679D8120710 611 Fri Jul 13 12:34:05 some_sender@some_domain.tld
>> (connect to mx2.hotmail.com[65.55.92.184]:25: No route to host)
>> some_re...@hotmail.com
>> --------------

> this is clearly a network-layer problem
> what says "ping 65.55.92.184" from this machine and other ones?

Hi,

You're not on a RedStation dedicated server are you, per-chance? The
reason I ask, is that I encountered this exact error yesterday and
investigating into it with a tcpdump, showed RedStation's gateway was
filtering SMTP connections, forcing it through their own (exceptionly
poorly configured) relay. The response I was getting back when
attempting outbound port 25 connections was 'no route to host'.

This is very annoying as I've had to smarthost mail through a different
box on port 587, to avoid their relay! Was not made aware of this before
purchasing the server and it's not in their T&Cs.

Cheers,
Duncan.

Reindl Harald

unread,
Jul 13, 2012, 7:13:47 AM7/13/12
to


Am 13.07.2012 12:49, schrieb Duncan B.:
> You're not on a RedStation dedicated server are you, per-chance? The reason I ask, is that I encountered this
> exact error yesterday and investigating into it with a tcpdump, showed RedStation's gateway was filtering SMTP
> connections, forcing it through their own (exceptionly poorly configured) relay.

they are doing WHAT?

if you have a good laywer maybe your chance to make money
they are surely not permitted to act this way

signature.asc

Engin qwert

unread,
Jul 13, 2012, 7:14:39 AM7/13/12
to
  Hey, thank you all for the quick replays. No, I am on the Metronet network a Turkish ISP. In Turkey the port 25 is also blocked as well. So I set my postfix on port 587. But the strange part of the problem the clients of the mail server could both Pop3 and SMTP successfully but the local machine itself cannot send mail but could Pop3.

> Date: Fri, 13 Jul 2012 11:49:50 +0100
> From: dun...@presidium.org
> To: h.re...@thelounge.net
> CC: postfi...@postfix.org

> Subject: Re: "no route to host" error message
>
>
> On Fri, 13 Jul 2012, Reindl Harald wrote:
>
> >> --------------
> >> 679D8120710 611 Fri Jul 13 12:34:05 some_sender@some_domain.tld
> >> (connect to mx2.hotmail.com[65.55.92.184]:25: No route to host)
> >> some_re...@hotmail.com
> >> --------------
>
> > this is clearly a network-layer problem
> > what says "ping 65.55.92.184" from this machine and other ones?
>
> Hi,
>
> You're not on a RedStation dedicated server are you, per-chance? The
> reason I ask, is that I encountered this exact error yesterday and
> investigating into it with a tcpdump, showed RedStation's gateway was
> filtering SMTP connections, forcing it through their own (exceptionly

Engin qwert

unread,
Jul 13, 2012, 10:20:55 AM7/13/12
to
  Hello and sorry for asking again. 

I telnet'ted the hotmail.com from both port 25 and port 587 when I telnet directly from server or any other location in Istanbul
----------
engin@xn--hadibakalm-5ub:~$ telnet hotmail.com 25
Trying 65.55.72.183...
Trying 65.55.72.135...
Trying 65.55.72.151...
Trying 65.55.72.167...
telnet: Unable to connect to remote host: No route to host
----------


but when I try to connect over port 587 it gives...
----------
root@xn--hadibakalm-5ub:~# telnet hotmail.com 587
Trying 65.55.72.183...
Trying 65.55.72.135...
Trying 65.55.72.151...
Trying 65.55.72.167...
telnet: Unable to connect to remote host: Connection timed out
----------


So I followed lots of forums that shows how to forward any outgoing port to another one such as:

iptables -t nat -A OUTPUT -p tcp --dport 25 -j DNAT --to-destination 10.138.9.254:587
iptables -t nat -A PREROUTING -p tcp --dport 587 -j REDIRECT --to-port 25
iptables -t nat -A PREROUTING -p tcp --dport 25 -j REDIRECT --to-port 587
iptables -t nat -A OUTPUT -p tcp --dport 25 -j DNAT --to-port 587
iptables -t nat -A OUTPUT -p tcp --dport 25 -j DNAT --to-destination xn--hadibakalm-5ub.com:587
iptables -t nat -A OUTPUT -p tcp --dport 25 -j DNAT --to-destination 10.138.9.201:587

but none of them changed the port number in the error message I get
> (connect to mx2.hotmail.com[65.55.92.184]:25: No route to host) 
still It writes port 25 

any clue?


From: eng...@hotmail.com
To: postfi...@postfix.org
Subject: RE: "no route to host" error message
Date: Fri, 13 Jul 2012 11:14:39 +0000

Reindl Harald

unread,
Jul 13, 2012, 10:25:54 AM7/13/12
to


Am 13.07.2012 16:20, schrieb Engin qwert:
> Hello and sorry for asking again.
>
> I telnet'ted the hotmail.com from both port 25 and port 587 when I telnet directly from server or any other
> location in Istanbul
> ----------
> engin@xn--hadibakalm-5ub:~$ telnet hotmail.com 25
> Trying 65.55.72.183...
> Trying 65.55.72.135...
> Trying 65.55.72.151...
> Trying 65.55.72.167...
> telnet: Unable to connect to remote host: No route to host

contact your ISP after made sure you are not
blocking something via iptables your own

this is simply a firewall-rejecting

"-j REJECT --reject-with icmp-host-unreachable" will exactly
trigger this repsones regardless if it is done outgoing
in your firewall or somewehere in the network
___________________

http://www.linuxtopia.org/Linux_Firewall_iptables/x4550.html

The following reject types are currently valid:
icmp-net-unreachable
icmp-host-unreachable
icmp-port-unreachable
icmp-proto-unreachable
icmp-net-prohibited
icmp-host-prohibited.

The default error message is to send a port-unreachable to the host.

signature.asc

Engin qwert

unread,
Jul 13, 2012, 10:33:40 AM7/13/12
to
Sorry for asking everything but I want to make sure there isn't any rejection. I run the  command you told me.  
To my weak understanding ther is no restrictions at all in the iptables isn't it?
--------------
root@xn--hadibakalm-5ub:~# iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination   

--------------
> Date: Fri, 13 Jul 2012 16:25:54 +0200
> From: h.re...@thelounge.net
> To: postfi...@postfix.org

> Subject: Re: "no route to host" error message
>
>
>

Reindl Harald

unread,
Jul 13, 2012, 10:58:06 AM7/13/12
to
BOAH DO NOT SWITCH TO TOP-POSTING
no, so call your ISP and scream loud in the phone

signature.asc

Engin qwert

unread,
Jul 16, 2012, 1:22:14 PM7/16/12
to
Subject: RE: "no route to host" error message
Date: Fri, 13 Jul 2012 14:33:40 +0000

> The default error message is to send a port-unreachable to the host.
>

   Hi there, I asked to my ISP to open port 25 but they insisted on that they are not blocking any of my ports. But still the below command  outputs "no route to host" error message.

#telnet hotmail.com 25 

     On the other hand to make sure I am not blocking any outgoing port myself, I installed firestarter program and selected the  "allow everything except selected ports" option then blocked nothing. I hope this will allow any outgoing ports to be opened.

  This is very weird that the mail server send mail when relayed from any machine except the localhost itself. On debian how can I send mail with php any suggestion would be apprecriated.
0 new messages