I am trying to set-up Postfix on my Ubuntu local web development machine for send-only e-mails using Gmail so I can test e-mails sent by a web app I am developing.
Even though this is an old post I wanted to reply as I found it while trying to setup my own postfix mailrelay on my private cloud server with Debian that hosts our small homepage with a contact form.
I've been struggeling with Postfix for several days and came to hate it a bit. I read a ton of forum posts and blogs and never got it to work correctly - the config is just to annoying.
Finally I asked in IRC and was recommended to check out OpenSMTPD - this mail server, which can be used as a simple mailrelay too, is MUCH more easy to configure.
I was recommended to read this excellent blogpost on how to set it up for exactly the purpose of relaying emails from a web application to large mail providers like gmail, which then deliver the mail. I got it working after 45 minutes and the blogpost explained every little detail in the config files.
Never again will I touch postfix :P Hope it helps the next person here too.