Port 25 is for server-to-server mail: when Gmail delivers to your provider, it connects to the provider's MX on 25. Because malware once used it to send spam directly from home computers, most consumer ISPs block outbound 25, which is why mail clients use the submission port 587 with authentication instead.
Facts
- Port
- 25
- Protocols
- TCP
- Service
- SMTP
What uses port 25
Mail servers delivering email to each other (MX servers listen on 25). It's not meant for mail apps submitting messages; that's port 587.
On a Mac
Apple Mail and other mail apps send through port 587 (or 465), not 25. A Mac rarely uses port 25 unless you run a mail server or a script that sends mail directly. Many ISPs block outbound 25 on home connections.
sudo lsof -nP -iTCP:25Security
Open relays on 25 get abused for spam immediately. If you run a mail server, require authentication for relaying and publish SPF, DKIM and DMARC.
Frequently asked questions
Why is port 25 blocked?
ISPs block outbound 25 on home connections to stop infected computers sending spam directly. Use port 587 with your mail provider instead.
What is the difference between port 25 and 587?
25 is for mail servers relaying to each other. 587 is for mail apps submitting outgoing mail, with authentication and STARTTLS.
Can I test port 25 on a Mac?
nc -vz mx.example.com 25 shows whether you can connect; if it times out, your ISP probably blocks outbound 25.