# DigitalOcean SMTP Blocked: Send Email from a Droplet (Ports 25, 465, 587)

Source: https://srvscripts.com/guides/digitalocean-smtp-blocked-send-email/
Updated: 2026-10-15
Publisher: srvScripts (https://srvscripts.com/)

You set up a mail server, WordPress site or app on a DigitalOcean Droplet, and nothing arrives. There is no bounce and no error in the inbox, just messages stuck in the queue and “Connection timed out” in the log. That is DigitalOcean’s SMTP block, not a broken mail server. This guide shows how to confirm it and the two ways around it that work on a Droplet: an authenticated relay on an alternative port, or an email API over HTTPS. It includes the exact settings for Exim on cPanel and DirectAdmin, Postfix and WordPress.

**Short answer:** DigitalOcean blocks SMTP ports 25, 465 and 587 on all Droplets by default, including traffic sent through a Reserved IP, and its support page offers no unblock route. Mail sent directly or to a relay on those ports times out. Send through an authenticated relay on port 2525 instead (MailBaby, SMTP2GO and Mailgun accept it) or through the relay’s HTTP API. For cPanel or DirectAdmin, set the Exim smarthost transport to `port = 2525`; for Postfix use `relayhost = [relay.example.net]:2525`; in a WordPress SMTP plugin set port 2525 with TLS. Name the Droplet with its full hostname so DigitalOcean creates the PTR record.

In short: how to send mail from a Droplet when SMTP is blocked.

## Confirm it is the SMTP block

DigitalOcean’s own page, [Why is SMTP blocked?](https://docs.digitalocean.com/support/why-is-smtp-blocked/) (last verified 13 July 2026), says ports 25, 465 and 587 are blocked on Droplets “by default”, that this also covers traffic through a Reserved IP, and recommends a third-party email service instead of running your own mail server. The typical symptoms are:

- Exim: `Connection timed out` for remote hosts, followed by `retry time not reached` on later attempts (see [Exim retry time not reached](/guides/exim-retry-time-not-reached/)).

- Postfix: `connect to gmail-smtp-in.l.google.com[...]:25: Connection timed out` in `/var/log/mail.log`.

- WordPress, Ghost, Discourse and other apps: the SMTP test hangs and then fails, even with correct credentials.

Test from the Droplet itself. The first command should fail and the second should connect if the block is the problem:

```
# Blocked port: times out after 5 seconds on a Droplet
timeout 5 bash -c '
