When a message cannot be delivered, the system that gives up sends a short report back to the sender. Administrators call it an NDR, a non-delivery report. The formal name for the family of such reports is the delivery status notification, or DSN. Learning to read them turns a puzzling "Undelivered Mail Returned to Sender" into a precise diagnosis: which recipient failed, at which stage, with which code and why.
This guide explains the types of notification, the layout of a standard report, the fields that matter, how to parse them and what senders should do for each outcome.
Types of notification
| Action field | Meaning | Typical sender response |
|---|---|---|
| failed | Delivery has failed permanently or the system has given up | Treat the address as undeliverable; suppress if the code is permanent. See bounce classification |
| delayed | The system is still trying and warns the sender | No action needed unless it persists. See retry schedules |
| delivered | The message reached the recipient system (when a success notice was requested) | Informational only |
| relayed | Handed to a system that will not send further reports | Do not assume the final mailbox received it |
| expanded | Delivered to a list or group that expanded to more recipients | Informational |
Anatomy of a standard bounce
A DSN is a multipart message. The first part is a human-readable explanation. The second is the machine-readable part with the status fields. The third is an optional copy of the original message or its headers. The Content-Type of the whole message is multipart/report with report-type=delivery-status.
From: [email protected]
To: [email protected]
Subject: Undelivered Mail Returned to Sender
Auto-Submitted: auto-replied
Content-Type: multipart/report; report-type=delivery-status
--part1
(Plain language explanation)
--part2
Content-Type: message/delivery-status
Reporting-MTA: dns; mx.example.org
Arrival-Date: Mon, 21 Oct 2024 09:12:44 +0000
Final-Recipient: rfc822; [email protected]
Action: failed
Status: 5.1.1
Remote-MTA: dns; mx.example.org
Diagnostic-Code: smtp; 550 5.1.1 User unknown
--part3
(Original headers)The example is illustrative. Real reports vary in wording, and some servers produce non-standard text that cannot be parsed reliably.
The fields that matter
| Field | What it tells you |
|---|---|
| Reporting-MTA | The server that generated the report |
| Arrival-Date | When that server first received the message |
| Final-Recipient | The address that failed. May differ from what you typed if aliases or forwarding are involved |
| Original-Recipient | The address as originally given, if present |
| Action | failed, delayed, delivered, relayed or expanded |
| Status | Enhanced status code in the form class.subject.detail, such as 5.1.1. See SMTP bounce codes |
| Remote-MTA | The next server that refused or returned the message |
| Diagnostic-Code | The original SMTP reply text from the remote server |
| Last-Attempt-Date | Time of the final delivery attempt |
| Will-Retry-Until | Deadline for further attempts on delay reports |
Reading the status code
The enhanced status code has three numbers. The first is the class: 2 for success, 4 for a temporary failure and 5 for a permanent failure. The second is the subject, such as 1 for addressing problems, 2 for mailbox status or 7 for security and policy. The third gives the detail. For example, 5.1.1 means a permanent addressing failure where the mailbox does not exist, 5.2.2 means the mailbox is full and 5.7.1 means a policy or authentication rejection. Always read the diagnostic text as well, because it can name the actual cause. See reading a bounce code.
| Status | Common cause | Suggested action |
|---|---|---|
| 5.1.1 | Mailbox does not exist | Suppress the address. See user unknown fix |
| 5.1.2 | Bad domain or no mail host | Check the domain; suppress if invalid |
| 5.2.2 / 4.2.2 | Mailbox full | Retry later; suppress after repeated failures. See mailbox full |
| 5.4.x | Routing or network problem | Check DNS and the destination |
| 5.7.x | Policy, authentication or reputation | Inspect authentication and content. See DMARC rejection |
| 4.x.x | Temporary problem | Allow retries; investigate if it persists |
Differences between DSN, NDR and the bounce
- Synchronous rejection. If the receiving server refuses the message during the SMTP conversation, your own server learns instantly and generates the failure. See reading an SMTP transcript.
- Asynchronous bounce. If the receiver accepted the message and later could not deliver it, it sends a separate report to the envelope sender. This is where backscatter problems arise. See null sender and the envelope sender.
- Non-standard bounces. Some systems send free-text messages instead of a structured DSN.
Where the report goes
The report is sent to the envelope sender, also called the return path, not to the visible From header. This is why bulk senders set a dedicated return-path address or use VERP-style addresses so each failure can be matched to a recipient automatically. See custom return path and VERP bounces.
Parsing DSNs automatically
- Receive reports on a dedicated mailbox or webhook for the return-path domain.
- Check that the message is
multipart/reportand that the report type isdelivery-status. - Extract each per-recipient block with Final-Recipient, Action, Status and Diagnostic-Code.
- Map the result to your categories: hard, soft, block, delay. See bounce classification.
- Match the report to the original message with the Message-ID or the VERP token in the original headers.
- Update the contact record and the suppression list.
- Keep unparsed reports for manual review and improve your rules over time.
// Pseudocode
if (msg.contentType == 'multipart/report' && msg.reportType == 'delivery-status') {
for (block of parseRecipientBlocks(msg.deliveryStatusPart)) {
action = block.get('Action'); // failed | delayed | delivered ...
status = block.get('Status'); // 5.1.1
rcpt = block.get('Final-Recipient').split(';')[1].trim();
if (action == 'failed' && status.startsWith('5.')) suppress(rcpt, status, block.get('Diagnostic-Code'));
}
}Requesting DSNs when you send
The SMTP DSN extension lets a sender ask for success, failure or delay notifications and decide how much of the original message is returned. Most API-based sending platforms do not rely on it; they supply event feeds or webhooks instead, which are easier to use. See delivery webhooks. A success DSN confirms only that the message reached a server, not that it was read. See read receipts.
What to tell end users
A raw NDR is cryptic for non-technical recipients. If your application sends bounces to a person, translate them: say that the message to this address could not be delivered, show the reason in plain language and suggest a next step such as checking the spelling or trying another address. Do not expose internal server names to end users.
Reading reports from different systems
Different mail systems phrase the human-readable part differently. Microsoft environments call the message a non-delivery report and often include a friendly explanation and a code in the form of a number followed by a short description, while open-source servers typically include the original SMTP reply text. Treat the structured part of the report as the source of truth and the explanatory text as a hint. If a report has no structured part, fall back to pattern matching on the text, but keep a conservative rule: suppress only when the evidence of a permanent failure is clear.
Troubleshooting common reports
| What you see | Meaning | Next step |
|---|---|---|
| "Address not found" or "User unknown" | Mailbox does not exist | Check spelling and domain; remove if invalid. See typo checks |
| "Domain not found" | The domain does not exist or has no mail setup | Verify the domain and MX records |
| "Message too large" | Over the size limit | Reduce size. See size limits |
| "Blocked using list" | Sending IP or domain on a blocklist | Check and request removal. See blocklist removal |
| "Authentication required" or policy rejection | SPF, DKIM or DMARC failure | Fix authentication. See authentication results |
| "Delayed" notice | Receiver is busy or greylisting | Wait. See greylisting and deferrals |
| A report for a message you never sent | Backscatter after spoofing | Check authentication and use a DMARC policy. See email spoofing |
Bounce reports are the most reliable evidence of what happened to a message after it left your system. Parse the structured fields, trust the status code and diagnostic text together, suppress permanent failures at once and keep the unusual ones for review.
Get bounce data without parsing mailboxes Receive structured delivery and bounce events through webhooks.
References and further reading
Frequently asked questions
What is a DSN in email?
A delivery status notification, a standard report that tells the sender whether a message was delivered, delayed or failed.
What is the difference between DSN and NDR?
NDR is the common name for a failure DSN, especially in Microsoft environments. DSN is the formal standard name.
Where is the bounce sent?
To the envelope sender (return path), not necessarily the visible From address.
What does status 5.1.1 mean?
A permanent failure: the recipient mailbox does not exist.
Do I have to parse bounce emails myself?
Not if your sending platform provides bounce events or webhooks, which are easier to process.