Question

Why is DigitalOcean blocking outbound port 25 on my Droplet?

Hello DigitalOcean Support Team,

I’m experiencing an issue where outbound SMTP on port 25 from my Droplet (IP 164.92.85.163) is not working. I’ve spent considerable time troubleshooting and here are the steps I’ve taken so far:

  1. Verified Exim was running

    • Confirmed Exim daemon is active and listening on port 25.

    • Sent local tests (mail -s “Test” root@localhost) which succeeded.

  2. Flushed and opened local queues

    • Cleared the Exim spool (systemctl stop exim; rm -rf /var/spool/exim/input/* /var/spool/exim/msglog/*; systemctl start exim).

    • Ensured no messages remain in the queue (exim -bpc returned 0).

  3. Checked DNS/MX configuration

    • Verified correct MX records for my domain (dig MX speedyturtleonline.com +short returns valid MX).

    • Added my domain to /etc/remotedomains so Exim treats it as remote.

  4. Disabled all local firewalls

    • Confirmed ufw was inactive, csf was reloaded with port 25 allowed, and nft rules include permit for tcp dport 25 ct state new.

    • Ran csf -r to flush and rebuild iptables chains.

  5. Confirmed local packet flow

    • Used tcpdump -nn -i any 'tcp port 25 and (tcp[tcpflags] & (tcp-syn|tcp-ack) != 0)'.

    • Observed outgoing SYNs to external mail servers (e.g. 74.125.137.27:25), but no SYN-ACK replies ever arrive.

  6. Port scan & connectivity tests

    • Installed netcat-traditional and ran nc -vz gmail-smtp-in.l.google.com 25, which hung indefinitely.

    • Verified with tcpdump that SYNs go out but never return.

    • Confirmed DNS resolution and routing are correct.

These results strongly indicate that outbound TCP port 25 is being blocked upstream of my Droplet, as no external mail server is responding. Could you please remove any port-25 egress restrictions on this Droplet so that it can deliver mail directly to MX hosts?

Thank you for your assistance. If you need any further details or logs, please let me know.


Submit an answer


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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
May 19, 2025

Hey!

DigitalOcean blocks outbound traffic on port 25 by default to help prevent spam, it’s a common restriction across cloud providers. Even if everything is configured correctly, those outbound connections won’t go through unless the block is lifted.

You can reach out to support at https://do.co/support and ask if they can remove the block for your Droplet, though in most cases it’s not guaranteed.

The better approach is to use an SMTP provider like SendGrid, Mailgun, or SMTP2GO. These services support alternative ports like 587 or 2525 and also offer SMTP APIs, which are often more reliable than direct SMTP.

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

- Bobby

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

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.