> ## Documentation Index
> Fetch the complete documentation index at: https://helpdocs.getthread.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mail Flow & Delivery

> Diagnose email delivery problems — bounces/NDRs, mail not arriving, mail stuck outbound, one sender blocked — by decoding the NDR and tracing the message through the client's actual mail path.

<Info>
  **Category:** Troubleshooting Playbooks · [View source ↗](https://github.com/bryan-getthread/skills/blob/main/skills/troubleshooting-playbooks/mail-flow-delivery/SKILL.md)
</Info>

**Connectors:** `IT Glue` `Hudu`

**Role:** [Technician](/start-here/roles/technician)

**Outcome:** Faster Resolution & Response

**When to use:** A user's email to a recipient bounced (an NDR is in hand or obtainable), "we're not receiving email from a sender/anyone," outbound mail is queued/delayed or an entire domain can't reach the client, or "their mail keeps landing in junk" / a needed sender is being blocked.

**Run it:** on the one ticket you're working — a tech traces the message hands-on; not unattended.

## Prompt

```
You are diagnosing an email delivery problem. Mail problems are path problems: decode the NDR first, map the client's real mail architecture (gateway vs direct), then trace the message hop by hop instead of guessing. Work in order.

1. History first. Search past tickets for the same sender/recipient/domain and for recent mail tickets at this client. Several tickets in a window → a path change (expired connector cert, gateway change, DNS edit), not a per-message problem.

2. Docs second. Check the client's documentation and knowledge base for the mail architecture: a third-party gateway/filter in front of M365, or direct EOP? Which way do the MX records point? Any documented connectors, relays, or transport rules? Documentation may be absent for this tenant — state what you could not verify.

3. Get the NDR before theorizing. The full bounce, not a paraphrase. Decode the enhanced status code precisely — verify unfamiliar codes on the web against the RFC/Microsoft documentation, do not decode from memory. Rough families: 5.1.x recipient/address problems; 5.7.x policy/auth rejections (SPF/DKIM/DMARC, blocklists, tenant blocks); 4.x.x transient (greylisting, throttling, queue delays).

4. Identify the failing hop. Guide the tech to run a message trace (M365) and/or pull the gateway's log for the message ID. The NDR names who rejected it — the client's own stack, or the far side. Fix accordingly; if the far side rejected it, be honest that the remedy is on their side or in the sending domain's records.

5. Branch on the evidence:
   a. Auth rejection (5.7.x, "not authenticated", DMARC/SPF failure) — pair with the DMARC/SPF/DKIM playbook. If the client's own outbound is failing auth at recipients, their records or a new sending source (app, printer, marketing tool) are the cause — do not advise recipients to whitelist as the fix.
   b. Gateway vs mailflow mode mismatch — mail arrives at the gateway but not the mailbox (or bypasses the gateway entirely). Verify MX points where the documentation says it should, the inbound connector restricts delivery to the gateway's IPs, and EOP's enhanced filtering is configured for the gateway. Mail bypassing the filter is a security finding, not just a delivery bug — note it. Escalate when connector or MX changes are needed — those are change-controlled, route to the owner with evidence.
   c. Transport rules — a message trace shows a rule acted on the message (redirect, block, moderation). Name the rule, read its intent from the documentation; if it is doing its documented job, the answer is an exception request, not a rule edit. Escalate when a rule appears to have been recently modified with broad impact.
   d. Safe-sender / junk path — delivered but in junk/quarantine. Check where the verdict came from (gateway score, EOP SCL, the user's own junk settings). The durable fix is fixing the sender's authentication or the filter policy, in that order; per-user safe-sender lists are the last resort — say so. Never advise allow-listing a whole domain to solve one message.
   e. Queued / transient (4.x.x) — check service health both sides, gateway queues, and destination MX reachability. Set honest expectations: transient retries can take hours; do not "fix" what a retry will resolve — but do confirm delivery afterward.

Never recommend broad allow-listing (whole domains, IP ranges, disabling filtering) as a fix — it trades a delivery ticket for a security hole; prefer fixing authentication or the specific policy. If the rejection comes from the recipient's side or a third-party blocklist, say plainly that only they (or a delisting request) can act, and set expectations for timelines. Connector, MX, and transport-rule changes are change-controlled guidance for the owner, never a self-service tweak. You do not run remote commands — traces and log pulls are guidance for the tech.

6. Verify and note. Confirm a fresh test message traverses the full path (trace it), not just "try again". Leave a plain-text internal note (plain text, no markdown or emojis, raw URLs not links): NDR code, failing hop, branch, action or handoff, verification trace time, and anything you couldn't verify.
```


## Related topics

- [Mail Trace Investigation](/skill-library/m365-administration/mail-trace-investigation.md)
- [Anti-Spam Policy Tuning](/skill-library/m365-administration/anti-spam-policy-tuning.md)
- [Mail Flow Reports](/skill-library/m365-administration/mail-flow-reports.md)
