Enabling Outbound SMTP Mail Relaying (SASL)
You can now configure outbound SMTP relay through the Server app in 10.8 ML: Mail/Relay outgoing mail through ISP/Edit/Enter your relay server address, username and password. This takes care of a lot of previous configuring of main.cf, especially the creation of the SASL password file, which is nice. Unfortunately, it did not work fully for me. Using Sendgrid as the relay, I was getting SASL errors in the SMTP log:
postfix/smtp[17917]: 37989327A172: to <xxxxx>, relay=smtp.sendgrid.net[50.97.69.147]:25, delay=539, delays=536/0.41/2.7/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.sendgrid.net[50.97.69.147]: no mechanism available)
The solution that worked for me consisted of editing the main.cf. Using your preferred editor, edit /Library/Server/Mail/Config/postfix/main.cf (not /etc/postfix/main.cf) and add the following lines at the top of the file:
smtp_sasl_auth_enable=yes
smtp_sasl_security_options=noanonymous
smtp_use_tls=yes
smtp_tls_security_level=encrypt
I thought I'd share this, as searching the web did not find a solution for me, earlier today.
Mac mini, OS X Mountain Lion (10.8.2), OS X Server