Turn email ( SMTP ) back on in OS X Mountain Lion

November 8, 2012

I upgraded to Mountain Lion a few days ago and I have to say that I have had several major disappointments. Overall it is great. Still pretty, faster than Lion, and I have not experienced the battery drain issues that have plagued some users. What I have noticed is that most of my standard, every day use, development tools went missing. Namely git and svn. Today I found out that the email server is also disabled by default :S.

If you need to re-enable email on your machine so you can send emails through something such as PHP’s mail(), or WordPress wp_mail() pop open a terminal and run the following commands:

sudo mkdir -p /Library/Server/Mail/Data/spool
sudo /usr/sbin/postfix set-permissions
sudo /usr/sbin/postfix start

The bummer here is that you may need to run this code on each machine restart. If I run into that I may post up a script here with the fix.

If you already have the fix please post it below in a comment and I shall update the post

Leave a Reply

Your email address will not be published. Required fields are marked *