SMTP reply codes
Three-digit SMTP answers saying accepted, try again later, or permanently rejected, with extra status digits explaining why.
See it
What it is
SMTP reply codes tell the sending server what happened to each command. A 2xx means that command succeeded, a 4xx means the failure is temporary and the sender should retry later, and a 5xx means the command failed permanently for that transaction. The familiar 354 is the intermediate signal to start sending the message body.
Use the code plus the enhanced status code to drive queues and alerts. '451 4.7.0' can mean slow down and try again; '550 5.1.1' usually means the recipient does not exist; '550 5.7.1' points toward policy, authentication, or reputation instead. Those second codes carry the category that the repeated 550 alone cannot.
Do not overread acceptance. A final 250 after DATA means the receiving server accepted responsibility for the message, not that it reached the inbox or was read. Responses can also differ by recipient inside one SMTP transaction. Never suppress every address that gets a 5xx: recipient failures and sender-policy failures need different remedies.
Ask AI for it
Build an SMTP outcome classifier for Postfix delivery logs using RFC 5321 reply codes and RFC 3463 enhanced status codes. Parse the reply per recipient, classify final 2xx as accepted, 4xx as retryable, and 5xx as non-retryable for that transaction, while preserving the raw text. Retry 4xx through a queue with exponential backoff plus jitter. Within 5xx, suppress only confirmed recipient failures such as 5.1.1; route 5.7.x policy or authentication failures and 5.3.4 size failures to sender remediation instead. Treat 354 as an intermediate DATA prompt, not delivery. Include table-driven tests for 250, 421, 451 4.7.0, 550 5.1.1, 550 5.7.1, and 552 5.3.4, plus a case where two recipients in one transaction receive different outcomes.