Report this

What is the reason for this report?

Outbound Mail Not Sending – Port 25 Blocked? Need Guidance

Posted on July 1, 2025

Hey folks,

I’ve been running a small personal mail server for learning purposes — mostly to understand how mail flows and to get better at server administration. So far, everything’s been a great experience and a solid challenge.

Here’s the issue I’m stuck on:

I can receive emails just fine.

But outgoing emails aren’t leaving the server.

Looking into it, I suspect outbound port 25 might be blocked by digitalOcean or something upstream.

I ran nc -v smtp.domain.com 25 test and it just hangs — which suggests some filtering is in place.

So my questions are:

Is there a safe and legitimate way to get outbound port 25 unblocked, or a recommended alternative approach?

Should I be asking my hosting provider, or is it better to just route through a smarthost (e.g., via port 587)?

What would you do if you wanted to fully understand the end-to-end of sending mail from your own box without relying on a third-party relay?

I want to be respectful of best practices and avoid getting flagged, but also curious enough to want to know how it all really works under the hood.

Any advice or pointers would mean a lot — especially from those who’ve gone down this self-hosted rabbit hole. Thanks in advance for reading.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hey 👋

Yep, outbound SMTP on port 25 is blocked by default on new DigitalOcean accounts to prevent spam and abuse. Even if you’re using authenticated Gmail SMTP, the block still applies.

https://docs.digitalocean.com/support/why-is-smtp-blocked/

Also worth reading: https://www.digitalocean.com/community/tutorials/why-you-may-not-want-to-run-your-own-mail-server

Your best bet is to either:

  • Reach out to DigitalOcean support and ask if they can review and unblock it (not guaranteed, but worth a shot)

  • Or use a service like SendGrid, Mailgun, or Postmark. They’re much better for deliverability and support SMTP over API, which works even if port 25 is blocked and has better performance than standard SMTP.

Some providers also support alternate ports like 2525. Gmail usually doesn’t, but it’s worth checking in case anything changed.

Let me know how it goes!

- Bobby

Heya,

Yep, outbound SMTP on port 25 is blocked by default on new DigitalOcean accounts to prevent spam and abuse. Even if you’re using authenticated Gmail SMTP, the block still applies.

https://docs.digitalocean.com/support/why-is-smtp-blocked/

Also, it’s best to use SMTP ports like 465 or 587. The best way forward is to propare your application to use these ports and contact DigitalOcean’s support to ask to have your block lifted.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.