How To Install and Configure Postfix as a Send-Only SMTP Server on Ubuntu 14.04
Feb 072016Step 1 — Install Postfix
In this step, you'll learn how to install Postfix. The most efficient way to install Postfix and other programs needed for testing email is to install the mailutils package by typing:
sudo apt-get install mailutils
Press ENTER to install them. Near the end of the installation process, you will be presented with a window that looks exactly like the one in the image below. The default option is Internet Site. That's the recommended option for this tutorial, so press TAB, then ENTER.
After that, you'll get another window just like the one in this next image. The System mail name should be the same as the name you assigned to the Droplet when you were creating it. If it shows a subdomain like mars.example.com, change it to just example.com. When you're done, Press TAB, then ENTER.
Step 2 — Configure Postfix
Change the line that reads inet_interfaces = all to inet_interfaces = loopback-only. When you're done, that same section of the file should now read:
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
sudo service postfix restart