Bouncewise

Bouncewise › Guides › Mailgun "failed" events: permanent vs temporary failures

Mailgun guide

Mailgun "failed" events: permanent vs temporary failures

Updated · 3 min read

Short answer

In Mailgun's logs a failed event carries a severity: temporary means the receiving server deferred the message and Mailgun will retry it (for up to 8 hours by default); permanent means Mailgun has dropped it and won't retry. Permanent failures come from hard bounces, suppressed addresses, retries running out ("Too old") and blocks by the receiving provider. The reason field and delivery-status (code and message) tell you which, and only hard bounces for invalid recipients add the address to the Bounces list.

Temporary vs permanent at a glance

severity: temporaryseverity: permanent
Control panel labelTemporary FailPermanent Fail
Webhooktemporary_failpermanent_fail
Mailgun retries?Yes, on a scheduleNo, the message is dropped
Added to the Bounces list?NoOnly when the recipient was invalid or doesn't exist
Typical reply421, deferrals, throttling550 mailbox unavailable, Mailgun's 605 for suppressed addresses

One message can produce several temporary failures and then a permanent one. Look at the latest event for the recipient, not the first.

Message timeline for a Mailgun email showing accepted and failed events with the receiving server's reply
The failed event with the server's reply.

Reading a failed event

This is the permanent failure from Mailgun's webhook payload examples, shortened:

{
  "event": "failed",
  "severity": "permanent",
  "reason": "bounce",
  "recipient": "[email protected]",
  "delivery-status": {
    "attempt-no": 1,
    "code": 550,
    "enhanced-code": "5.5.0",
    "message": "5.5.0 Requested action not taken: mailbox unavailable …",
    "mx-host": "802679870.pamx1.hotmail.com",
    "bounce-type": "hard"
  }
}
  • reason: Mailgun's category. Values seen in its docs include bounce, suppress-bounce and generic.
  • delivery-status.code and enhanced-code: the SMTP reply from the receiving server (or a Mailgun code such as 605 when nothing was sent).
  • delivery-status.message: the server's own words; the most useful field. description carries Mailgun's text, such as Not delivering to previously bounced address.
  • bounce-type: hard or soft. retry-seconds on a temporary failure tells you when the next attempt is due.

Common permanent failures and what to do

What you seeCauseAction
reason: bounce, 550 / 5.1.1, "mailbox unavailable" or "does not exist"Hard bounce: the address is invalidFix the address with the user. It is now on the Bounces list.
reason: suppress-bounce, code 605Address already on the Bounces list; Mailgun didn't trySee Mailgun suppressions before removing it.
Description Too oldTemporary failures until the retry window ran outRead the earlier temporary failures: they show the real cause.
Address on Complaints or UnsubscribesRecipient reported spam or unsubscribedDon't resend; remove from your list.
A 5xx rejection citing policy, reputation or authenticationThe receiving provider blocked youNot added to Bounces. Fix SPF/DKIM/DMARC and reputation, then send again.

For the SMTP codes themselves, see SMTP bounce codes.

Bounces screen for a Mailgun domain listing failed recipients with SMTP codes
Permanent failures with their codes.

Temporary failures and the retry window

After a temporary failure Mailgun retries after 10 minutes, then 15, 30 minutes, 1, 2 and 4 hours: a default window of up to 8 hours. If the message still isn't delivered, Mailgun drops it and logs a permanent failure described as Too old. For one-time codes and short-lived links, shorten the window with the API parameter o:deliver-within or the SMTP header X-Mailgun-Deliver-Within (5 minutes to 24 hours); shorter windows mean fewer attempts.

Mailgun only retries a bounce that was both immediate and soft. Bounces that arrive later as a non-delivery report reach Mailgun only if the sending domain's MX records point to Mailgun.

Find failures with the Logs API

The Events API is deprecated in favour of the Logs API. Mailgun retains event data for 30 days, though access varies by plan. Permanent failures for one domain over two days:

curl -s --user "api:$MAILGUN_API_KEY" \
  https://api.mailgun.net/v1/analytics/logs \
  -H "Content-Type: application/json" \
  -d '{"start": "Mon, 23 Nov 2026 00:00:00 +0000",
       "end": "Wed, 25 Nov 2026 00:00:00 +0000",
       "events": ["failed"],
       "filter": {"AND": [
         {"attribute": "domain", "comparator": "=",
          "values": [{"label": "mg.example.com", "value": "mg.example.com"}]},
         {"attribute": "severity", "comparator": "=",
          "values": [{"label": "permanent", "value": "permanent"}]}]},
       "pagination": {"sort": "timestamp:desc", "limit": 100}}'

Dates are RFC 2822. Use api.eu.mailgun.net for EU domains. delivery_status_bounce_type (hard or soft) and recipient are also filterable.

Questions

Does Mailgun retry a permanent failure?

No. A permanent failure means Mailgun has dropped the message; only temporary failures are retried.

Does a temporary failure count as a bounce?

It doesn't add the address to the Bounces list. If retries run out, the final permanent failure is logged as Too old.

What is Mailgun error code 605?

Mailgun's own code for a message it didn't attempt because the address is on the domain's Bounces list, described as "Not delivering to previously bounced address".

Why don't I see delayed bounces in Mailgun?

Mailgun only receives bounces sent after the SMTP session when the sending domain's MX records point to Mailgun.

Sources