TCP · Port 587IANA Registered

Port 587 — SMTP (Message Submission)

Designated standard port for mail user agents (clients) submitting outgoing email to an authenticated relay server using STARTTLS.

⚡ Primary Use Cases & Environments

  • ✓Standard outgoing mail server (SMTP) configuration for email clients

🛡️ Security & Vulnerability Analysis

Requires mandatory user authentication (SASL) and TLS encryption to prevent unauthorized spam relaying.

🔧 Network Diagnostics & Inspection

1. Check Active Listening Sockets (Local Host)
Terminal Command
$ sudo ss -tuln | grep :587
Inspects whether any local process daemon is bound to port 587.
2. Remote Port & Service Scan (Nmap)
Terminal Command
$ nmap -p 587 -sV --script smtp-commands <target-ip>
Probes target IP to determine whether port 587 is open, closed, or filtered.
3. Wireshark Capture / Display Filter
tcp.port == 587Wireshark Filter

🔥 Firewall Configuration Rules (UFW & iptables)

UFW (Uncomplicated Firewall)
Terminal Command
$ sudo ufw allow 587/tcp
Applies a persistent Linux UFW firewall rule for port 587.
iptables Command
Terminal Command
$ sudo iptables -A INPUT -p tcp --dport 587 -j ACCEPT
Appends a direct netfilter kernel rule to the INPUT chain for port 587.

❓ Frequently Asked Questions (FAQ)

Why is port 587 preferred over port 25 for mail submission?

RFC 6409 formally designated port 587 for authenticated client submission. Unlike port 25, port 587 is not blocked by consumer ISPs.

Related Networking Tools & Guides