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:
Verified Exim was running
Confirmed Exim daemon is active and listening on port 25.
Sent local tests (mail -s “Test” root@localhost
) which succeeded.
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).
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.
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.
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.
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.
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!
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