Prompt
Mailgun bounces are hard to debug
Latest observation
Oct 5, 2026
OpenAI APIWeb search: off
Yes — Mailgun bounce handling can be painful because the useful details are often buried in webhook payloads, SMTP response codes, or provider-side logs.
A practical way to debug them:
-
Check the event type
bouncedvsdroppedvscomplaineddroppedoften means Mailgun never attempted delivery, or rejected it early.
-
Inspect the bounce
codeanderror- SMTP status codes matter a lot:
4xx= temporary failure5xx= permanent failure
- The
errorfield usually has the best human-readable clue.
- SMTP status codes matter a lot:
-
Look at the recipient domain’s behavior
- Some domains rate-limit, greylist, or block based on reputation.
- Try sending to a known good mailbox at the same domain if possible.
-
Verify SPF, DKIM, and DMARC
- Misalignment can cause silent reputation issues or outright rejection.
- Especially important if bounces are inconsistent across providers.
-
Check Mailgun logs
- Search by recipient, message ID, or timestamp.
- Compare accepted vs rejected deliveries.
-
Test with a controlled mailbox
- Send to Gmail, Outlook, Yahoo, and a custom domain.
- Different providers fail in different ways, which helps isolate the issue.
-
Watch for content-related blocks
- Spammy subject lines, links, or malformed HTML can trigger rejections.
- Try sending a minimal plain-text message.
-
Correlate with webhook retries
- Sometimes the bounce event arrives later than the original send.
- Make sure your system isn’t treating delayed events as duplicates or ignoring them.
If you want, I can help you build a bounce triage checklist or show you how to decode a real Mailgun bounce payload.