Port 25: SMTP (Simple Mail Transfer Protocol (server to server))
What port 25 (TCP) does, the security risks of leaving it open, and how to secure and test it.
| Port | 25 |
|---|---|
| Transport | TCP |
| Service | Simple Mail Transfer Protocol (server to server) (SMTP) |
| Encrypted | Optional (STARTTLS) |
What is port 25?
SMTP on port 25 is how mail servers pass email to each other across the internet.
Common uses
- Mail servers delivering email to other mail servers
- Internal devices such as printers and scanners sending alerts
Security risks
- Open relays that let spammers send mail through your server
- Malware on home and office PCs sending spam directly, which is why many ISPs block outbound 25
- Email read in transit if STARTTLS is not used
How to secure port 25
- Never run an open relay; only accept mail for your own domains
- Enable STARTTLS and publish SPF, DKIM and DMARC records
- Block outbound TCP 25 from user devices; only mail servers need it
- Clients should send mail on 587, not 25
How to check if port 25 is open
| Where | Command |
|---|---|
| Scan from another machine | nmap -p 25 <host> |
| Windows (PowerShell) | Test-NetConnection <host> -Port 25 |
| Linux (what is listening) | sudo ss -tulpn | grep :25 |
| Windows (what is listening) | netstat -ano | findstr :25 |
Only scan systems you own or have permission to test.
Related ports
Frequently asked questions
What is port 25 used for?
Port 25 (TCP) is used by Simple Mail Transfer Protocol (server to server) (SMTP). SMTP on port 25 is how mail servers pass email to each other across the internet.
Is it safe to open port 25?
Only if the service needs to be reached and is configured securely. Never run an open relay; only accept mail for your own domains.
How do I check if port 25 is open?
From another computer, run nmap -p 25 followed by the host address. On the server itself, ss -tulpn on Linux or netstat -ano on Windows shows whether anything is listening on 25.
Learn more: TCP, UDP and ports explained and firewall basics.