Tutorial - Install Postfix to allow outgoing email on Raspberry Pi
In this tutorial, I will guide you through installing Postfix on your Raspberry Pi so that you can allow outgoing email
So far, I've covered overclocking your Raspberry Pi, preparing to run your Raspberry Pi as a web server, installing Apache, PHP and MySQL and installing PhpMyAdmin. I'm assuming you've at least set your hostname and installed Apache, PHP and MySQL on your Raspberry Pi for this tutorial.
Before we go ahead and install WordPress, we need to ensure that outgoing email can be sent from your Raspberry Pi. In this tutorial, I'll cover installing Postfix, which is a mail transport agent.
Step 1 – Make sure you're up-to-date
To begin, run the following command to make sure you're running the latest software updates:
sudo apt-get update
Any updates available will be downloaded and installed.
Step 2 – Begin the Postfix Installation
Once done, go ahead and enter this command to get the ball rolling:
sudo apt-get install postfix
The postfix setup will now start. You will see a blue screen with some information on the various configuration types, arrow down to 'ok' to continue.
Next you will be given the options available. Choose 'internet site' from the list:
[![](GHOST_URL/content/images/2012me/content/images/2012/09/postfix-configuration.jpg?ssl=1)
Once you've chosen this, go to 'ok' to continue.
Step 3 – Configure your Postfix FQDN
The final step is to configure the FQDN. It is important that you've already set the hostname (see my tutorial which includes this) as we're asked to confirm it at this stage.
Set the system mail name to your fully qualified domain name. For example, my Raspberry Pi uses the FQDN 'dingleberrypi.com', so I entered dingleberrypi.com here:
[![](GHOST_URL/content/images/2012me/content/images/2012/09/postfix-fqdn.jpg?ssl=1)
Once you've entered this, double check it and the go to ok. That's it, you're ready to rock and roll! You'll now be able to receive mail from your Raspberry Pi web server!