[FORUMS-86] How to configure gsuite split delivery with cPanel?

digitaledge

Member
Aug 1, 2019
6
1
1
Kentucky
cPanel Access Level
Website Owner
Hello,

New to the forum here for cPanel and really hoping that someone can assist me with a workaround. To give some background my company is using hosting for a VPS and we have cPanel where a lot of our company emails are being utilized. We had some situations where emails we sent to our clients was being delivered to junk or spam and on a daily basis, we receive hundreds of emails. To try to find a better solution we left our staff emails on the hosting company with cPanel and moved our main business email accounts over to G Suite. We have 1 account now on G Suite with about 15 different aliases we utilize for different parts of what the business does on a daily routine. Upon doing this action and moving MX records to G Suite I broke how the staff would receive email and it no longer worked. Working with Google I was able to successfully set up Split Delivery and now the staff can receive email from outside sources (Gmail, Yahoo, etc.) and reply to those emails without any problems at all. The main issue I am facing now that I could use the help on is I am unable to email my staff from G Suite. If I email them it gets bounced and says the user cannot be found. Working with G Suite now for over 2 weeks and the hosting company as well with no much success. I heard that there used to be a workaround however I have not had much luck. I was sent a set of instructions from 2016 from the hosting company that is still a thread here from 2016 but after following those steps still no luck. Any help someone could offer to fix this for me would be most appreciated.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello :)

We had some situations where emails we sent to our clients was being delivered to junk or spam and on a daily basis, we receive hundreds of emails.
That's unfortunate. Were you able to pinpoint any potential causes? Our How To Keep Your Email Out of the SPAM Folder knowledge base article provides some general guidelines to follow to prevent this from happening.

Upon doing this action and moving MX records to G Suite I broke how the staff would receive email and it no longer worked.
Do you have more information or specific errors noted from when this happened (prior to enabling Split Delivery)? Sometimes it's just a matter of verifying that Remote Mail Exchanger is enabled in cPanel >> Email Routing for the domain you updated the MX records on. This lets the cPanel & WHM server know that your email service is hosted on a remote mail server, and that local email deliveries should be routed externally.

I was sent a set of instructions from 2016 from the hosting company that is still a thread here from 2016 but after following those steps still no luck.
Working with Google I was able to successfully set up Split Delivery and now the staff can receive email from outside sources (Gmail, Yahoo, etc.) and reply to those emails without any problems at all. The main issue I am facing now that I could use the help on is I am unable to email my staff from G Suite. If I email them it gets bounced and says the user cannot be found.
I'd like to get a better understanding of the steps you followed. Can you confirm if you are referring to thread 209402 ? Additionally, can you share the step-by-step instructions you've followed thus far along with the version of cPanel & WHM installed on your server and an example the specific error message you are seeing?

Thanks!
 
Last edited:

digitaledge

Member
Aug 1, 2019
6
1
1
Kentucky
cPanel Access Level
Website Owner
Thank you so much, Michael! This is what was provided to me as a workaround from my hosting company but it did not help any at all.


I look forward to your reply.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
In cPanel >> Track Delivery do you happen to see Too many "Received" headers - suspected mail loop on the Result line for one of the failed emails? If so, browse to cPanel >> Email Routing and try setting it to Backup Mail Exchanger to see if that helps.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Here's another potential solution shared by one of our Technical Analysts in a support ticket:

After reviewing the steps here:
https://forums.cpanel.net/threads/google-apps-split-delivery-for-domain.209402/#post-2260661

It seems as though this would work better instead of this for step 2:
=====================
2. there must be a subdomain CNAME (gapps.domain.com) as alias of root domain (domain.com), this will be used to deliver mail sent through cPanel or its SMTP;

=====================

You were to do the following:
2. Create a subdomain gapps.domain.com using the Subdomains icon in cPanel
2.1 Update the routing for gapps.domain.com to be Remote using the Email Routing icon in cPanel
2.2 Update the MX records for gapps.domain.com to use the google apps MX records using the Zone Editor icon in cPanel

Then you should be able to use the other provided steps as indicated in the forum post. This modification to step two will tell the cPanel server to route the messages to the google server, and the routing rules at the google server will take care of the rest for you.
Is this helpful?
 

digitaledge

Member
Aug 1, 2019
6
1
1
Kentucky
cPanel Access Level
Website Owner
In cPanel >> Track Delivery do you happen to see Too many "Received" headers - suspected mail loop on the Result line for one of the failed emails? If so, browse to cPanel >> Email Routing and try setting it to Backup Mail Exchanger to see if that helps.

Thank you.
Most of the errors I am getting when emailing from G Suite to our email accounts on cPanel is,
No Such User Here

and from G Suite it would report.


