google app email

I am not expert, but I have set up web servers. I have not set up an email server. Linode documentation and experience made it straight forward to set up a web server in CentOS 7. I am using Concrete5 for my CMS and decided to try google business apps. So, I registered my business email address with Google. During registration, I gave Google access to my godaddy account and they edited my MX entries.

In my server /etc/postfix/, I added relayhost = and ran systemctl start postfix.service.

Back in Apps>Google Apps>Settings for Gmail > Advanced settings, I added both my IP4 and IP6 server addresses to the SMTP relay service setting.

It worked fine when I sent test emails through Concrete5, but not for email notifications when a form was filled and submitted. The log said that the email failed due to my IP not being registered with my Google apps account.

I tried many things. It turns out that the problem was the sender. The working test emails were sent with a concrete5-noreply sender, while the failing form notifications were sent with the web site admin email. I changed the web site admin email to match the Google app registration address, and it has worked.

It is not ideal to have my site admin email be the same as the google app registration, particularly as I add more domains. However, it gives me time to figure out how to edit my server configuration to work with my personal email. And, over the next year I can also learn more about setting up a free email server with decent spam filtering.

Any suggestions about editing my configuration are welcome.

The lesson I want to pass on is that if you use Google apps for email, it seems that you need to have your web site admin email address match the account registered with Google, at least if you want your web site to send any email notifications.

5 Replies

Just because you use Gmail for receiving mail doesn't mean you need to use it for sending mail. You could remove the relayhost configuration setting and just have Postfix directly deliver mail to its destination. You would want to set inet_interfaces = loopback-only so that Postfix would not accept mail from outside.

If you have reasons for relaying through Gmail, It's possible that's just the way it works, using your source IP address and forcing the From e-mail address to match the one you have registered. Have you set your smtpsaslpassword_maps in Postfix to use your username and password when sending mail? That might (or might not) change Gmail's behavior. (I don't use Google e-mail so this is mostly guesswork.)

Sending mail is the biggest reason why I am using google apps. I can use one of several accounts to receive email.

The only steps I took to set up sending email from my web server are outlined above.

Thank you kindly Vance for providing a couple of suggestions that will save hours of searching and possibly a year of subscription fees. Sending out limited emails and not receiving any on a web server seems much simpler than configuring an incoming email server. I have to travel later this month and google is working. If I get chance to try Postfix alone, I will let you all know.

By commenting out relayhost and making inetinterfaces = loopbackonly, I was able to make a send only server that works with my web pages. If I was smart enough to think of it earlier, I might have avoided signing up for google apps.

Now I have the choice of continuing to use google or doing this on my own. There are advantages and disadvantages either way.

I did not try setting smtpsaslpassword_maps. I'm not sure about sending a password for an sender account that is not registered with the apps. It might work to register the web site administrator and sender with the app account at google. Either that or I can have one administrator email for sender and admin for all of my sites and route emails to separate folders. That is all organizational preference. At least it is now working.

Glad it's working for you. It's not necessarily a waste of money to have Google receive e-mail for your domain, but as you noted this depends on your needs and preferences.

The way relayhost and smtpsaslpassword_maps works is identical to sending mail using a client like Thunderbird, Evolution, or Mutt. So if a particular Google configuration supports using your own mail client, it should also work with Postfix. (Subject to any of the same restrictions, e.g., From address.)

If you want to send outgoing via google apps I don't think you really need a full postfix relay, although I suppose there are some advantages to it (e.g. queuing up messages if google is unreachable for some reason). All you really need is a simple relay like ssmtp or nullmailer.

Just be aware of google app sending limits if you do use google SMTP for outgoing.

Using your own email server is (obviously) possible, but getting harder and harder as big providers put more controls into place to cut down spammers. You'll probably find you need to do more and more maintenance work over time. Thus, it might also be worth your time and money to check out some of the transactional email services like,, and


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct