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
Copy-paste commands to check port 25 (SMTP) from your terminal
Test connectivity
nc -zv example.com 25
curl -v --max-time 5 http://example.com:25/
telnet example.com 25
nmap -p 25 -sV example.com
(echo > /dev/tcp/example.com/25) 2>/dev/null && echo "open" || echo "closed"
Open port in firewall
sudo ufw allow 25/tcp
sudo iptables -A INPUT -p tcp --dport 25 -j ACCEPT
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