SMTP: telnet smtp.example.com 25 — Connection timed out (cloud provider blocks port 25)
Connections from your server to other mail servers on port 25 time out because your cloud host or ISP blocks outbound SMTP to fight spam.
telnet port 25 Connection timed outoutbound port 25 blockedcannot send email port 25 blocked cloudSMTP port 25 timeout AWS EC2connect to smtp port 25 timed out Meaning
AWS, Azure, Google Cloud, DigitalOcean (new accounts), residential ISPs and many VPS providers block or restrict port 25. Request an unblock where available (AWS form), or send via port 587/2525 with an authenticated relay or via an HTTP email API.
Common causes
- Cloud provider default policy on port 25
- ISP blocking residential connections
- Local firewall egress rules
- Corporate network policy
- New account restrictions
⚡ Quick fix
- Test:
nc -vz smtp.gmail.com 25vsnc -vz smtp.gmail.com 587 - Use a relay on 587/2525/465
- Ask the provider to lift the restriction (AWS: request removal of email sending limitations)
Detailed fix by platform
Linux
nc -vz -w 5 gmail-smtp-in.l.google.com 25(times out) andnc -vz -w 5 smtp.gmail.com 587(works)
How to diagnose
- Ports — 25 vs 587 behaviour?
- Provider — Documented block?
- Alternative — ESP/relay available?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 421 4.7.0 Try again later (rate limited) SMTP: 421 4.7.0 Our system has detected an unusual rate of unsolicited mail originating from your IP address. Mail sent from your IP address has been temporarily rate limited
- 450 4.7.1 Greylisted, please try again later SMTP: 450 4.7.1 <user@example.com>: Recipient address rejected: Greylisted, see http://postgrey.schweikert.ch/help/example.com.html
- 451 4.3.0 Local error in processing SMTP: 451 4.3.0 Error: queue file write error / 451 Requested action aborted: local error in processing
Most viewed in Email / SMTP
Other ways to find it
Where this error sits
Origin: Network. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 4 Nov 2026