Self-hosting a mail server 2021 Beginners Guide

You have a type of app that needs to deliver email. You are additionally a technically knowledgeable individual who has confidence in the “email is decentralized” mantra, so you choose to self-host a mail server yourself. In the following paragraphs, I will summarize what I have learned and what it is like to self-host a mail server in 2021.

Everything began a month prior when I launched a little local area-driven tech newspaper. The newspaper application comprises a basic static site and a basic backend for managing memberships and email deliverances. Delivering to production, I needed to arrange the application’s mailcow email server settings, so I googled about the latest patterns.

For what reason is it hard, however? No contentions on that. I chose to try it out.

After a short examination, I began a Postfix example in a docker compartment. A couple of hours later, I effectively arranged my area to work with the SMTP server and sent a test email. It showed up in the SPAM folder of my Gmail account.

Exercise #1: Running your mail server is simple. What is hard is to design it effectively.

In a split second, the main thing I saw was that my email was delivered unencrypted.

I immediately fixed that with a certificate given by Let’s Encrypt. There is a great deal of bit-by-bit instructional exercises on the subject. Presently my messages are encoded however are as yet named Spam.

I chose to stop the mystery, and a couple of moments later, I showed up at this supportive page. Here is a quick checklist of what you need to do to pass the Spam classification when delivering to Gmail:

1. Static I.P.
2. Reverse DNS on your I.P. address that focuses on the area you use for sending messages
4. SPF
6. Confirmation email before adding to the membership list
7. Unsubscribe connection

1, 6, 7 were at that point done on my side. I proceeded with the setup of my mail server with DKIM, SPF and DMARC. Aside from the DNS records, a fair measure of design must be done on the server-side.

Exercise #2: A usable mail server needs a carefully designed architecture, maintenance and continuous awareness of the most recent security and content practices.

Now I chose to check for some local area-driven mail server (design) projects since it requires a great deal of information and exertion to run a usable mail server. My necessities were the accompanying:

1. Dockerized

2. Popular and routinely kept up

3. Well-archived

4. Easy to the arrangement

I quickly arrived at the following solutions:

1. Mail-in-a-Box — it isn’t Dockerized, and you need a dedicated server or V.M. not to pollute your environment with whatnot. It might be easy to run in a custom docker container, but I prefer an officially supported solution.

2. Mailu — it is Dockerized and well-documented but, in my opinion, not easy to set up. I expect a docker-compose-up to be enough so I can check up a demo of the project. After some issues with networking and certificates, I decided to move on.

3. Mailcow — Dockerized, popular, well-documented and easy to install. I managed to get up and running in less than 30 minutes. The project provides a neat admin U.I. and nice-looking mailboxes for your domain accounts. Mailcow also guided me on how to set up my DNS records correctly. It is just awesome! (P.S. I’m not affiliated in any way with Mailcow)

I was prepared to send another test email. Fingers crossed — BOOM! My email showed up in the Spam folder indeed. The solitary thing I hadn’t done from the agenda was the Reverse DNS. My ISP wouldn’t add a Reverse DNS record to my I.P. address that focuses on my space. I was agreeable with everything except for this, and there was no way around it.

I looked at the most well-known administrations and chose to check Amazon SES out. It worked consummately. Anyway, I immediately understood that I need to utilize their other cloud administrations to be capable, not exclusively to send yet to get messages.

Exercise #3: Even paid mail transport administrations to have disadvantages which you need to consider.

I kept burrowing myself with a facilitated mail server theme. Let’s say you even have a Reverse DNS record arrangement on your I.P. address. Is there something else that can stop you? Indeed — there is :). Your I.P. address may be remembered for at least one Spam blacklist, which many email suppliers consider while evaluating your messages. Most of them incorporate a process for unbanning I.P. addresses, but this might take some time and communication.

In conclusion, my personal feeling about self-hosting a mail server is positive. Setting up a self-hosted mail server for a volume of a few hundred emails a month is an overhead and will cost more than using some mail service provider. However, for big volumes, I would walk the extra mile in a self-hosting way.

Build your Websites with lightweight & Bloat free themes Without Any coding Knowledge

Browser Themes

Leave a Reply

Get Free Resources To Grow Your Business :

- Free Web Resources

- Tips & Insights

- Theme releases


Enter your email address