Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

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

  1. spaceman

    spaceman Well-Known Member

    Mar 25, 2002
    Likes Received:
    Trophy Points:
    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. >

    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?
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. betoranaldi

    betoranaldi Well-Known Member

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

    brianoz Well-Known Member

    Mar 13, 2004
    Likes Received:
    Trophy Points:
    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:, or 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 "" 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.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice