When I try to telnet to port 25 using this command:
telnet aspmx.l.google.com 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: connect to alt2.gmail-smtp-in.l.google.com[22.214.171.124]:25: Connection timed out
Is it possible that google has blocked my server ip address?
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.
There are two obvious possibilities here.
Your hosting provider or their upstream networks or your government have blocked outbound traffic to port 25.
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.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.