Here are some notes I took on configuring my Slicehost Ubuntu Gutsy installation to use Postfix to send emails via Google Apps. I am far from an expert on postfix configuration but maybe these notes will be helpful to others needing this configuration.
These sites contain the key information:
I basically followed the Behind My Screen tutorial (read the comments too) with the updates from The Prancing Tarantula and the following changes.
My Ubuntu server install didn't have the Thawte certificates installed by default so I installed them:
sudo aptitude install ca-certificates
Then you can append that file to your /etc/postfix/cacert.pem If you "sudo su" before doing the append to the file you won't get messed up by the shell:
$ sudo su # cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem >> /etc/postfix/cacert.pem
Since I have Google Apps setup for my domain I don't just want to relay email as "firstname.lastname@example.org", I want the email to be sent as though it came from my domain ("email@example.com"). This requires some simple changes to the config files.
In my transport file I have:
In my generic file I have:
Where "demo" is the login name and "myservername" is my slicename. In my sasl_passwd file I have:
After restarting postix you can test sending email from your server:
$ sudo aptitude install mailx $ mailx -s "test email" firstname.lastname@example.org < ~/sometestfile_to_send
Check your logfiles for errors/warnings:
sudo tail /var/log/mail.\*
I hope these notes might help folks "get over the hump" if they are setting up the same configuration.