421
SMTPWARNNotableTemporary UnavailabilityHIGH confidence

Service not available, closing transmission channel

What this means

The 421 code indicates the mail service is temporarily unavailable, and the connection will be closed. This is not a permanent error; the client should try again later.

Why it happens
  1. 1The server is undergoing a shutdown or restart.
  2. 2The server has hit a concurrent connection limit and cannot accept more.
  3. 3A firewall or network issue is preventing the service from being fully available.
How to reproduce

A mail client connects, but the server is in the process of shutting down.

trigger — this will error
trigger — this will error
[Connection established]
421 4.3.2 The server is shutting down. Please try again later.

expected output

421 Service not available

Fix

Implement a retry mechanism

WHEN When you control the sending application

Implement a retry mechanism
// Use an exponential backoff strategy for 4xx errors
if (smtpCode === 421) scheduleRetry(email, { delay: 60000 });

Why this works

Temporary failures should be retried after a reasonable delay.

What not to do

Retry immediately in a tight loop

This can overwhelm the recovering server and may be interpreted as a denial-of-service attack.

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All SMTP errors