Postfix Not Sending Mail Out
<p>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).</p>

<p>I install postfix through mailutils (installs postfix along with other stuff).</p>

<pre><code>sudo apt-get install mailutils
</code></pre>

<p>I then edit the config file for postfix...</p>

<pre><code>sudo nano /etc/postfix/main.cf
</code></pre>

<p>I change the line...</p>

<pre><code>inet_interfaces = all
</code></pre>

<p>to...</p>

<pre><code>inet_interfaces = localhost
</code></pre>

<p>I then restart postfix using this command...</p>

<pre><code>sudo service postfix restart
</code></pre>

<p>Finally I test the installation by running the following commands...</p>

<pre><code>php -a
echo mail("myemail@gmail.com", "Hello", "My email worked!");
</code></pre>

<p>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.</p>