Running on Mailgun?

Mailgun deliveries bouncing or routed to spam? We fix it.

Mailgun is the transactional email service teams reach for when SendGrid got expensive or when they need the EU region. Most of the tickets we open involve a sending domain whose DKIM key was rotated and never re-verified, a webhook endpoint that silently started 500ing six weeks ago, or a shared IP whose neighbour sent one bad campaign and poisoned the pool. We get mail moving and leave you with deliverability you can actually measure.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

mailgun-events.log

still broken

What it is

Mailgun at a glance

Mailgun is an email delivery service launched in 2010 and acquired by Rackspace in 2012, spun out as Sinch Email (and often still called Mailgun) in recent years. It handles transactional and marketing mail through an HTTP API and SMTP, with event webhooks for opens, clicks, bounces, complaints and unsubscribes.

The platform's strengths are deliverability tooling (reputation monitoring, inbox placement tests, a dedicated IP option) and an EU sending region for customers with data residency needs. It competes directly with SendGrid, Postmark, Amazon SES and the newer Resend. Mailgun's documentation and API have a developer-first feel, and it is often chosen for backend-heavy sending where marketing features matter less.

Type
Transactional and marketing email delivery
First released
2010
License
Proprietary SaaS
Maintained by
Sinch (previously Rackspace, Mailgun Technologies)
Typically used for
Receipts, notifications, password resets, bulk sends, inbound email routing

The honest version

Mailgun pros and cons

No technology is all upside. This is where Mailgun earns its place and where it tends to cause trouble.

Where Mailgun is strong

  • Deliverability tooling is a core featureMailgun Optimize surfaces inbox placement, reputation scores and seed list results, which is not window dressing: deliverability problems are where most email tickets actually live.
  • EU region with real data residencyMailgun offers EU-only infrastructure that keeps content out of US servers, which matters for customers on the Schrems-adjacent side of GDPR conversations.
  • Inbound routing is well thought outRoutes match on patterns and dispatch to forward addresses, webhook URLs or stores, which makes inbound parsing for applications a few lines of configuration rather than a project.
  • API and SMTP are both matureThe HTTP API has versioned endpoints, the SMTP interface accepts the usual headers for tagging and tracking, and the client libraries cover most mainstream languages.
  • Dedicated IPs with proper warm-up guidanceA dedicated IP comes with a warm-up schedule built into the product and monitoring of the reputation as volume climbs, which reduces the chance of a fresh IP being mistreated by inbox providers.

Where Mailgun bites

  • Sandbox domains confuse new teamsA free account's sandbox domain restricts sending to authorized recipients, and teams forget to switch to a verified domain before pointing production at the API. Mail silently fails for every real user.
  • Pricing model has moved more than oncePlans have changed structure under Rackspace and again under Sinch, and features such as log retention and seat counts have moved between tiers. An old account is often not on the plan that matches current usage.
  • Shared IP reputation is somebody else's problem until it is yoursOn the lower plans, mail leaves from a pool shared with other customers, and a bad campaign from a neighbour shows up in your inbox placement before anyone notices.
  • Suppression list behavior surprises sendersA hard bounce three months ago blocks the recipient permanently until the suppression is cleared, and teams send to the address again without realizing Mailgun will not even try.
  • Webhook retries only go so farMailgun retries failing webhooks for a while and then gives up. A receiver that was broken for a day quietly misses events that no later request will replay.
  • Microsoft and tracking pixels fight each otherSafe Links rewrites every link in mail going into Microsoft 365 inboxes, which breaks click tracking and inflates open rates to misleading levels. The fix is organizational, not technical.

Sound familiar?

Common Mailgun problems we fix

The Mailgun problems that bring people to us, and what you have once each one is fixed.

DMARC policy rejection

Mail is rejected for DMARC alignment failure

DKIM is signing with a selector that does not align with the From domain, or SPF is passing on the envelope but not the visible From. DMARC strict alignment rejects the message before the recipient sees it.

Alignment verified end to end

DKIM signature: body hash did not verify

DKIM is failing on some recipients

A gateway between Mailgun and the recipient is rewriting the body (adding a footer, sanitizing links) and invalidating the DKIM signature. Mail still arrives at some receivers and bounces at the stricter ones.

Signing path intact to the recipient

sandbox domain, only authorized recipients

Production is still on the sandbox domain

An integration that was tested with the free sandbox domain was deployed as-is, and every user outside the authorized list gets no mail. Receipts for real customers never arrive.

