For the software side, I would most likely use mailinabox [1] or sovereign [2]. They both setup mail servers for you with reasonable defaults using Ubuntu and Debian respectively.
Ars Technica has a great 4-part guide [3] on setting up a mailserver yourself.
Ars Technica has a great 4-part guide [3] on setting up a mailserver yourself.
[1] https://mailinabox.email/
[2] https://github.com/al3x/sovereign
[3] http://arstechnica.com/information-technology/2014/02/how-to...