Bounced
Google tried to deliver your message, but it was rejected by the relay. The error that the other server returned was: 550-Verification failed for 550-No Such User Here" 550 Sender verify failed
 

digitaledge

Member
Aug 1, 2019
6
1
1
Kentucky
cPanel Access Level
Website Owner
Here's another potential solution shared by one of our Technical Analysts in a support ticket:



Is this helpful?
I am getting lost on this step if it even will help.

2.2 Update the MX records for gapps.domain.com to use the google apps MX records using the Zone Editor icon in cPanel

Does this mean that I go into Cloudflare and add new MX records on top of the ones already there for our domain for the G Suite setup?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
I am getting lost on this step if it even will help.

2.2 Update the MX records for gapps.domain.com to use the google apps MX records using the Zone Editor icon in cPanel

Does this mean that I go into Cloudflare and add new MX records on top of the ones already there for our domain for the G Suite setup?
Hello @digitaledge,

I apologize for the confusion. Integration assistance with third-party solutions such as Google's G suite split delivery functionality falls outside our support scope, so confirming the specific setup instructions involves some trial and error. Once you confirm it's setup properly, I'll update the official workaround instructions to ensure they are a little easier to understand.

To clarify, the advice quoted from the support ticket is suggesting the following change to the instructions in the linked post:

I have managed to get the system working on split delivery.

For anyone wanting to achieve split delivery with Google Apps and cPanel on a shared hosting environment, these are the steps:

1. root domain (domain.tld) must have MX records pointing to Google's MX servers;
2. Create a subdomain named "gapps.yourdomain.tld" using the Subdomains icon in cPanel.
3. Update the email routing setting for "gapps.yourdomain.tld" to Remote Mail Exchanger using the Email Routing icon in cPanel.
4. Update the MX records for "gapps.yourdomain.tld" to MX records suggested by Google using cPanel >> Zone Editor. If the DNS records are hosted on a remote server, then you should also create MX records for "gapps.yourdomain.tld" at domain's DNS hosting provider (e.g. CloudFlare).
5. there must be another subdomain (in addition to gapps.yourdomain.tld) CNAME (cp.domain.tld) as alias to the cPanel hosting server (in my case, HostGator's server br###.hostgator.com.br, masked for example purposes);
6. Google Apps Split Delivery must be correctly configured (Configure split delivery - Google Apps Administrator Help), with the subdomain described in step #5 as the destination (step 7 on this page);
7. on cPanel, use Local Server as the setting on the MX Records page for the root domain (e.g. domain.tld);
8. on cPanel, set a Domain Forwarder with "from: domain.tld" and "to: gapps.domain.tld";
9. on Google Apps, set a default route to change envelope recipient of all mail that corresponds to the REGEXP "\[email protected]" with the "Replace Recipient" setting, set to the "[email protected]" option.

These are the steps I took to manage the desired outcome of split delivery without having users on the cPanel side that can't reach the users on the Google Apps side.

If anyone have any questions feel free to ask for help.
Thank you.
 
Last edited:

digitaledge

Member
Aug 1, 2019
6
1
1
Kentucky
cPanel Access Level
Website Owner
Hello @digitaledge,

I apologize for the confusion. Google Split Delivery is an unsupported for use with cPanel & WHM so getting it to work will involve some trial and error. Once you confirm it's setup properly, I'll update the official workaround instructions to ensure they are a little easier to understand.

To clarify, the advice quoted from the support ticket is suggesting the following change to the instructions in the linked post:



Thank you.
I just wanted to let you know I followed all the steps you provided and as of now, everything appears to be working fine. I really appreciate the help ;)
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
I just wanted to let you know I followed all the steps you provided and as of now, everything appears to be working fine. I really appreciate the help ;)
No problem, and thanks to you for helping test those workaround instructions! I'm marking this thread as In-Progress and attaching it to internal case number FORUMS-86. We'll switch the thread prefix over to SOLVED once the updated workaround instructions are published to our Resources section.

Thanks!
 

adamcanderson

Registered
Aug 16, 2019
2
0
1
mesa, az
cPanel Access Level
Website Owner
Can you please help? I'm trying to set up split delivery with GSuites and my domains. I've tried to follow the instructions above. I have the gapps sub set up but had no option to configure MX files. I have a cp sub set up, but couldn't set it as an alias. I have the route set to the cp sub for a pattern matching my domain on non recognized addresses. Right now, on emails sent from the domain or not, I get an error that 550 SMTP AUTH is required on port 587. That's the port in motion gave me. please help.
 

JoelA

Registered
Aug 21, 2019
3
0
1
Earth
cPanel Access Level
Reseller Owner
Hello @digitaledge,

