SMTP • Ports • Verification
SMTP Port: Complete Guide (25, 465, 587, 2525)
Choose the right SMTP Port for secure delivery, compliance, and inbox placement. This guide explains submission vs relay, STARTTLS vs implicit TLS, and practical verification.
1. What is an SMTP Port and why does it matter?
1.1 SMTP as the engine of email delivery
SMTP is a text-based protocol that transfers mail between hosts. Core commands: EHLO/HELO, MAIL FROM, RCPT TO, DATA. Common codes: 220 ready, 250 OK, 354 start input, 221 closing.
1.2 SMTP Port as a communication endpoint
An SMTP Port identifies the exact service on a host. Historically port 25 handled everything; modern deployments separate submission (clients to MSA) and relay (MTA to MTA).
1.3 SMTP Port for submission vs relay
Submission: Use SMTP Port 587 with TLS + AUTH to upload messages to the MSA.
Relay: MTAs exchange mail on SMTP Port 25. Many networks block clients from port 25 due to abuse.
2. SMTP Port Handshake: connection → transfer → termination
- Connection: Client opens TCP to the chosen SMTP Port. Server returns 220. Client sends EHLO and receives multi-line 250 with extensions ( STARTTLS, AUTH).
- Transfer: MAIL FROM, one or more RCPT TO, then DATA → 354 → final 250.
- Termination: QUIT → 221.
Security commands: STARTTLS (TLS), AUTH (SMTP-AUTH), VRFY/ EXPN (often disabled).
3. SMTP Port Options (what each one is for)
3.1 SMTP Port 25 — relay
Role: Server-to-server (MTA→MTA) relay. Notes: Clear by default; can upgrade with STARTTLS. Frequently blocked for client use.
3.2 SMTP Port 587 — modern submission
Role: Default client submission (MUA→MSA). Security: STARTTLS + SMTP-AUTH. Recommended first choice for apps.
3.3 SMTP Port 465 — implicit TLS submission
Role: Submission with TLS from the first byte. Security: Equivalent to 587+STARTTLS when configured correctly.
3.4 SMTP Port 2525 — pragmatic fallback
Role: Unofficial alternative when 587 is blocked. Security: Typically supports STARTTLS. Availability varies by provider.
3.5 Other occasional SMTP Ports
Port | Typical use | Notes |
---|---|---|
80 | Special-case submission | Rare; not recommended; mixes protocols |
443 | Special-case submission | Occasional TLS tunnels; non-standard |
588 | Alternate submission | Provider-specific; check documentation |
4. SMTP Port & Verification (practical checks)
4.1 VRFY/EXPN
VRFY asks a server to verify a mailbox; EXPN asks for a list’s members. Often disabled to prevent harvesting.
4.2 RCPT-TO method
Run a partial session against the recipient domain’s MX host:
# Resolve MX externally, then connect telnet mx.example.tld 25 # Greet and inspect extensions EHLO verifier.example MAIL FROM:<[email protected]> RCPT TO:<[email protected]> # Interpret # 250 Accepted → likely valid # 550 No such user → invalid QUIT
Caveats: Catch-all domains accept all recipients; some servers return ambiguous codes. Treat results as signals, not proof.
On submission ports (587/465), require SMTP-AUTH, enforce TLS, and apply IP/rate controls to prevent unauthorized relay.
5. Email flow across each SMTP Port
- Client submission: App connects on 587 (STARTTLS) or 465 (implicit TLS), authenticates, sends message.
- Relay: MSA hands to MTA, which looks up MX and relays on 25; intermediate hops may occur.
- Delivery: Destination MTA hands to a delivery agent; user later retrieves via IMAP/POP (not SMTP).
6. Choosing the right SMTP Port
6.1 Apps & websites
- Default to SMTP Port 587 with STARTTLS + AUTH.
- Fallback to SMTP Port 2525 if 587 is blocked.
- Use SMTP Port 465 only if explicitly required.
6.2 Operating your own mail server
- Listen on SMTP Port 25 for inbound relay.
- Require AUTH on submission ports; block public submission on 25.
- For outbound, relay on 25 or via a smart host on 587/465.
6.3 Testing & troubleshooting
# Test 25 or 587 (plain connect) telnet smtp.example.com 25 # STARTTLS on 587 openssl s_client -starttls smtp -connect smtp.example.com:587 # Implicit TLS on 465 openssl s_client -connect smtp.example.com:465
6.4 Avoid common pitfalls
- Do not use 25 for client submissions.
- Enforce TLS (no cleartext).
- Always require SMTP-AUTH on submissions.
- Do not assume VRFY/EXPN are available.
7. SMTP Port Summary (quick table)
SMTP Port | Registration | Primary role | Security & notes |
---|---|---|---|
25 | Well-known | MTA↔MTA relay | Clear by default; STARTTLS optional; blocked for clients |
587 | Submission | MUA→MSA | STARTTLS + AUTH; first choice for apps |
465 | Submissions | MUA→MSA | Implicit TLS; use when offered |
2525 | Unofficial | Alternate submission | STARTTLS; provider-dependent |
80/443/588 | Unofficial | Special cases | Non-standard; controlled environments |
Use 587 for submissions, reserve 25 for relay, apply 465 when required, and keep 2525 as a practical fallback. Pair correct port selection with TLS, SMTP-AUTH, and domain authentication (SPF, DKIM, DMARC) for best deliverability and security.
Verify Emails with Real SMTP Checks
Reduce bounces and protect your sender reputation. ListClean runs safe, protocol-level checks and validation logic—built for scale.
No emails sent during verification • Privacy-safe • Built by deliverability engineers
FAQ (SMTP Port)
Is SMTP Port 587 better than 465?
They’re both secure. 587 uses STARTTLS (upgrade), 465 uses implicit TLS (encrypted immediately). Choose the one your provider recommends; default to 587.
Why is SMTP Port 25 blocked for many users?
To limit spam from infected hosts. Client submissions should use 587 (or 2525 fallback).
What SMTP Port should my app default to?
SMTP Port 587 with STARTTLS and SMTP-AUTH.
Sources
- IANA Service Name and Transport Protocol Port Number Registry
- “Revoking the smtps TCP port” – Email from Internet Mail Consortium director Paul Hoffman, 12 Nov 1998 (context via Internet-Draft)
- RFC 6409 – Message Submission for Mail
- RFC 5321 – Simple Mail Transfer Protocol
- RFC 3207 – SMTP Service Extension for Secure SMTP over Transport Layer Security
- RFC 4607 – Source-Specific Multicast for IP