DigitalOcean and SMTP

 •  Filed under DevOps

So, today I spent about 2 hours trying to setup an SMTP service sender (attempting to use AWS SES, Mandrill, MailGun, etc) under a DigitalOcean droplet.

Some weeks ago I had setup PostFix and friends, without success. I left it cool after being blocked because after double checking my configuration mail just would not get out.

Today I tried again using an external SMTP service... after some hours of tinkering I came to the conclusion that DigitalOcean blocks the standard SMTP outbound ( 25, 587 and 465) ports in their Droplets.

You can try this by using the great service Just do something like

telnet 25  
telnet 587  
telnet 465  

And you will get a connection-timed-out error. But if you do

telnet 3123  

Or any other random port, you will be able to connect.

Fortunately for my SMTP sending requirements, AWS and some other SMTP services provide non-standard ports so that messages can be sent.