20+ Options for hosting our own mail server
Tags: mailserver, hosting, research
Published: 2020-03-07 11:39:50

# Summary
Options for hosting own mail server.

# Intro
Email is still on of the most convenient and widely used communication method. If you are in doubt, try a Search in your favorite search engine ([Dockduckgo](https://lmddgtfy.net/?q=why email cannot be killed) or [Google](https://www.google.com/search?q=why email cannot be killed)).

Let's come to the feat of our article. We are going to have a look at our options for hosting our own mail server.

# But Why ?

* We are too caring about your privacy.
* We need to send too many mails.
* We don't have much to pay for a service like Mailgun/Mailchimp/GSuite.
* We want to learn about technicality of emails.
* More reasons ? Comment below.

Disclaimer: This is not guide to spend spamming emails. I will not be accountable for any legal actions, so approach this with care.

Note:- There is a troll/comedy video related to this heading in Malayalam (language of Kerala, India) film. The essence of that video clip is, a Malayalam speaking guy, purposefully confuses other men with some meaningless or useless jargon at another Malayalam speaking guys(we call our-self malayali/mallu). We use "But Why" in our talks, here and there.
{% youtube K4smXP46tG4 %}

# Options

Let's have a look at various options I have come across.

* [Mailu](https://mailu.io/1.7/)
To be frank, this one I liked very much. It can be easy as to run 3 to 5 commands if you docker and docker-compose installed already. As you might have noticed, above link to mailu itself is pointing to the docs. Go get it. Github issues is a best place, if you are stuck at something [Mailu Issues](https://github.com/Mailu/Mailu/issues?q=is:issue). From my personal experience and as per docs, atleast 2GB of RAM is needed for running this. If you are trying to run with 1GB system, ensure swap is enabled in your system with atleast 1GB or more. Kubernates based scaling is also documented in docs.

* [Docker-mailserver](https://github.com/tomav/docker-mailserver)
As name suggests, this one is also based on docker. It has also provide a lot of featurs out of box, like Fail2ban. Also, ldap  based setup is documented.

* [wildduck.email](https://wildduck.email/) This is another open source email setup. Here are few lines from their github page. WildDuck is a scalable no-SPOF IMAP/POP3 mail server. WildDuck uses a distributed database (sharded + replicated MongoDB) as a backend for storing all data, including emails. WildDuck tries to follow Gmail in product design. If there's a decision to be made then usually the answer is to do whatever Gmail has done. [Gitrepo](https://github.com/nodemailer/wildduck).

* [archiveopteryx.org](https://archiveopteryx.org/) Archiveopteryx is an Internet mail server, optimised to support long-term archival storage. It seeks to make it practical not only to manage large archives, but to use the information therein on a daily basis instead of relegating it to offline storage. Archiveopteryx runs on Linux, FreeBSD, NetBSD, OpenBSD and Mac OS X. The source code is written in core C++, using very few libraries, and compiles without any warnings. [Archiveopteryx's unique advantages include: Scalability, Searching and categorisation, Interoperability and standards compliance, Stable, long-term archival storage, Security, Easy administration]

* [www.dbmail.org](http://www.dbmail.org/) DBMail is primarily developed and tested on the GNU Linux and FreeBSD platforms. Users have also reported successfull deployments on OpenSolaris, NetBSD and OSX. DBMail is released under the GNU Public Licence (version 2).

* [www.elasticinbox.com](http://www.elasticinbox.com/) ElasticInbox is open source, distributed, reliable, scalable email store. The goal of this project is to provide highly available email store without a single point of failure which can run on commodity hardware and scale linearly. ElasticInbox can easily scale to millions of mailboxes, with hundreds of thousands messages in each mailbox.

* [mailcow.github.io/mailcow-dockerized-docs](https://mailcow.github.io/mailcow-dockerized-docs/) The integrated mailcow UI allows administrative work on your mail server instance as well as separated domain administrator and mailbox user access. [Mailcow forum](https://mailcow.farm/). [Gitrepo](https://github.com/mailcow/mailcow-dockerized).

* [mailinabox.email](https://mailinabox.email/) Take back control of your email with this easy-to-deploy mail server in a box. Mail-in-a-Box lets you become your own mail service provider in a few easy steps. It’s sort of like making your own gmail, but one you control from top to bottom. Technically, Mail-in-a-Box turns a fresh cloud computer into a working mail server. But you don’t need to be a technology expert to set it up. [Githubrepo](https://github.com/mail-in-a-box/mailinabox).

* [www.iredmail.org](https://www.iredmail.org/) iRedMail - Open Source Mail Server Solution. The right way to build your mail server with open source softwares. Works on Red Hat, CentOS, Debian, Ubuntu, FreeBSD, OpenBSD.Since 2007.

* [www.hmailserver.com](https://www.hmailserver.com/) hMailServer is a free, open source, e-mail server for Microsoft Windows. It's used by Internet service providers, companies, governments, schools and enthusiasts in all parts of the world. 
* Some interesting articles about Email hosting
  1. [https://likegeeks.com/linux-mail-server/](https://likegeeks.com/linux-mail-server/)
  2. [https://www.tecmint.com/setup-postfix-mail-server-in-ubuntu-debian/](https://www.tecmint.com/setup-postfix-mail-server-in-ubuntu-debian/
)
  3. [https://www.linux.com/tutorials/how-build-email-server-ubuntu-linux/](https://www.linux.com/tutorials/how-build-email-server-ubuntu-linux/)
  4. [https://www.tecmint.com/install-postfix-mail-server-with-webmail-in-debian/](https://www.tecmint.com/install-postfix-mail-server-with-webmail-in-debian/)
  5. [https://www.linuxbabe.com/mail-server/ubuntu-16-04-iredmail-server-installation](https://www.linuxbabe.com/mail-server/ubuntu-16-04-iredmail-server-installation)
  6. [https://www.linuxbabe.com/mail-server/setup-basic-postfix-mail-sever-ubuntu](https://www.linuxbabe.com/mail-server/setup-basic-postfix-mail-sever-ubuntu)
  7. [http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_%3a_Ch21_%3a_Configuring_Linux_Mail_Servers#.Xfd9YGbhVhE](http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_%3a_Ch21_%3a_Configuring_Linux_Mail_Servers#.Xfd9YGbhVhE)
  8. [https://www.gmass.co/blog/smtp-server-linux/](https://www.gmass.co/blog/smtp-server-linux/)
  9. [https://mailman.readthedocs.io/en/latest/](https://mailman.readthedocs.io/en/latest/)
  10. [https://en.wikipedia.org/wiki/List_of_mail_server_software](https://en.wikipedia.org/wiki/List_of_mail_server_software)

* Some digital ocean articles about mail hosting related. I think, this will work with any VPS 
  1. [How To Install iRedMail On Ubuntu 12.04 x64](https://www.digitalocean.com/community/tutorials/how-to-install-iredmail-on-ubuntu-12-04-x64)
  2. [How To Configure a Mail Server Using Postfix, Dovecot, MySQL, and SpamAssassin](https://www.digitalocean.com/community/tutorials/how-to-configure-a-mail-server-using-postfix-dovecot-mysql-and-spamassassin)
 
# Remarks
It is hard to have a conclusion. Especially, our requirements might vary on a case by case basis. 

Based on your experience/knowledge. Which is the best option ?
What are your why's for hosting your own mail server ?
Anything missing ?
Feedback and suggestions, use comment box below.