technical · sourced answer
How to Check if Port 587 is Open
You can check if port 587 is open by using a command line tool like telnet, netcat, or PowerShell to attempt a connection to your SMTP server. If the connection is successful, the server will typically respond with a 220 greeting code, indicating that the port is open and accepting connections for mail submission.
Using Telnet for Connectivity Tests
Telnet is a standard tool for testing TCP connectivity. Run the command telnet smtp.example.com 587 in your terminal. If the screen goes blank or displays a server greeting, the port is open. If you receive a connection refused or timeout error, the port is closed or blocked by a firewall. Note that telnet may need to be enabled in Windows Features before use.
Using Netcat (nc) on Linux and macOS
Netcat is a powerful utility for network debugging. Use the command nc -zv smtp.example.com 587. The z flag tells netcat to scan for a listening daemon without sending data, and the v flag enables verbose output. A successful output will explicitly state that the connection to the port succeeded, while a failure will indicate a connection timeout or refusal.
Using PowerShell on Windows
For Windows users without telnet, PowerShell provides the Test-NetConnection cmdlet. Execute Test-NetConnection -ComputerName smtp.example.com -Port 587. The output will include a boolean value for TcpTestSucceeded. If this is True, port 587 is open. This method is preferred for modern Windows environments as it provides detailed diagnostic information about the network path.
Troubleshooting Blocked Ports
If port 587 is closed, check your local firewall settings and your ISP restrictions. Many residential ISPs block outbound mail ports to prevent spam. You can verify your external configuration using SendHQ or its free tools (https://sendhq.cc/tools) to ensure your mail server is reachable from the public internet. Ensure that your cloud provider security groups allow outbound traffic on TCP 587.
Understanding Port 587 and STARTTLS
Port 587 is the standard port for mail submission. Unlike port 465, which uses implicit TLS, port 587 starts as a cleartext connection and upgrades to a secure connection using the STARTTLS command. This is why a simple TCP check confirms the port is open, but a full SMTP handshake is required to verify that encryption is functioning correctly.
Questions teams ask
What is the difference between port 25 and 587?
Port 25 is primarily used for server to server relay, while port 587 is the designated port for client to server mail submission.
Why is my connection timing out on port 587?
Timeouts usually indicate a firewall is dropping the packets. Check your local OS firewall, network router, or cloud security group rules.
Does a successful telnet connection mean email will send?
No, it only confirms the TCP port is open. You still need valid authentication and correct SMTP commands to successfully send an email.
Is port 587 secure?
Port 587 is secure when used with STARTTLS, which encrypts the communication after the initial connection is established.