https://github.com/ladybirdweb/faveo-helpdesk/wiki/Install-and-configure-a-simple-mail-server-for-sending-mails-using-PHP-mail-function-in-Faveo-on-Ubuntu-16.04-server
sudo apt-get update
sudo apt-get install postfix
After the installation is complete, run the command to configure Postfix:
sudo dpkg-reconfigure postfix