email configuration with Google Apps

zomtek

Registered
Dec 4, 2014
3
0
1
cPanel Access Level
Root Administrator
Hi,
Hope someone can help me with this...
We have entered Google for Works and have our mail going to Google. That is, only half of the email adresses have accounts with Google. I have changed the DNS settings at the domain registration, to point to Google's MX records. In Google Apps I have set up that mail recieved from unknown addresses (so it's pointed to a address that hasn't got an Google Apps account) will be send to the server.

This all goed well, untill a user not in Google Apps sends a mail to a user that is in Google Apps. This mail is delivered local directly, so without taking in account the MX records set at the domain. So, the mail will not be received in Google Mail.

So, my question is: is there a way to make sure sent mail is always being send out, (so the MX settings are working) and not instantly locally delivered if send to a receiver of the same domain?
For now, i have set up a forwarder to a Google alias so the mail will be forwarded, but I think there must be a better way?

thanks for any advice.
-Edwin
 

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter
Re: email conficuration with Google Apps

Hello,

I think you have not setup correctly setup "Email Routing" for your domain and due to that you are getting this issues, You will have to select "Remote Mail Exchanger " in Email Routing section. You can check this through cPanel >> Mail >> MX Entry >> Email Routing
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Re: email conficuration with Google Apps

Hello :)

You can modify the email routing settings for the domain name via "WHM Home » DNS Functions » Edit MX Entry". Choose "Remote Mail Exchanger" if email for the domain name is handled on a remote mail server.

Thank you.
 

zomtek

Registered
Dec 4, 2014
3
0
1
cPanel Access Level
Root Administrator
Re: email conficuration with Google Apps

Hi,
thanks for answering, however, I have tried the MX settings with Remote Mail Exchanger. The problem is, if I use that, the people that don't use Google Apps don't receive any mail anymore. No mail is locally delivered then.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Could you elaborate on how you have configured your MX records and Exim to deliver some mail locally and other mail remotely for the same domain name? This is not a standard configuration that typically works by only modifying the MX records.

Thank you.
 

zomtek

Registered
Dec 4, 2014
3
0
1
cPanel Access Level
Root Administrator
Configuration is done in the DNS of the domain registration party (not in Cpanel). Here I added the MX records for Google:

Priority Mail Server
1 ASPMX.L.GOOGLE.COM.
5 ALT1.ASPMX.L.GOOGLE.COM.
5 ALT2.ASPMX.L.GOOGLE.COM.
10 ASPMX2.GOOGLEMAIL.COM.
10 ASPMX3.GOOGLEMAIL.COM.

Then, in Google works admin, I have set a rule for incoming mail: if mail is received for a non-user, change route to the other server: mail.mydomain.com

This all works splendid, mail for non-users of the domain is received on the domain. Trouble starts if a non-user (not using gmail) sends a mail to a user of the same domain, that *is* using the Gmail Works. Servers thinks, ha, user of the same domain, so delivers the mail directly, locally. So the MX records are not checked and the mail is never sent to Google.

For now I have tackled this situation by adding forwarders in cpanel for the Google Work users, pointing to aliases of their mail accounts in Google, so the mail is received.
But, I was wondering if there is a way to have cpanel always checking the MX records so the mail is first sent to Google, before immediately delivered locally.

I understand it's an odd situation, but it isn't really for all the companies that use Google Apps, isn't it? You don't want to force all employees into Google Apps just because they have an email address for the domain, do we?
I have discussed this with the Google helpdesk and while they are very helpfull, in this case it's just "hey, this is your server doing this, we can't help you".
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
It's likely you will need to implement some type of custom Exim ACL rule to allow for the behavior you are seeking. It's not a standard setup to have email handled both locally and remotely for the same domain name.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
You might be able to implement a custom Exim ACL, so you may want to post the Exim users mailing list to see if any other users have a similar configuration:

Exim Users Mailing List

Thank you.
 

asmithjr

Well-Known Member
Jun 13, 2003
516
8
168
Not sure If I should start another thread or put my question here. But here it goes.

We are considering making the move to google apps to bring our calendars, and inter office communication into one platform. My questions is for anyone that has already made the email transition to google. Were you able to transfer your folders and email sorting to google, or did you have to recreate and re-sort your old email files to new folders within google after the transition?