cjoel
By:
cjoel

PHP mail form not relaying mail to Google Suite remote mail server?

August 7, 2017 464 views
Email PHP Security Applications Configuration Management DNS Miscellaneous CentOS

I have exhausted every option I can think of for setting up my remote mail server (G Suite), I've gotten support from Google, Cpanel and other sites with no help. Basically I have set up my Droplet from scratch (CentOS 7), configured my name servers, installed Cpanel/WHM, configured CSF firewall, installed an SSL certificate.. literally all of those things are set up properly and work just fine but I cannot for the life of me get Google Suite email to work with my PHP mail form on my website; it doesn't send the email successfully to Google's mail servers, I get the following error in the email logs: "The mail server could not deliver mail to example@yourdomain.com. The account or domain may not exist, they may be blacklisted, or missing the proper dns entries." I can send email just fine normally to and from the G Suite email, just not from the PHP form submission.

The domain is new and not blacklisted and the DNS entries seem correct.

Here is a list of everything I have tried:
1) Configure EXIM to work with G Suite
2) Configure Google's Admin settings to work with SMTP and my website's server
3) Disable firewall and test form
4) Change email for form to different service other than google
5) Configure DNS names including SPF, A, MS, etc.

What the problem might be (what I haven't gotten help for)
1) Configuring PHP (confused on what I need to do for CentOS 7 and Cpanel/WHM)
2) ??

At this point I may just give someone my credentials to login and see what I am missing.

Here are some guides I have already followed:

https://support.google.com/a/answer/2956491?hl=en

https://bobcares.com/blog/2-non-obvious-reasons-for-550-please-turn-on-smtp-authentication-error-in-cpanel-exchange-servers-and-what-to-do-about-them/

Please help

1 Answer

@cjoel

If disabling the firewall does not work (i.e. all ports are open), I'd create a new support ticket so we can check your account to see if there's an SMTP Block in place. From there, we can work with you to get that removed and then you can retest to see if that resolves the issue :-).

Have another answer? Share your knowledge.