Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

telnet 25

I get this message


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[]:25: Connection timed out

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


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

share|improve this question
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
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 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. – RobM Feb 22 '13 at 12:49

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 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.

share|improve this answer
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

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.

share|improve this answer
connecting to localhost is successfull. I disabled iptables service but the same problem. – hpn Feb 22 '13 at 11:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.