I apologize for the confusion. Integration assistance with third-party solutions such as Google's G suite split delivery functionality falls outside our support scope, so confirming the specific setup instructions involves some trial and error. Once you confirm it's setup properly, I'll update the official workaround instructions to ensure they are a little easier to understand.

To clarify, the advice quoted from the support ticket is suggesting the following change to the instructions in the linked post:



Thank you.
Michael,

Having problems of my own with split delivery and trying to follow these instructions you quoted from Lucas Mentz. In step 6 you clarify by referencing step 7 on this linked page: Configure split delivery - G Suite Admin Help
That page is now obviously changed as there are no steps so I'm not sure what the reference was and what to clarify.

My problem is somewhat different to OP but quite related.
I moved 4 users from cpanel mail to gsuite but maintain some forwarders on teh cpanel. When mail gets sent to one of these forwarders, and the target is one of the gsuite users, depending on whether cpanel is set as local mail exchanger or remote mail exchanger I either get 550 SMTP errors or cpanel accepts the message but instead of routing the mail to the gsuite box as it should (and where my mx record points), it forwards the mail to the user's old (deprecated but existing) mailbox on cpanel.

Figured the above setup could help but not following every step and missing the linked clarification isn't helping.
 

sweekeong81

Registered
Aug 27, 2019
2
0
1
Malaysia
cPanel Access Level
Root Administrator
Hi,

1. root domain (domain.tld) must have MX records pointing to Google's MX servers;
4. Update the MX records for "gapps.yourdomain.tld" to MX records suggested by Google using cPanel >> Zone Editor.
Question 1) Do (1) & (4) mean pointing to the same Google mail servers as mentioned here ( cPanel: Set up G Suite MX records - G Suite Admin Help )?

ASPMX.L.GOOGLE.COM.
ALT1.ASPMX.L.GOOGLE.COM.
ALT2.ASPMX.L.GOOGLE.COM.
ALT3.ASPMX.L.GOOGLE.COM.
ALT4.ASPMX.L.GOOGLE.COM.


---
5. there must be another subdomain (in addition to gapps.yourdomain.tld) CNAME (cp.domain.tld) as alias to the cPanel hosting server (in my case, HostGator's server br###.hostgator.com.br, masked for example purposes);
6. Google Apps Split Delivery must be correctly configured (Configure split delivery - Google Apps Administrator Help), with the subdomain described in step #5 as the destination (step 7 on this page);
Question 2) Is cp.domain.tld supposed to input into this Change Route option, assuming this is the updated link ( Email routing and delivery - G Suite Admin Help )?

Email routing and delivery > Route messages using split delivery
6. Select Change Route, select the external server from the list, then scroll down and click Save.
---
Question 3) I don't understand what cp.domain.tld actually do, does cp.domain.tld relate to default route mentioned in step 9?
9. on Google Apps, set a default route to change envelope recipient of all mail that corresponds to the REGEXP "\[email protected]" with the "Replace Recipient" setting, set to the "[email protected]" option.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello Everyone,

Thanks for sharing the additional questions and feedback. Internal case FORUMS-86 remains open to provide more precise workaround instructions. I don't have a firm ETA to offer on the publication of the updated instructions at this time, but I'd like to ensure I am testing under similar conditions when the time comes. To help with this, please share answers to the following questions:

1. Is your access limited to cPanel, or do you have full root access to the cPanel & WHM server?
2. What's the primary intent and value of setting up GSuite Split Delivery with your cPanel account?
3. What are the step-by-step instructions you are using to test the success of the workaround instructions?

Thanks!
 

psytanium

Well-Known Member
Jun 6, 2014
333
21
68
Lebanon
cPanel Access Level
Root Administrator
Hello,

Recently I configured a G Suite routing in cPanel, with a split delivery configured in G Suite dashboard.

I'm receiving and sending emails now using Gmail, but if I send a mail from any domain name on the same server, the emails are still going to Webmail, I waited 1 week just in case of DNS propagation but still nothing changed.

Any idea ? Thanks
 

quietFinn

Well-Known Member
Feb 4, 2006
1,894
463
438
Finland
cPanel Access Level
Root Administrator
That happens if the domain of that email is in /etc/localdomains

If the domain is in that file Exim is not checking domain's MX records, but instead is ending the mail locally.

If you have root access remove the domain from /etc/localdomains and add it to /etc/remotedomains
 

psytanium

Well-Known Member
Jun 6, 2014
333
21
68
Lebanon
cPanel Access Level
Root Administrator
That happens if the domain of that email is in /etc/localdomains

If the domain is in that file Exim is not checking domain's MX records, but instead is ending the mail locally.

If you have root access remove the domain from /etc/localdomains and add it to /etc/remotedomains
You mean I only remove 1 domain ? the domain which is subscribed to G Suite ?