Tired of relying on Microsoft, Google, and other brands for your email? Want to bring everything under your direct control? Do it yourself with a custom email server for yourself, your friends and family, and anyone else you wish to provide an account. In this guide, I'll round up some tools and things you should consider while setting up your own email server. This will include basic stuff such as domains but also more advanced solutions for managing your server with a dynamic public IP address.

6 Domain name(s)

You'll want something catchy

An email address is nothing without a domain name. You'll want something catchy to represent the household, perhaps a family name. There's also the opportunity to integrate your webmail with other projects you may have running as a self-host master. You'll want to use a domain name to help mask your IP address since it's easier to remember and will make entering your credentials notably more straightforward. This will tie into using a DDNS or setting up your own DNS solution.

5 DNS

Either self-host or external

Not many of us are lucky enough to have a static IP address. If you have a dynamically updated IP from your ISP, you'll need to ensure access is available no matter how many times it changes. This is where running your own DNS server or rolling with a third party through Dynamic DNS (DDNS) can come into play. One issue with using your residential-provided IP address is blocklists will likely have many of your ISP addresses already added. To help circumvent this, you will need a static IP or upgrade your connection.

👁 Running Minecraft on a self-hosted Pterodactyl server
How to set up a reverse proxy for your self-hosted apps

Take the headache out of administering your home lab by setting up a reverse proxy.

4 Spam filters

Keep unwanted junk at the door

The worst part about any form of communication, be it through SMS or email is spam. Unwanted messages from mailing lists you never signed up to or malicious actors attempting to send you phishing links. You'll need to shield yourself (and everyone else using your self-hosted email service) from these messages. Rspamd and SpamAssassin are two good options for handling incoming mail and screening everything.

3 Software

The heart of your email server

There are many different email servers to choose from and you can create a custom deployment. Mail-in-a-Box is a great place to start for beginners using Ubuntu. It has everything within a single package, including DNS, TLS and certificates, Nextlcoud contact management, and much more. Mailcow is another fine choice and is fully containerized so you can run it on almost anything. If you'd rather go it alone and create a tailored solution for your needs, do some research on options such as Exim and Postfix.

👁 Running multiple containers inside Portainer
You can manage your self-hosted containers like a pro with Portainer - here's how

Need a beginner-friendly GUI that's laden with all the essential features to manage your containers? Portainer has your back!

2 Firewall

OPNsense is your new best friend

Running any type of service from home comes with risk. You're opening up your LAN to the outside world. This is where a solution such as OPNsense can really make a difference. Your ISP router is likely fine for most uses, though I'd still replace it with a DIY or aftermarket device, but OPNsense provides many additional tools and features to create a truly secure network. Using this software will enable you to set up rules, and conditions, manage traffic, install and configure plugins, and much more. It's seriously powerful and easy to use.

👁 The OPNsense Dashboard
How I made the ultimate firewall for my home with OPNsense

Armed with tons of security provisions, OPNsense is an amazing firewall OS for your home network

1 Test your setup

Make sure it all works

The worst part of any self-host service is the possibility of it not working as intended. This is when support requests can pile up from family members. Email is fairly important as it's tied to many accounts and is a primary method of communication with companies, people, and everything else. Even with the advent of social media, email is still used as a reliable method to interact with others. Your email server must remain online and accessible for as long as possible.

Running your own email server is not easy

This is not a task for the faint-hearted. You will likely come across bumps in the road and the process will not feel smooth at times. I don't personally run email from home due to the fact it's not worth the trouble and I would rather simply pay a small fee for the luxury of it being available everywhere with all the bells and whistles. Google may not be a saint when it comes to privacy but the convenience of Google Workplace is excellent for the small monthly cost.