Postfix setup with GMail relay

Posted May 12, 2015 5.7k views

Hello, whenever I see people discussing Postfix configuration it seems they are looking to do two things mostly:

  • configure a local SMTP server on their machine, and have each mail sent to this address forwarded to their own GMail account

  • have GMail use their own SMTP server to send email from GMail using their server

I’m trying to do something which seems a bit different for me: I have one GMail email (say and I’d like to use it so that each time someone uses echo "hello" | mail <address>, the mail be sent through GMail as a relay to <address> a bit like if it was using a mail program – is this possible?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Follow the steps on here
setting up the relayhost
and all of the authentication details for that host
hope it helps