Self hosted email

I am looking for recommendations on how to host my own email server. I have been watching this video, but wonder if there is something better. TIA

I have recently (around 2 weeks ago) made the switch from provider-hosted email to self-hosted email. I have put that off for a long time, but since the provider (Servercow) drastically increased prices at the end of last year, I decided to migrate.

I am now running mailcow: dockerized, which is the same software that is powering the provider I switched from. So far it’s working great on a VPS with 4GB of RAM and 2 vCores and I am very happy with it. Mailcow appears to include a spam filtering solution (rspamd), but I’ve not yet looked into that. I plan to do that in the future.


  • Open source
  • IPv6 capable
  • DKIM support
  • FIDO2 U2F and passwordless authentication
  • Unlimited number of domains and mailboxes
  • Clear instructions how to set up DNS records, with automated verification
  • Ability to transport mail through third-party SMTP server (like AWS SES, mailgun, sendgrid, etc.)
  • Built-in support for incremental backups
  • Ability to enforce transport encryption (per domain or per mailbox)
  • Nice, modern admin UI


  • No high availibity or at least load-balancing of SMTP service
  • No automatic DNS server configuration

As long as you dedicate a server to running mailcow and don’t stray too far from their defaults, it’s surprisingly easy and fast to setup. I found the documentation to be quite comprehensive and didn’t need any further resources to set it up.

What’s come in particularly handy for me is the ability to use a third-party SMTP relay service for outgoing mail. My VPS provider (Hetzner) blocks outgoing traffic on TCP port 25, as many providers do, in order to combat spam. Although you can apply to lift this restriction with some providers, you might still end up with an IP address that is on a blocklist. So instead I signed up with Amazon Simple Email Service which includes 50k emails per day for free. That should be more than enough if you’re not sending marketing emails like newsletters.

1 Like

I’ve been running mail servers for 25 years. Sendmail, postfix, dovecot, courier imap, squirrelmail, roundcube, etc. I now moved my customers to either Gmail or MS 365 because it became too much of a battle maintaining a good DNS MX reputation, even with proper SPF, DKIM, and DMARC records setup. Many mainstream mail servers are starting to reject mail if it did not originate from another mainstream provider. It became just to much to stay on top of. That being said, I switched personal, family, and friend’s domains to Mailcow on Debian about 2 years ago. I don’t particularly like Docker but I sucked it up to install Mailcow. It was the best thing I ever did. I can do everything needed through the Mailcow GUI now that used to require configuring many different .conf files.

I am running my own mail server for many years.
The last years mainly based off this tutorial:

As someone who manages email servers daily. I would strongly suggest you use a smart host for your outgoing mail. It eliminates the problem of IP reputation that others have mentioned here. Mailcow is great as is, both are docker based. Docker makes it easier to update, backup and migrate to another server should the need arise.

I like seeing people host their own mail, it gets you out of google/MS harvesting your inbox metadata for advertising.

1 Like

Can you elaborate a little more about smart host?

A smart host or SMTP relay is a service that is used as the outgoing email server. The idea is that they take care of maintaining good reputation for you.