The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Google Mail mysite.com while Server mail for m1.mysite.com

Discussion in 'E-mail Discussions' started by StringHalt, Jun 27, 2012.

  1. StringHalt

    StringHalt Registered

    Joined:
    Jun 27, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hello, first of all im glad to be here.

    Now, the doubt that i have is... since google apps free just has 10 accounts available, and i think i will need more accounts later, i want to know how to set google apps for my main domain lets call it mysite.com (i already setted it up and is workin)and let my default mail server (which come with my hosting service) for any subdomain like m1.mysite.com?

    The think is i can create "unlimited" mail accounts with my hosting provider, but i want to give to my top staff google app mail/

    Thank you in advanced
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You'll have to modify the MX records for the subdomain to use the the server you have for hosting, while the main domain MX records will use the google hosted ones. Something like the followig:

    Code:
    subdoman.domain.com. 14400 IN MX domain.com.
    Where subdomain.domain.com is the subdoman name and domain.com is the main domain name.
     
  3. StringHalt

    StringHalt Registered

    Joined:
    Jun 27, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Ok its done, thank you very much for you help and for your fast reply.
     
  4. grisales

    grisales Registered

    Joined:
    Sep 1, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    I have a lot of questions and doubts related to this.

    1st. Is this supossed to be done at cpanel level? because i only found it possible from the WHM and i hope i am not doing something wrong here. I say this because once i created the record from the WHM is not shown on the Advanced DNS from the cpanel or at the MX records screen.

    2nd. When i was creating the record at the WHM i found out that the email routing was set as remote and i didn't see an option to set the mysite.com as remote and m1.mysite.com as local so i let as it was but won't this cause any delivery conflict?
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    Subdomain records are contained in the zone file for the main domain. You weren't trying to create a subdomain record by itself that wasn't handled in the main domain's DNS zone file, right?

    As for the subdomain, since it would be local rather than remote, you'd need to set the entry in /var/cpanel/users/username file for that specific subdomain manually and not edit the mail field in the DNS zone. Here's what the entry looks like in /var/cpanel/users/username (where username is the cPanel account username):

    Code:
    MXCHECK-sub.domain.com=0
    For remote, it would have =remote and for local it would have =0. Please replace sub.domain.com with the subdomain's name.

    After doing that, then do the following commands:

    Code:
    /scripts/updateuserdomains
    mv /etc/localdomains /etc/localdomains.bak120903
    /scripts/mailperm
    I did the above on my test machine where I set these entries:

    Code:
    root@host [/var/cpanel/users]# grep -i mxcheck endar
    MXCHECK-endar.org=remote
    MXCHECK-happy.endar.org=0
    Then I ran the commands I mentioned previously and now the domains show up in the correct files:

    Code:
    root@host [/var/cpanel/users]# grep endar.org /etc/localdomains /etc/remotedomains
    /etc/localdomains:happy.endar.org
    /etc/remotedomains:endar.org
    Thanks!
     
Loading...

Share This Page