In the world of server administration and VPS management, understanding email ports is crucial to maintaining secure and functional communication systems. While Port 25 has traditionally been used for sending emails, it is no longer recommended due to increasing spam restrictions. Today, Port 587 is the industry standard for secure email transmission using SMTP with TLS encryption. This article will explain what is port 587, why it matters, and how to open port 587 properly on your VPS to ensure safe and reliable email delivery.

What is an SMTP port?

Ports are endpoints that individual servers use to connect to a network and retrieve data. Think of it like an old school switchboard with a technician plugging the incoming call into a jack to connect it to a specific phone. An SMTP port is a port designed to direct email through a network to its recipient.

The most important SMTP ports are:

  • Port 25: Standard SMTP port for server-to-server email relay (often blocked for high spam use)
  • Port 587: Default secure port for email submission (recommended)
  • Port 465: Legacy SMTPS port (use only if required)

The thing is, not all SMTP ports are equal. Choosing the wrong one could have negative consequences and reflect poorly on you as a sender.

SMTP-Email-Sending

What is Port 587?

Port 587 is the designated port for email clients to submit outgoing emails to a mail server using the SMTP (Simple Mail Transfer Protocol) protocol with STARTTLS encryption. It ensures that the data sent between the client and server is encrypted, which protects login credentials and message content from interception.

Key details:

  1. Port: 587
  2. Protocol: SMTP (with STARTTLS)
  3. Use Case: Submitting outgoing mail from email clients
  4. Security: Encrypted via TLS

What_is_port_587

Using port 587 is essential for modern email configurations. Most email providers—including Gmail, Microsoft Outlook, and Zoho—require its use for sending email securely. Unlike port 25, which is often blocked by ISPs due to its association with spam, port 587 supports authentication and encryption, making it a trusted channel.

Why Use Port 587 Instead of Port 25?

As discussed in our previous article about Port 25, that port is widely blocked by hosting providers to prevent spam abuse. Port 587, on the other hand:

  1. Requires authentication
  2. Uses TLS to secure communications
  3. Is accepted by modern SMTP servers
  4. Helps meet compliance standards for secure messaging

If you’re setting up a VPS to send transactional emails, newsletters, or user registration confirmations, using port 587 is the most reliable and secure option.

Use-Port-587-Instead-of-Port-25

How to Open Port 587 on Your VPS

Depending on your VPS setup (Windows or Linux), the steps to open port 587 will vary slightly. Here’s a general guide:

On Linux (Using UFW or iptables)

Using UFW (Ubuntu Firewall):

sudo ufw allow 587/tcp
sudo ufw reload

Using iptables:

sudo iptables -A INPUT -p tcp --dport 587 -j ACCEPT
sudo service iptables save

Confirm the port is open:

sudo netstat -tuln | grep 587

On Windows Server

Open Windows Defender Firewall with Advanced Security

  1. Click on Inbound Rules > New Rule
  2. Choose Port, select TCP, and enter 587
  3. Allow the connection > Name the rule “SMTP Port 587”
  4. Save and apply

Optional: Verify Port Accessibility

Use online tools like Telnet or PortChecker to ensure that port 587 is open and reachable from outside the VPS.

Common Errors When Using Port 587

While port 587 is the recommended standard, misconfigurations can lead to issues. Some common problems include:

  • Firewall blocking port 587
  • Missing TLS configuration in your email server
  • Incorrect SMTP authentication
  • Hosting provider limitations (e.g., outbound SMTP restrictions)

To resolve these issues, ensure your email server (Postfix, Exim, or SMTP service) is correctly configured to use TLS and that port 587 is allowed in your firewall and VPS provider settings.

Best Practices for Using Port 587

  • Always use STARTTLS when configuring your mail client or server.
  • Implement SPF, DKIM, and DMARC records to protect your domain’s reputation.
  • Use strong SMTP authentication credentials.
  • Monitor email logs to detect unauthorized sending attempts.

SMTP ports and email security

Using the right port helps ensure delivery and supports your sender reputation. But watch out, some ports have evolved to have a bad reputation of their own – and using these ports could keep you out of the inbox.

Different ports are associated with different security measures, so choosing the right one is key to ensure you’re protecting your email communications.

Some ports transmit encrypted messages, while other ports remain open for all types of traffic. The port you use may be determined by the security standards of your organization or by the sensitive contents of the messages you send.

Conclusion

Port 587 is the modern solution for secure email sending and is essential for any VPS-based email setup. By understanding port 587 là gì and following the steps to cách mở port 587, you ensure that your emails are transmitted securely, reliably, and in compliance with today’s best practices.

If you’re using a VPS from VPSwindows.com, our global, high-performance infrastructure supports full SMTP functionality, including port 587 access. Whether you’re sending transactional emails or running mail services for your domain, our VPS plans are fully compatible with secure email standards.

Want to learn more about email ports? Don’t forget to check out our article on Port 25 and why it’s blocked.