Unable to connect to smtp.gmail.com (Network is unreachable)

January 18, 2018 4.6k views
Networking Ubuntu 16.04

Hello, I am unable to connect to smtp.gmail.com:587 from droplet.
Here is log from telnet:

altera@genius-camp:~$ telnet smtp.gmail.com 587
Trying 74.125.206.108...
Trying 74.125.206.109...
Trying 2a00:1450:400c:c04::6d...
telnet: Unable to connect to remote host: Network is unreachable

This droplet was created from snapshot of another droplet from different account and on the old one this works fine

Can you help me with this?

1 comment
3 Answers

Yes me to

telnet: Unable to connect to remote host: Network is unreachable

Certain accounts may have outgoing blocks on SMTP ports, you may need to contact DO support to see if that's the case on your account:

https://www.digitalocean.com/company/contact/

If you are using Postfix, you have to change a parameter in Postfix configuration, inet_protocols to ipv4:

postconf -e inet_protocols=ipv4

and restart/reload the postfix service
Have another answer? Share your knowledge.