Postfix: SASL local relay vi Gmail relay (with @domain forwarding)

August 23, 2014 2.4k views

Is it a reliable setup to setup Postfix to forward my @domain to @gmail with a Gmail SMTP relay host?

I’m setting up a new droplet, Ubuntu 14.04 LAMP stack. I’m looking to x-fer over my primary domain, but ran into a snag when looking at email forwarding – essentially, now I’m having to do this myself…

In my searches, I found a great configuration which I really like, but I’m worry on reliability (i.e. Google going no-no): I’ve setup Postifx foward to my @gmail account, using STMP relay host. The idea is postfix would accept the message, and then immediately relay it through to Gmail.

Local email, using sendmail / mail, does work. But, I hadn’t tested remote yet (given the dependency of my @domain email working).

My question is: is this option viable? Is there any possibility Gmail could cut off my relay? (using my login on the relay) While I have a basic understanding of SMTP, I don’t fully understand how mail relays through mail servers.



1 Answer

In my tests, I found one big no deal problem: Google changes the “From:” address of all emails sent through their SMTP to my Google address .... That’s a no go.

Looks like the answer is to just internal local relay - it appears to do the same thing anyway.

  • You can achieve this in gmail by going to:
    settings / accounts and import / send mail as

Have another answer? Share your knowledge.