SSMTP Setup On Mountain Lion

You will need to have macports installed and working.

Basically, you are going to disable postfix, install the SSMTP port, configure SSMTP, and then (here’s the part that is not documented) replace the sendmail executable with a link to ssmtp.

Here are the commands.
[bash]
$ sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/org.postfix.master.plist
$ sudo port install ssmtp
$ sudo cp /opt/local/etc/ssmtp/ssmtp.conf.sample /opt/local/etc/ssmtp/ssmtp.conf
$ sudo edit /opt/local/etc/ssmtp/ssmtp.conf
$ sudo mv /usr/sbin/sendmail /usr/sbin/sendmail.orig
$ sudo ln -s /opt/local/sbin/ssmtp /usr/sbin/sendmail
[/bash]

You should now be able to…

[bash]
$ mail me@mydomain.com
Subject: test
test
.
EOT
[/bash]

Now tail the mail log to verify that your mail was sent:

[bash]tail /var/log/mail.log[/bash]

Leave a Reply

  

  

  

This site uses Akismet to reduce spam. Learn how your comment data is processed.