2

When I try to telnet to port 25 using this command:

telnet aspmx.l.google.com 25

I get this message

Trying 173.194.69.26...

And nothing more happens. I disabled csf but the problem still exsists. I also asked my VPS co. whether they have blocked port 25 and they said they have not blocked any port.

In postfix logs:

server2 postfix/smtp[30847]: connect to alt2.gmail-smtp-in.l.google.com[173.194.64.27]:25: Connection timed out

Is it possible that google has blocked my server ip address?

Edit:

Tried yahoo (telnet smtp.mail.yahoo.com 25) and it has the same result. I also disabled iptables(service iptables stop) but problem still exists.

hpn
  • 165
  • 2
  • 6
  • By default your hosting provider may have assumed you meant "port 25 inbound" which is different to "port 25 outbound". Tell them what you are trying and that it's not working for multiple external mail providers. – Ladadadada Feb 22 '13 at 10:57
  • @Ladadadada I say them that outbound connections don't work and they say that no port is blocked. – hpn Feb 22 '13 at 11:23
  • Can you connect to public hosts on other ports such as port 80? – Ladadadada Feb 22 '13 at 11:44
  • @Ladadadada Yes – hpn Feb 22 '13 at 11:46
  • 1
    Well, you have to ask yourself: Which do you trust more: your hosting provider's support team or the evidence you see with your own eyes? Port 25 is clearly blocked by something. If they refuse to acknowledge that I'd suggest shopping around for a more helpful hosting provider. – Ladadadada Feb 22 '13 at 11:57
  • I sent a ticket again, but they again said that they have not blocked this port. I have 2 another vps from this provider and they have no problem with this port. I don't know if this relates to the problem: recently my server was put in some blacklists due to sending spams. I delisted the server from these lists. Can it be cause the problem? – hpn Feb 22 '13 at 12:13
  • 1
    **I delisted the server from these lists. Can it be cause the problem?** Well, yes. People don't like spam. Mail hosting services, in particular, don't like receiving spam. If your IP address has been listed by one or more of the popular antispam blacklists then its probably made it onto some internal blacklists at various companies too. Not a lot you can do about that. – Rob Moir Feb 22 '13 at 12:49

2 Answers2

2

There are two obvious possibilities here.

  1. Your hosting provider or their upstream networks or your government have blocked outbound traffic to port 25.

  2. Google and Yahoo have blocked incoming connections from your network.

I see that you are located in Iran. Due to US law, companies in the US are prohibited from doing business with Iran, and sometimes this gets enforced rather aggressively (for instance, simply downloading free software from a web site might be blocked). If your VPS is also in Iran, this might be the cause of the issue.

To find out whether this is an issue, try connecting to a mail server in a country which is more friendly to Iran, such as Russia:

telnet mxs.mail.ru 25

If this is successful, then you are affected by the US embargo. If this also fails, then you are being blocked by the hosting provider or their providers.

In both cases, I recommend you purchase VPS services outside the country, if the service you wish to run can be provided from a server outside the country.

Finally there's a third possibility: Your VPS server's IP address may have been blacklisted due to previous abuse seen from its address. In this case you will have to figure out where it was blacklisted and have it removed from those lists. This could be difficult.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • telnet to russian server also failed. I have 2 another servers from this provider and they send and receive mails with no problem. the server was listed in some blacklists but I have delisted it from that lists recenlty – hpn Feb 22 '13 at 12:29
  • In that case I think it's your hosting provider. I don't think I trust them. :) – Michael Hampton Feb 22 '13 at 12:35
0

Can you try telnet to that port (25) to any known websites that are listening on that port. Also, if you have a local mail Server running on that port, you can try
telnet localhost 25 and eliminate other issues.

If you couldn't telnet any other websites on that port and telnet localhost works then firewall might be blocking it.

Other ways to eliminate IP being blocked is to reset your ip(if dynamic) , or trying through a proxy temporarily.

Andrews
  • 101
  • 1
  • 1
    connecting to localhost is successfull. I disabled iptables service but the same problem. – hpn Feb 22 '13 at 11:24