Own your email

Self-Hosted Mail Server: Run Your Own Email

A self-hosted mail server, such as Mailcow or Mailu, gives you mailboxes, webmail and anti-spam under your own domain, on your own server, without per-mailbox fees. It is also the most demanding part of self-hosting, and this page says so plainly. On Elestio, Mailcow and Mailu start from $16/month, fully managed.

Deploy Mailcow Compare the tools
AWS Azure Hetzner DigitalOcean Vultr Linode Scaleway Netcup TensorDock On-Premise
Trustpilot 4.6/5 G2 G2 4.8/5 SOC 2 ISO 27001 GDPR

Why self-host your email

Four reasons teams move away from Gmail and Microsoft 365.

Privacy

Business email is among your most sensitive data. On your own server, it is stored and processed on infrastructure you control.

Cost at scale

Google Workspace and Microsoft 365 bill every user, every month. A self-hosted mail server costs the same for 5 or 50 mailboxes: from $16/month on Elestio.

Data residency

Choose where your mail is stored, including EU-owned providers such as Hetzner, Netcup, Scaleway and OVHcloud, for GDPR data residency.

Your domains, your rules

Host several domains, mailboxes and aliases on one server, with your own retention and spam filtering settings.

2 open source mail servers you can self-host

01

Mailcow

Complete mail suite

Postfix, Dovecot, Rspamd and SOGo in one Docker stack: IMAP and SMTP, webmail, anti-spam, calendars and contacts (CalDAV, CardDAV), ActiveSync through SOGo, and a full admin interface.

Pricing
License: GPL 3.0
From $16/month on Elestio
Best for
Teams that want a complete mail suite under their own domain, with calendars and contacts.
02

Mailu

Simpler, lighter mail server

A Docker-based mail server with IMAP and SMTP, webmail, Rspamd anti-spam and a clean admin interface. Calendars and contacts are optional, and there is no ActiveSync.

Pricing
License: MIT
From $16/month on Elestio
Best for
Small teams that want email that is simple to run, without groupware.

For transactional email: Postal

03

Postal

For sending transactional email, not a mailbox

A mail delivery platform for your applications, an alternative to Mailgun or SendGrid: it sends signups, password resets and notifications through an HTTP API or SMTP, with click and open tracking, webhooks and per-domain statistics. Postal does not host mailboxes and is not a replacement for Gmail.

Pricing
License: MIT
From $16/month on Elestio
Best for
Applications that send transactional email at volume.

Comparison table

Tool Purpose Webmail Calendars / contacts ActiveSync Spam filtering License From
Mailcow Mailboxes SOGo Yes Yes (SOGo) Rspamd GPL 3.0 $16/mo
Mailu Mailboxes Yes Optional No Rspamd MIT $16/mo
Postal Transactional sending No (API and SMTP) Not applicable Not applicable Not applicable MIT $16/mo

Indicative server sizes for self-hosted email

Setup Mailboxes VM size Monthly cost on Elestio
Personal and family 1-10 mailboxes 2 vCPU / 4 GB From $16
Small team 10-50 mailboxes 4 vCPU / 8 GB From $30
Company-wide 50-500 mailboxes 16 vCPU / 32 GB From $112
Multi-domain agency 500+ mailboxes 16 vCPU / 64 GB From $169

Sizes are indicative and depend on mail volume and storage. Google Workspace and Microsoft 365 bill per user, so their cost grows with the team; a server for 10 to 50 mailboxes starts from $30/month on Elestio.

6 steps to keep your email out of spam

Receiving email is easy. Getting your outgoing email accepted by Gmail and Outlook takes these six steps, on your domain and your server.

1

Reverse DNS (PTR)

A PTR record on the server IP that matches your mail hostname.

2

SPF record

Declares which servers may send email for your domain.

3

DKIM signing

Cryptographically signs every outgoing message.

4

DMARC policy

Aligns SPF and DKIM and tells receivers how to handle failures.

5

TLS for SMTP

Encrypted mail transport with a valid certificate.

6

Reputation warmup

On a new IP, start with low volumes to known contacts, then ramp up gradually.

What to expect

Hosting your own email is the most delicate part of self-hosting. The software is mature; the hard part is reputation. A new server IP has no sending history, a missing or wrong SPF, DKIM or DMARC record sends messages to spam, and Gmail and Outlook can be strict with small senders.

A mail server needs outbound port 25 (SMTP) to deliver email to other servers, and several cloud providers block it by default on new accounts.

For application email (signups, password resets, notifications), a dedicated sending platform such as Postal keeps that traffic separate from your team mailboxes.

Your email, your server

Free trial. Mailcow live in 3 minutes with HTTPS, anti-spam, calendar sync.

Start free trial

Reviews

Trusted by 10,000+ Developers Worldwide

Real reviews from real users on Trustpilot.

Frequently Asked Questions

  • Is it worth self-hosting your own email server?

    It is worth it if you want full control over your mail, your data location and your costs, and if you accept to look after deliverability: DNS records, IP reputation and monitoring. If you are not ready for that, keep a hosted mailbox provider and self-host the rest of your stack.

  • Mailcow vs Mailu: which one should I choose?

    Mailcow is the more complete suite, with SOGo webmail, calendars, contacts and ActiveSync for phones and Outlook. Mailu is simpler and lighter, a good fit if you only need email. Both use Rspamd for spam filtering and start from $16/month on Elestio.

  • How do I avoid my emails going to spam?

    Set up reverse DNS (PTR), SPF, DKIM and DMARC for your domain, use TLS, and warm up a new IP by sending low volumes to known contacts first. Monitor blocklists and the DMARC reports you receive, and send bulk or marketing email from a separate platform.

  • Can I use my own domain?

    Yes. Mailcow and Mailu host mailboxes for your own domain, and several domains on the same server. You point the MX record of your domain to your server and add the SPF, DKIM and DMARC records they give you.

  • Is Postal a replacement for Gmail?

    No. Postal is a sending platform for applications, an alternative to Mailgun or SendGrid: it has no mailboxes and no webmail. To replace Gmail for your team, use Mailcow or Mailu, and add Postal if your applications send transactional email.

Take back your email

Self-host Mailcow on Elestio: anti-spam, webmail, calendars and contacts included. From $16/month.

Start free trial