Postfix is an SMTP server MTA (Mail transfer agent) which handles sending and receiving emails. Install like so: sudo apt-get install postfix libsasl2-modules You will need ports 25 and ports 587 open on the firewall for SMTP and SSMTP.
Open the postfix config file:
sudo nano /etc/postfix/main.cf