Skip to main content
PORT 587 / TCPEmail & MessagingExposure Risk: Low

Port 587: SMTP Submission — Authenticated Email Submission (STARTTLS)

Standard port used by web apps (Nodemailer, Resend, SendGrid, AWS SES) to send transactional emails via STARTTLS.

Default Service
SMTP Submission
Process: postfix
Transport Protocol
TCP
IANA Registered Port 587
Docker Port Flag
-p 587:587
Container to Host Mapping

How to Check & Kill Process on Port 587 (EADDRINUSE Fix)

macOS & Linux (lsof / kill)
# Find process using port 587
sudo lsof -i :587

# Instantly kill process on port 587
lsof -ti:587 | xargs kill -9
Windows (PowerShell & CMD)
# Find PID listening on port 587
netstat -ano | findstr :587

# Force kill by PID
taskkill /PID <PID_NUMBER> /F
Cross-Platform Node.js One-Liner
# Kill port 587 via npx
npx kill-port 587

# Or diagnose via Castov CLI
npx castov fix "EADDRINUSE :::587"
Linux Firewall (UFW) & Connectivity Test
# Test if port 587 is reachable
nc -zv localhost 587

# Allow or deny port 587 in UFW
sudo ufw allow 587/tcp

Frequently Asked Questions about Port 587

What is Port 587 used for?

Port 587 is the standard network port for SMTP Submission (Authenticated Email Submission (STARTTLS)) operating over TCP. The typical system daemon or process is postfix.

How do I kill a process running on Port 587 (EADDRINUSE)?

On macOS and Linux, run: lsof -ti:587 | xargs kill -9 (or npx kill-port 587). On Windows PowerShell/CMD, run: netstat -ano | findstr :587 and then taskkill /PID <PID> /F.

Is it safe to expose Port 587 to the internet?

Port 587 has a Low security risk profile. Standard port used by web apps (Nodemailer, Resend, SendGrid, AWS SES) to send transactional emails via STARTTLS.

Other Common Network Ports