Port 25: What's Using It and Why Is Outbound SMTP Blocked?

Port 25 is the classic SMTP mail port. Here's what listens on it, why cloud and home ISPs often block outbound traffic on it, and how to check it on macOS.

Port 25 is the original SMTP port, used for server-to-server mail transfer since the early internet. If you’re trying to send mail from a script, a self-hosted app, or a mail server and it’s timing out on port 25, the port almost certainly isn’t the problem on your end; it’s being blocked upstream.

What typically listens on port 25

  • Mail transfer agents (MTAs): Postfix, Sendmail, and Exim listen on 25 when running a full mail server.
  • Nothing, on a stock Mac: macOS doesn’t run a mail server by default, so a fresh install has nothing bound to port 25.
  • Local relays: Some development setups (like a local Postfix instance for testing outgoing mail) bind 25 intentionally.

Why outbound port 25 gets blocked

This is the question that actually brings most people here. Residential ISPs (to stop malware-infected home computers from spamming) and major cloud providers (to stop abuse from disposable instances) block outbound connections on port 25 by default. AWS, Google Cloud, Azure, and DigitalOcean all do this unless you specifically request it be lifted, and even then it’s not guaranteed.

The fix isn’t to fight the block; it’s to use the ports mail providers actually expect clients to submit through:

  • Port 587 with STARTTLS: the modern standard for authenticated mail submission.
  • Port 465: SMTP wrapped directly in TLS, still widely supported.

Nearly every SMTP relay (SendGrid, Postmark, your ISP’s SMTP server, Gmail) accepts 587 or 465, so switching your client or app’s configured port usually resolves it immediately.

Is it safe to kill?

If something unexpected is listening on port 25 on your own Mac, check what it is before deciding. A local Postfix instance you set up intentionally is fine to leave running or stop as needed. Anything you don’t recognize is worth investigating rather than assuming it’s safe.

Is it suspicious?

An open listener on port 25 that you didn’t configure is one of the more legitimately worth-checking cases in this reference, since mail servers aren’t something a Mac runs by default. It’s not automatically malicious (some dev tools spin up a local SMTP catcher for testing), but confirm the process before ignoring it.

How to find what’s on port 25 on macOS

lsof -i :25

If something is listening and you don’t recognize it:

kill -9 $(lsof -ti :25)

Portie shows every listening port with the exact app behind it, so confirming whether port 25 activity is your own tooling or something else takes one glance instead of a terminal command.

Common questions

Why can't I send email on port 25?

Most residential ISPs and cloud providers (AWS, Google Cloud, DigitalOcean, and others) block outbound port 25 by default to cut down on spam sent from compromised machines. Use port 587 (SMTP submission with STARTTLS) or 465 (SMTP over TLS) instead, since almost every mail provider supports one of those.

Is it safe to have port 25 open on my Mac?

For a normal Mac, nothing should be listening on port 25 at all. If lsof shows something bound to it that you didn't set up, that's worth investigating: it could be a local mail relay you forgot about, or in rare cases something unwanted.

Is port 25 a security risk?

As an outbound block, no; it's a spam-prevention measure most providers apply. As an inbound listener, an unexpected mail server on your own Mac is unusual and worth confirming the owning process for.

Try Portie Free

See every open port on your Mac, which app owns it, and kill processes from the list.

Download Free