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.

All parked domains require zone file edit if primary domain has external mail server

Discussion in 'E-mail Discussions' started by spaceman, Dec 6, 2007.

  1. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    Let's say I have a primary domain, and 5 parked domains, and that my hosting server is authoritative for POP mail. I can use email domain forwarding in cPanel to ensure that any email sent to one of the parked domains is automatically redirected to the corresponding primary domain email address, e.g.

    bob@parkeddomainone.com > bob@primarydomain.com

    This is great because it means I don't have to create forwarders individually for each parked domain email address that I want forwarded to a primary domain email address.

    *BUT* what happens when the owners of the primary domain get themselves their own mail (e.g. Exchange) server?

    Well, firstly we have to modify the MX record(s) in the DNS zone file of the primary domain to point mail to the new mail server's IP address. All good, no problem. But what happens to all those lovely email domain forwarding instructions? Answer: they're neutered (rendered useless). My understanding is that, if a hosting account has an external mail server, then *all* cPanel functions relating to mail are rendered inoperable. (Actually - all the functionality remains, but settings/changes do not do anything - perhaps cPanel should put warning signs to this effect so that people don't beat themselves up wondering why it's not working?)

    So how do we get email sent to the parked domains to get to the external mail server? My understanding is that the only way to achieve this is to individually edit the MX records in all of the DNS zone files of the parked domains to point to the external mail server. Which is a bit of a pain! Does anyone know a better/quicker/easier way?
     
  2. betoranaldi

    betoranaldi Well-Known Member

    Joined:
    Dec 5, 2007
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    ... deleted
     
    #2 betoranaldi, Jan 4, 2008
    Last edited: Jan 4, 2008
  3. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    You're correct, and it is a pain, but you only have to do it once. What I do is set up the A record for the exchange server in their main account (eg: mx.domain.com, or exchange.domain.com) and then use that as the MX server everywhere else. You should actually use the WHM Edit MX functionality if you're not sure what you're doing as there are two steps which it takes care of.

    The first step is to edit the zone file correctly. Just make sure the A record for the exchange server is NOT "mail.domain.com" as that makes it less obvious to support people that the domain has it's own mail server.

    The second step is to remove the line(s) for the domain(s) in question from the /etc/localdomains file and insert those line(s) into /etc/remotedomains. This is critical as localdomains determines what domains Exim will try and process locally.
     
Loading...

Share This Page