# SMTP: telnet smtp.example.com 25 — Connection timed out (cloud provider blocks port 25)

**Code:** `Outbound port 25 blocked` · **Category:** Email / SMTP · **Seen on:** SMTP, Linux, AWS

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.

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/email/smtp-port-25-blocked-timeout)
