I've been trying to get postfix setup so that it can SEND (don't need it to receive) emails out to users on my website (such as account validation emails).
I install postfix through mailutils (installs postfix along with other stuff).
sudo apt-get install mailutils
I then edit the config file for postfix...
sudo nano /etc/postfix/main.cf
I change the line...
inet_interfaces = all
to...
inet_interfaces = localhost
I then restart postfix using this command...
sudo service postfix restart
Finally I test the installation by running the following commands...
php -a
echo mail("myemail@gmail.com", "Hello", "My email worked!");
The echo prints 1 onto the terminal, which should mean the email was sent successfully.... but I've checked my inbox/junk/spam/trash and the email was not received. I've tried with different emails too.