Verified sending domain live

Spamhaus SBL listing

The sending IP got on a block list

A shared IP neighbour sent a bad campaign and the pool got listed, or a dedicated IP sent out of warm-up ratio and tripped Spamhaus. Delivery to major receivers tanks within hours.

Delisted and sending restructured

suppression: hard bounced 3 months ago

Legitimate recipients are in suppression

A past delivery failure put a recipient on the permanent suppression list, and Mailgun will not retry even after the address is fixed. Users complain that specific accounts never get mail.

Suppressions reviewed and managed

webhook signature verification failed

Event webhooks are not getting through

A receiver whose signature verification rejects on timestamp skew or on a stale secret, or an endpoint returning 500s because of an application bug. Bounce and complaint events never make it into your database.

Webhooks signed and received

complaint rate: 0.14%

Gmail complaint threshold has been crossed

Users marking mail as spam at a higher rate than Gmail accepts, usually because of a list that was not opt-in, or content that reads as marketing from an address that claims to be transactional.

Content and list scrutinized

401 Unauthorized: Incorrect api key

The API key stopped working

A key rotated after a security review, a former employee's token that was finally revoked, or a sending key copied across environments and disabled when a leak was detected.

Keys rotated and scoped properly

What we do

Mailgun help, from rescue to upkeep

Call us for one failing send, or hand us the whole mailing setup.

Rescue
Mail that stopped arriving, a block list entry, or a webhook that has been silent for weeks. We get sending healthy and then explain what caused the failure.
Deliverability
SPF, DKIM and DMARC alignment verified against the real receiving inboxes, list hygiene applied, and sending patterns tuned so complaint rates come down.
Integration
API or SMTP wiring with retries, event webhook consumption that is signed and idempotent, and failure handling that stops mail disappearing silently.
Migration
Moving on or off Mailgun without dropping mail in flight, keeping reputation during the move by warming new infrastructure in parallel, and swapping DNS only when the new side is proven.
Compliance and EU residency
Setting up the EU region, residency-aware routing, and audit trails that satisfy customers with specific data handling requirements.
Managed Tech
Reputation watch, key rotation, suppression list reviews, webhook monitoring and a team to call when a bounce rate crosses a threshold.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running Mailgun alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

Mailgun questions

Something else? Call+1 737 727 7327

Why is our Mailgun mail bouncing with a DMARC rejection?

DMARC rejects when neither SPF nor DKIM aligns with the visible From domain. The common cause is a DKIM selector signing with mg.example.com while the From header is just example.com, with relaxed alignment misconfigured or strict alignment enforced. We verify that both SPF and DKIM pass on the inbound side at Gmail and Microsoft, align the signing selector with the From domain, and only then publish a stricter DMARC policy.

Mailgun or SendGrid, which should we choose?

They are closer than either marketing team would admit. SendGrid has the stronger marketing surface and dynamic templates; Mailgun has slightly better deliverability tooling and a real EU region. For transactional-heavy, developer-driven sending, Mailgun is often the simpler answer. For teams who need marketing editors to design templates in a UI, SendGrid still wins. We will tell you honestly which fits the specific mail you send.

Why are our Mailgun event webhooks silent?

The three common causes are a signing secret that rotated without updating the receiver, a receiver that returns 500 on edge cases and uses up Mailgun's retry budget, and a timestamp verification window that is too tight on hosts with clock skew. We log every incoming webhook, verify signatures correctly, make the receiver idempotent, and widen the timestamp window where it needs to be.

How do we recover from a Spamhaus listing on our Mailgun IP?

If it is a shared IP, the fix is usually a plan change onto a dedicated IP or a different pool, because you cannot delist an address you do not fully control. If it is a dedicated IP, you file a delisting request with Spamhaus, pause sending of anything that looks like the triggering content, and resume with a careful warm-up schedule. Reputation takes weeks to recover; do not send a campaign the moment the delisting lands.

Can you take over a Mailgun account from a previous developer?

Yes. We work with you and Mailgun support to transfer ownership, rotate every API key and SMTP credential, move billing to your card, and audit which domains, templates and routes are in use so none of them go dark during the handover.

How much does Mailgun help cost?

The estimate is at no charge. Tell us the sending domains, the problem you are seeing and the kind of mail you send, and we return a quote before any work begins.

Free estimate

Mailgun giving you trouble?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.