I started working on this a while back and got as far as writing a collection of scripts that spins up a mail server from scratch and does all the configuration. It's not complete (doesn't include spam filtering or search) and it uses Common Lisp to drive the process, which is the main reason I haven't published it. I didn't think there would be much interest in something that obscure. But if there is interest I'd be happy to clean up the code and put it on github.
Re:How to Run Your Own Mail Server (2017)
by RandomCSGeek on Friday January 26, 2018 @11:21AM
(#16240333)
There seem to be at least a couple of projects on GitHub on this topic. Eg. https://github.com/aimxhaisse/docker-mailz Now how many of them actually work is a different question altogether.
https://yunohost.org/ provides a turnkey email solution, based on Postfix, dovecot et al.
Re:How to Run Your Own Mail Server (2017)
by daanavitch on Friday January 26, 2018 @11:02AM
(#16240155)
I have been running a Zimbra mail server for years and it's been great. Everything is included, configuration is quick and easy and there's lots of documentation online. The only negatives are that upgrading is a pain (I have to spin up a whole new server and migrate everything with Zextras Migration Suite) and the whole thing takes up quite some resources.
It would be great if someone wrote a program handling all of this that could be deployed as a single binary with secure defaults and limited configurability, but I don't see that happening any time soon. Email providers are good enough for almost everyone and the people who are good enough programmers to make sense of all the different protocols they'll have to deal with and get everything to interoperate nicely probably have other things to work on that people will actually pay for.
Edit: That said, this guide does look like a great resource for someone who is interested in doing this. It's interesting to learn how email works and if I had this guide when I started out I'd have saved a ton of time.