Updated 1 min read

Outgoing port 25 and sending email

Why outgoing port 25 is blocked on every server, which mail ports are open, and how to ask for an unblock for a legitimate mail server.

Outgoing connections to port 25 (SMTP) are blocked on every server. This protects the reputation of our IP addresses from spam, which keeps your own mail deliverable. Nothing else is blocked, and incoming traffic is not affected.

What is open#

Port Use Status
25 outgoing Server-to-server mail Blocked by default
465, 587 outgoing Sending through an external mail relay Open
Incoming, any port Receiving mail on your own server Not affected

Send mail without port 25#

Most people do not need port 25. Send through an SMTP relay on port 587 or 465: your mail provider, or a transactional email service. Configure your application with the relay's host, port, user and password. To check that the port is reachable:

nc -vz smtp.example.com 587

Check that port 25 is the problem#

timeout 5 bash -c '</dev/tcp/smtp.example.com/25' && echo open || echo blocked

blocked is expected on a default server.

Run your own mail server#

If you have a real reason to deliver mail yourself, open a ticket and tell us:

  • the domain you will send for (with proper SPF, DKIM and DMARC records),
  • what you will send and roughly how much.

We unblock case by case after checking it. Abuse (spam, phishing) means suspension, so do not ask for an unblock for mass mailing, and do not rely on it for anything urgent.

Related: fair use and abuse, deploy your first VPS.

More in this section