Skip to content
statance
MenuClose
← All ports

Port 587: SMTP submission

Low risk

Port 587 is the mail submission port. Email clients and applications connect to it, upgrade to TLS with STARTTLS and authenticate before sending. It is normally meant to be reachable from the internet.

Port
587
Protocol
TCP
Service
SMTP submission
Expose to internet?
Yes, usually
Also used by
Postfix, Exim, Microsoft 365, Gmail, transactional email providers

Is port 587 safe to open?

Port 587 is designed to be reachable by your users and requires authentication. As with 465, the main danger is a compromised account sending spam through your server.

How to secure SMTP submission

  • Require STARTTLS before authentication (Postfix smtpd_tls_security_level = encrypt on the submission service).
  • Require authentication and reject unauthenticated relaying.
  • Rate-limit outgoing messages per user.
  • Monitor for authentication failures and block abusive addresses.

Check if port 587 is open

Linux: what is listening on this port

sudo ss -tlpn | grep ':587 '

Windows (PowerShell): what is listening

Get-NetTCPConnection -LocalPort 587 -State Listen | Select-Object LocalAddress, OwningProcess, @{n='Process';e={(Get-Process -Id $_.OwningProcess).Name}}

From another machine: is it reachable

nc -zv HOST 587 # or nmap -p 587 HOST # Windows Test-NetConnection HOST -Port 587

Test the SMTP submission service itself

openssl s_client -starttls smtp -connect HOST:587 -crlf

Open port 587 in the firewall

ufw (Ubuntu, Debian)

sudo ufw allow 587/tcp

firewalld (RHEL, Rocky, Alma, Fedora)

sudo firewall-cmd --permanent --add-port=587/tcp sudo firewall-cmd --reload

Windows Firewall (PowerShell, as Administrator)

New-NetFirewallRule -DisplayName "Allow 587/TCP" -Direction Inbound -Protocol TCP -LocalPort 587 -Action Allow

Monitor port 587

Add a TCP port monitor for 587 and Statance connects to it from up to six regions, alerting you by email, Slack, Discord or PagerDuty when SMTP submission stops answering. TCP port monitoring.

Related ports

Port 465SMTPS (mail submission over TLS)Low risk
Port 25SMTPMedium risk
Port 143IMAPMedium risk

FAQ

What is port 587 used for?

Sending email from a client or application to your mail server or provider. It is the standard SMTP submission port and works where port 25 is blocked.

Is it safe to open port 587?

Usually, yes. Port 587 is designed to be reachable by your users and requires authentication. As with 465, the main danger is a compromised account sending spam through your server.

Is port 587 TCP or UDP?

SMTP submission uses TCP on port 587.

How do I check if port 587 is open?

On the server, run sudo ss -tulpn | grep ':587 ' (Linux) or Get-NetTCPConnection -LocalPort 587 (Windows) to see what is listening. From another machine, run nc -zv HOST 587 or Test-NetConnection HOST -Port 587.

All ports →

Know the moment a port stops answering.

TCP, HTTP, DNS and SSL checks from six regions, plus server metrics from a one-line agent.