I used this for setup: https://help.ubuntu.com/community/Postfix
To get a full stack going with proper SSL auth it is somewhat involved. The good thing is once you do it, it works reliably and you OWN your email. Complying with every anti spam measure is critical though because you will be most likely sending mail to others on large servers that will reject your mail otherwise. Even then I had a lot of problems with Yahoo to get whitelisted, and Verizon just summarily blocks Digital Ocean hosts.
Secure Web Server series;
https://arstechnica.com/series/web-served/
Mail Server Series
https://arstechnica.com/information-technology/2014/02/how-t...
https://arstechnica.com/information-technology/2014/03/takin...
https://arstechnica.com/business/2014/03/taking-e-mail-back-...
https://arstechnica.com/information-technology/2014/04/takin...