Running My Own Email Server in 2025 with Mailcow
10/8/2025
Commercial email hosting is a trap for anyone who needs scale without paying per user. Google Workspace is not free, and even low-cost options like Zoho quickly impose strict limits on the number of aliases or mailboxes you can create without upgrading. For an engineer who needed unlimited, custom email addresses like support@, hello@, and newsletter@, paying per alias was too expensive.
This economic reality, combined with a desire for complete data privacy and infrastructure control, led me down the path most system administrators warn against. Self-hosting email is widely regarded as an exercise in technological futility, yet I am successfully running my own mail server. While the journey has had its predictable hurdles, the freedom and savings it offers have made the decision genuinely worthwhile.
The True Cost of Hosted Email
My decision began with a simple problem: cost and control. I needed clean email addresses for different projects like support@, hello@, and newsletter@. Paying per alias or per user with a commercial service was getting expensive. Beyond the money, I wanted complete ownership of my email infrastructure. I no longer wanted to wonder if a tech giant was reading my emails for ad targeting, or worry about sudden policy changes affecting my workflow.
The final push came from realizing I was already comfortable managing Linux servers and Docker containers. Email couldn't be that much harder, right? The truth is, it is complicated, but with the right tools, it is manageable.
Finding the Right Tool: Mailcow
After researching various solutions, from building everything from scratch to complex enterprise setups, I found Mailcow. What convinced me was its philosophy: take all the necessary, separate components of a modern email server and package them into a single, well-orchestrated Docker setup.
Mailcow does not try to reinvent email. Instead, it combines proven, open source components like Postfix, Dovecot, and SOGo into something you can actually deploy and maintain without a dedicated team. Think of it as using well-tested electronic components to assemble a computer, not melting down sand to make individual transistors.
The Setup Was Not Perfect
I won't pretend the setup was smooth sailing. Email has a reputation for being finicky, and the stakes feel high when you are migrating away from a trusted provider. The installation process, however, was surprisingly straightforward.
The entire system lives in Docker containers, ensuring consistent behavior across different servers. I provisioned a VPS with Contabo in their German data center. While this location is geographically distant from me in Yogyakarta, the dramatic cost savings and the quality of the service made it the clear choice. I pointed the mailserver at its IP and ran the setup script. I had a functioning email server in under an hour.
The initial configuration required some specific choices that saved a lot of headaches later. I disabled IPv6 because my VPS provider's support for it was unreliable, set my timezone to Asia/Jakarta for proper logging, and enabled Let's Encrypt for automatic SSL certificates. Getting these small details right is non-negotiable for a professional setup.
The Machine Running the Mail
The most fascinating part of Mailcow is how it orchestrates numerous services seamlessly. When an email arrives, it flows through multiple independent systems: Postfix receives the mail, Rspamd checks it for spam and viruses, Dovecot stores it, and SOGo makes it available through a web interface. Each component has one job and does it well.
The spam filtering deserves special mention. Rspamd uses machine learning that adapts to your behavior. When I mark emails as spam or rescue legitimate emails from the spam folder, the system learns. After a few weeks, it was catching spam with impressive accuracy while rarely flagging legitimate mail.
The day-to-day experience has been smooth. The web interface at mailcow ui gives me complete control over users, domains, and settings. SOGo provides a clean webmail experience that even my less technical users find familiar and easy to use. Monitoring happens automatically through Mailcow's watchdog system.
The Deliverability Problem is Real
Email deliverability is the single greatest challenge to self-hosting. Major providers like Gmail and Outlook are highly suspicious of new mail servers, and this suspicion is often justified because most spam comes from poorly configured servers.
Building reputation takes time and perfect configuration. You must have impeccable SPF, DKIM, and DMARC records to prove your emails are legitimate. Mailcow handles the technical setup, but you still need to understand what these records do and verify they are correctly configured in your domain's DNS. I started by sending emails only to addresses I controlled, then gradually expanded my volume.
The responsibility is also real. If your email server has issues, your users are looking directly at you for a fix. I've become much more disciplined about backups and monitoring since people depend on this infrastructure for their businesses.
Practical Benefits and Who Should Self-Host
Beyond the obvious privacy and control, running my own email server has been a fantastic learning experience. My understanding of DNS, global email routing, and server administration is now much stronger.
The cost structure is also favorable. My VPS costs about $3.93 monthly (shout out to contabo). Compared to commercial services that charge around $6 per user per month, I am already saving money with just five users, and adding more users costs nothing but storage space.
I recommend self-hosting email if you meet these criteria:
- You are comfortable with server administration and the Linux command line.
- You have the time for occasional maintenance and troubleshooting.
- You value complete data control and cost savings over vendor convenience.
- You need many email addresses, aliases, or domains.
You should skip self-hosting if:
- You cannot handle the risk of downtime for a critical service.
- You lack Linux or Docker experience.
- You need full enterprise compliance features without dedicated staff.
Looking Forward
So far, the project has reinforced my belief that with tools like Mailcow, self-hosting core infrastructure remains a viable, empowering option for tech-savvy individuals and small organizations. Would I do it again? Absolutely. But I would advise anyone considering it to set realistic expectations, plan for the steep learning curve, and start with a pristine IP address.
If you are curious about email self-hosting, Mailcow is an excellent place to start that journey. Here is the link to the repo: https://github.com/mailcow/mailcow-dockerized