TCPWell-Known PortFirewall: Usually Closed
25

SMTP

What is Port 25?

Port 25 is the standard port for the Simple Mail Transfer Protocol (SMTP), which is the fundamental protocol for sending email across the internet. Defined in RFC 5321, SMTP has been responsible for email routing since 1982 and remains the backbone of email delivery between mail servers. When you send an email, your mail client typically submits it to a mail submission agent on port 587, which then relays it to the recipient's mail server via port 25. SMTP uses a store-and-forward model, where messages are relayed through intermediate servers until they reach the destination. The protocol supports extensions like STARTTLS for encryption, authentication mechanisms, and message size limits.

Common Uses

  • Server-to-server email delivery and relay
  • Mail server communication for routing messages
  • Outbound email from mail transfer agents
  • Legacy mail client configurations

Technical Details

Port Number25
ProtocolTCP
CategoryWell-Known
Service NameSMTP
Default FirewallUsually Closed
Port Test Commands

Copy-paste commands to check port 25 (SMTP) from your terminal

Test connectivity

Netcat (nc)Check if TCP port is reachable
nc -zv example.com 25
curl (HTTP)Test HTTP response on this port
curl -v --max-time 5 http://example.com:25/
TelnetBasic TCP port connectivity check
telnet example.com 25
nmapScan port 25 with service detection
nmap -p 25 -sV example.com
Bash /dev/tcpPure bash TCP check (no extra tools needed)
(echo > /dev/tcp/example.com/25) 2>/dev/null && echo "open" || echo "closed"

Open port in firewall

UFW (Ubuntu / Debian)
sudo ufw allow 25/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 25 -j ACCEPT
firewalld (RHEL / CentOS)
sudo firewall-cmd --permanent --add-port=25/tcp && sudo firewall-cmd --reload

Security Considerations

!

Port 25 is heavily abused for spam and phishing. Many ISPs and cloud providers block outbound port 25 by default to prevent spam. Open relays on port 25 are exploited to send bulk spam. Use port 587 (submission) with authentication for sending mail from clients. Implement SPF, DKIM, and DMARC to protect your domain from spoofing. Always enable STARTTLS for encryption in transit.

Popular Ports Reference

The most commonly used and referenced network ports

Related Ports