I Thought Running My Own Email Server Would Save Money. It Cost Me a Week of My Life.
What happened when I tried to replace email providers with my own Mailcow server, and why the real cost of email infrastructure is not just SMTP.
For a long time, I didn't think much about email.
My apps sent verification emails, password reset links, notifications, and the occasional newsletter. Everything was comfortably sitting within the free tiers of Brevo and MailerSend.
Then my projects started growing.
More users meant more emails.
More emails meant I was getting closer and closer to those limits.
And once you leave the free tier, the costs start stacking up.
Not enough to bankrupt anyone, but enough to make me stop and think.
I have multiple projects.
I plan on building more.
I have newsletters.
I have transactional emails.
I have users.
If I keep growing, this email bill is only going in one direction.
Up.
So naturally, I did what every developer does when faced with a recurring bill.
I convinced myself I could build it cheaper.
I started comparing the numbers.
A VPS from Hetzner would cost me less than most email providers.
Mailcow was open source.
Docker was already familiar territory.
I already managed servers for my applications.
How hard could it be?
In my head, the math was simple.
Pay a small monthly fee for a server.
Host unlimited email accounts.
Send newsletters whenever I wanted.
Use it across CediRates, Diimple, and whatever I build next.
No monthly email bill growing with my user count.
It sounded like a brilliant idea.
A week later, I wasn't so sure.
The Setup
I rented a VPS.
Installed Mailcow.
Configured my domain.
Created my first mailbox.
Within a few hours I was sending emails.
Everything looked surprisingly easy.
I sent a test email to myself.
It arrived.
I sent another.
That arrived too.
At that point I started wondering why everyone made email servers sound so difficult.
Then Gmail humbled me.
The First Bounce
One morning I tried sending another test email and got my first rejection.
Not spam.
Not promotions.
Rejected.
The error message was talking about PTR records.
I vaguely knew what PTR records were.
The same way most developers vaguely know what a carburetor does.
I'd heard the term before.
I had never needed to care about it.
Now suddenly Gmail cared a lot.
So I spent hours reading documentation, checking DNS records, and trying to understand why a server that was successfully sending email yesterday was being treated like a spam operation today.
Eventually I fixed it.
Or at least I thought I did.
Then IPv6 entered the chat.
The IPv6 Problem I Didn't Know I Had
After even more troubleshooting, I discovered Gmail wasn't unhappy with my IPv4 address.
It was unhappy with my IPv6 address.
The one I wasn't even thinking about.
The server had IPv6 enabled by default.
Gmail attempted to use it.
The reverse DNS wasn't configured correctly.
And that was enough to cause problems.
The frustrating part was that everything else looked correct.
The lesson?
Email doesn't care how many things you've configured properly.
It only cares about the one thing you missed.
The Alphabet Soup Phase
Next came SPF.
Then DKIM.
Then DMARC.
Then BIMI.
Every time I thought I was finished, I discovered another acronym.
At some point I had more DNS tabs open than actual application tabs.
I would make a change.
Wait for propagation.
Test.
Fail.
Read documentation.
Make another change.
Wait again.
Repeat.
I wasn't building products anymore.
I had become a part-time email administrator.
The Thing Nobody Talks About
Eventually the server worked.
Emails were sending.
Authentication was passing.
Nothing was actively broken.
That's when I discovered the next problem.
Reputation.
A brand-new mail server has no reputation.
To Gmail, Outlook, Yahoo, and everyone else, you're basically a stranger showing up at the door claiming you're trustworthy.
And trust takes time.
That's when I finally understood what you're actually paying Brevo, MailerSend, Mailgun, and similar providers for.
You're not paying for SMTP.
SMTP is easy.
You're paying for years of reputation, infrastructure, monitoring, compliance, and relationships with inbox providers.
That's the real product.
Was It Worth It?
If you're asking whether running my own email server was cheaper, the answer is technically yes.
My monthly infrastructure costs are lower than what I would eventually pay email providers as my user base grows.
But there was another cost.
Time.
I spent an entire week learning about email authentication, reverse DNS, IPv6, deliverability, reputation, and inbox placement.
A week I could have spent building features.
A week I could have spent writing code.
A week I could have spent shipping products.
Still, I don't regret it.
Because now I understand email in a way I never would have if I had simply kept swiping my card every month.
The funny thing is that I started this journey thinking email providers were overpriced.
I ended it understanding exactly why they charge what they charge.