Outgoing SMTP connections "cannot open socket"

Posted January 28, 2021 541 views
EmailDigitalOcean 1-Click Apps Marketplace

Hi, I run two digitalocean droplets. One is an Ubuntu 16.04 which I run as a mailinabox email server. This has run with no problems for many years and handles incoming and outgoing email for my personal emails and a handful of friends. The other one is a DO marketplace cyberpanel droplet, on which I run a few websites, mostly wordpress based.
I normally configure my wordpress sites on the cyberpanel droplet to send email via the external SMTP server on my other droplet, it previously worked fine. But this cyberpanel droplet has stopped being able to connect to my SMTP server (or any external SMTP server). I have checked firewall etc and all settings i can think of.

I just want to check whether there is something on DigitalOcean’s end that is blocking this connection? It is really essential for me to get this working.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hi there @beggsnet,

Indeed, I believe that in some cases port 25 might be closed. Have you tried using port 587 or 465 instead?


Hello there,

As Bobby already mentioned, port 25 may be closed for new accounts. This is something we have been doing to reduce spam on our network. Please do not think that we are accusing you of sending spam, it is more that we simply cannot accurately determine who is going to send it.

Stopping spam is a constant fight, so we have implemented some restrictions on newer accounts. To qualify for the ability to send out an email, we do require accounts to wait 60 days before we can look into removing the restriction. Once your account has reached 60 days of stable use, please do reach back out to us so we can look into this for you.

Hope that helps!