Introduction

I saw a few posts on the subreddit r/selfhosted about self-hosting mail servers on cloud VPS. At the moment, one thought occurred to me why not self-host my email server at home rather than relying on a cloud provider’s VPS!.

This led me to wonder what I’d need to set up a fully functional email server for personal use. Rather than using a traditional server-grade PC. I decided to try it on a Raspberry Pi, which is small size and low power consumption make it an ideal choice for use as a home email server.

To make this work, I needed to secure a domain (Personalised email address like you@yourdomain.in) and a public static IP. I purchased the domain from Namecheap, all that was left was to obtain one public IP, so I reached out to my local service provider LSP (Local service provider) for my region, However, they advised me to contact the actual ISP, a Tier 2 service provider, since all Tier 3 LSPs fall under ISP.

After getting in touch with the ISP, they sent me an IP justication form via WhatsApp and instructed me to fill out. Once completed, I submitted the form, they sent me an acknowledgement and assigned me one public IP. The public IP will cost me 200 Rs per month, which is very cheap and affordable.

My ISP and Home Router Topology: A Visual Overview

Topology

I installed Mailcow Email server in Rapsberry PI using docker, added necessary RR records with dmarc, dkim, and spf (hat are today mandatory to be sure that provider like google will accept my emails) configuration under domain settings, and Portforwarded the necessary ports through the Mikrotik router.

For an email client, I used the open-source K9 Android app, and for a desktop application, we can use Thunderbird or Mailcow Sogo.

Note

If your mail server configuration is set up correctly, your mail client app will seamlessly fetch all the required settings as soon as you point it to your mail server address. This ensures a hassle-free experience, making it quick and easy to connect and start using your self-hosted email server.

We might ask ourselves, “What are the benefits of hosting an email server at home?” Well, here are a few compelling points that can make it worthwhile:

  • Operate 24/7/365 for less than ₹200 Rs per month in electricity costs
  • Security
  • Nobody can sell your data to advertising agencies
  • Ownership
  • Customizable Email IDs

Other then mail server I even hosted Uptimekuma which will be monitor status of self host services and Hosted on top of Docker using the official image from Dockerhub.

Tip

https://www.mail-tester.com/ helped me a lot during the setup process to make sure everything was correct.

I’m also planning to host authoritative nameserver at home, stay tuned—I’ll be posting all the details in my next blog as soon as possible!