Outbound port 25 blocked Email / SMTP Origin: Network Last updated 4 Nov 2026

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.

Exact message you may see 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
Seen on: SMTP Linux AWS

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

  1. Test: nc -vz smtp.gmail.com 25 vs nc -vz smtp.gmail.com 587
  2. Use a relay on 587/2525/465
  3. Ask the provider to lift the restriction (AWS: request removal of email sending limitations)

Detailed fix by platform

Linux

  1. nc -vz -w 5 gmail-smtp-in.l.google.com 25 (times out) and nc -vz -w 5 smtp.gmail.com 587 (works)

How to diagnose

  1. Ports — 25 vs 587 behaviour?
  2. Provider — Documented block?
  3. 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:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

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 (Email / SMTP)421 4.7.0 Try again l…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 (Email / SMTP)450 4.7.1 Greylisted,…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 (Email / SMTP)451 4.3.0 Local error…ConnectionRefusedError [Errno 111] (SMTP) — Python: ConnectionRefusedError: [Errno 111] Connection refused — smtplib connect to localhost:25 (Email / SMTP)ConnectionRefusedErro…Laravel: Connection could not be established with host — Laravel: Symfony\Component\Mailer\Exception\TransportException: Connection could not be established with host "smtp.mailtrap.io:2525": stream_socket_client(): Unable to connect (Email / SMTP)Laravel: Connection c…No route to host — connect: No route to host (EHOSTUNREACH) (Linux)No route to hostNodemailer: ETIMEDOUT / ECONNECTION — Nodemailer: Error: connect ETIMEDOUT 142.250.27.108:465 (code: 'ETIMEDOUT', command: 'CONN') (Email / SMTP)Nodemailer: ETIMEDOUT…PHPMailer: SMTP connect() failed — PHPMailer: SMTP Error: Could not connect to SMTP host. Failed to connect to server (SMTP connect() failed) (Email / SMTP)PHPMailer: SMTP conne…Outbound …

Explore the map of this error Full error map →

🧠 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.