PORTSTARTTLSIANA assigned
Port 587SMTP submission
Port 587 is the standard TCP port for message submission: a mail client sending outgoing email to its provider's server with authentication and STARTTLS encryption. It is the port to configure in Outlook, Thunderbird or a phone mail app for outgoing mail unless the provider specifies 465.
What port 587 is used for
Port 587 separates submission (a user handing a new message to their own mail provider) from relay (servers passing mail between domains on port 25). The separation, defined in RFC 6409, lets providers apply different rules to each: submission requires authentication and can enforce policies on the sender, while port 25 must accept mail from any server on the internet.
Typical outgoing-mail settings:
| Setting | Value |
|---|---|
| Server | smtp.provider.example |
| Port | 587 |
| Security | STARTTLS |
| Authentication | Username and password (or OAuth for major providers) |
How STARTTLS works on 587
The client connects in plain text, the server lists its capabilities, the client issues STARTTLS, and both sides negotiate TLS before any credentials are sent. If the upgrade fails, a correctly configured client refuses to continue rather than sending the password in clear text. Check that "require TLS" is set in the client; some older clients treat STARTTLS as optional.
Security considerations
- Require authentication and TLS on the server. Unauthenticated submission on 587 is an open relay.
- Rate-limit per account. A compromised mailbox used to send spam is the most common submission-port abuse.
- Prefer OAuth or app passwords with providers that support them, so a leaked device password does not expose the main account.
- Watch for password-guessing against 587; it attracts the same credential attacks as webmail logins.
How to check port 587
Is something listening locally? On Windows, open Command Prompt and run:
netstat -ano | findstr :587A line in the LISTENING state means a local program has bound port 587; the last column is its process ID (PID). Match the PID in Task Manager (Details tab) or with tasklist /fi "PID eq <pid>". On Linux or macOS the equivalent is ss -tulnp | grep :587 or lsof -i :587.
Can you reach it on a remote host? PowerShell's built-in connection test attempts a TCP handshake:
Test-NetConnection smtp.example.com -Port 587TcpTestSucceeded : True means the remote system accepted a TCP connection on port 587. False means the port is closed, filtered by a firewall, or the host is unreachable; the output's ping result helps tell those apart.
See the netstat and Test-NetConnection records for the full option sets.
See the server's capabilities, including whether it advertises STARTTLS:
curl -v smtp://smtp.example.com:587 --mail-from [email protected] --mail-rcpt [email protected] --upload-file NULThe verbose output shows the EHLO response with 250-STARTTLS when the upgrade is offered.
Firewall considerations
Mail servers that accept submission need inbound 587 from wherever users connect, often the whole internet. Workstations need nothing inbound. Outbound 587 should remain open on client networks so mail apps work; it is not subject to the ISP blocks that affect port 25.
On Windows, inbound rules live in Windows Defender Firewall with Advanced Security (wf.msc). A rule allowing port 587 only takes effect on the profile (Domain, Private, Public) it is assigned to. The command-line equivalent is netsh advfirewall firewall add rule; see the netsh record.
Frequently asked questions
587 or 465: which should I use?
Either, if the provider offers both; both are secure when configured correctly. 587 negotiates TLS with STARTTLS after connecting; 465 uses TLS from the start. RFC 8314 now recommends 465 as slightly simpler, but 587 remains the most widely supported.
What does "SMTP server requires authentication" mean?
Submission on 587 requires a username and password (SMTP AUTH). Enable authentication for the outgoing server in your mail client, normally with the same credentials as incoming mail.
Can I use port 587 without TLS?
Technically the port starts in plain text. Almost every provider refuses authentication until STARTTLS succeeds, and there is no reason to disable it.