Blog › Why we run our own MTAs

Why we run our own MTAs

2026-05-08 Engineering · 8 min read

Most "email APIs" are a thin wrapper around someone else's deliverability problem. We made the heavier choice. This is why.

The seductive shortcut

If you set out to build an ESP today, the path of least resistance is obvious: build a control plane on top of Amazon SES, Postmark, or Resend. Your "Send" endpoint forwards the request, your customer-facing dashboard renders the events, and you charge a margin on volume. We've all seen this product. It's everywhere.

It's also fragile in ways that don't show up in the demo. The seams are invisible until they cut you.

What you actually buy when you wrap another ESP

You buy their deliverability decisions, but not their visibility into them. When Gmail starts deferring your customer's mail, you don't know which IP it came from, which (IP, domain, provider) tuple is reputation-damaged, or what the upstream's plan is. You're left tailing logs and writing apology emails.

You also buy their pricing model — which means when AWS-SES jumps the rate next year, your unit economics break. You can pass it through, or eat it. Neither is a healthy choice.

And you buy their feature roadmap. Want to ship per-recipient region pinning because your healthcare customer needs EU residency? You can't, until your upstream supports it. Want to attach a custom Return-Path domain to align DMARC? Same.

The list of things that are easier when you own the MTA

This is the list we kept while deciding. Each item is something we'd have to either work around (slowly, partially) or beg for from an upstream:

The cost — what you sign up for

Running outbound MTAs is not glamorous. Here's the rough shape of what you commit to:

Where we cut the choice short

We didn't build everything from zero. We use:

We didn't write our own SMTP parser, our own TLS stack, or our own DKIM canonicalization library. Those are full-time jobs other people do well.

What you get as a customer

Concretely: when you send an email through us, the SMTP transaction with the recipient's server is one we own. We see the response code, we record it, we route based on it, and we expose it back to you in the dashboard. When Gmail returns "421 4.7.0 IP not in whitelist", we see which IP, log why, and tighten that IP's cap for Gmail specifically while leaving the rest of your traffic unaffected.

Most ESP wrappers can't do that. Many won't tell you they can't.

The point — and the catch

Running your own MTA is the un-sexy answer to a question most companies prefer to gloss over: do you actually own the deliverability stack, or are you reselling someone else's? When the deliverability gets bumpy — and it always does — that ownership is the difference between fixing the problem and writing a status-page incident.

The catch is honesty: this approach takes longer to ship, costs more to operate, and sometimes loses to a wrapper-on-AWS-SES that took 4 weeks to build. We've had customers say "your stack is overkill for my SaaS." They're right. They use Postmark, and they're happy. But for the customers who hit deliverability walls — most B2B above ~50k sends/month — the overkill is exactly the point.

Send us hate-mail or kind words: hello@relayly.io.

Try the thing this post is about

Free tier, no credit card. 5 minutes from signup to first email.

Start free