# 421 4.7.0 Service not available, closing transmission channel

- **ID:** `communication/smtp-421-service-not-available`
- **Domain:** communication
- **Category:** network_error
- **Error Code:** `421`
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

SMTP server rejects connection due to temporary resource exhaustion (e.g., too many concurrent connections, rate limiting, or DNS lookup failures) as defined in RFC 5321 section 4.2.5.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Postfix 3.8.0 | active | — | — |
| Sendmail 8.17.1 | active | — | — |
| Exim 4.96 | active | — | — |
| Microsoft Exchange 2019 | active | — | — |
| Amazon SES SMTP endpoint | active | — | — |

## Workarounds

1. **Implement exponential backoff retry in the SMTP client: after receiving 421, wait 30 seconds, then 60, then 120, etc., up to a max of 5 retries.** (85% success)
   ```
   Implement exponential backoff retry in the SMTP client: after receiving 421, wait 30 seconds, then 60, then 120, etc., up to a max of 5 retries.
   ```
2. **Reduce the number of concurrent SMTP connections from your application by adding a connection pool with a max limit (e.g., 10 connections).** (80% success)
   ```
   Reduce the number of concurrent SMTP connections from your application by adding a connection pool with a max limit (e.g., 10 connections).
   ```
3. **Check the SMTP server logs for 'too many connections' and adjust the 'smtpd_client_connection_count_limit' in Postfix (default 50) to a higher value like 100.** (75% success)
   ```
   Check the SMTP server logs for 'too many connections' and adjust the 'smtpd_client_connection_count_limit' in Postfix (default 50) to a higher value like 100.
   ```

## Dead Ends

- **Disable rate limiting on the SMTP server entirely** — Disabling rate limiting removes protection against spam and DoS attacks; it may cause the server to crash or be blacklisted. (95% fail)
- **Increase the SMTP server's max message size** — The 421 error is not about message size but about resource availability; increasing message size can exacerbate the resource issue. (85% fail)
- **Use a different SMTP port (e.g., 587 instead of 25)** — Port 587 is for message submission and may have different rate limits, but the underlying resource exhaustion on the server remains unchanged. (70% fail)
