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.

Primary & Secondary MX with 2 Cpanel boxes

Discussion in 'General Discussion' started by nickp666, Jan 17, 2006.

  1. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    Hey guys,

    I have my second cpanel server going in soon and a couple of my customers have asked for some form of MX failover.

    I've done some digging through the forums here and have only been able to find solutions to mail hosted elsewhere, not on two cpanel servers.

    having read through some posts on the above, would I be right in thinking adding both domains to remotedomains and removing from localdomains on both servers would simply be creating an indefinate routing loop with the 2 trying to send to each other permanently?

    (I can have users pull mail from pop boxes on the second server if it is ever used, doesnt need to be routed back to the first when it comes back up)

    also my other question is are there any further implications of having the same domain set up on two cpanel boxes that are DNS clustered? (only mail will be processed be the second server as a secondary mx incase box 1 goes down, no web traffic).


    any help on this would be greatly appreciated
     
  2. NT

    NT Well-Known Member

    Joined:
    May 4, 2004
    Messages:
    137
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    Hi,

    You can set the second server to queue email if server 1 goes down for any reason.

    You need to add an MX record for each domain (and keep the old MX record, so mail is still handled on server 1), then on the second server, add the domains to /etc/secondarymx.

    I don't know if this is what you're after, but it works quite nicely on my setup.
     
  3. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    really that simple? lol

    thanks for that
     
  4. MACscr

    MACscr Well-Known Member

    Joined:
    Sep 30, 2003
    Messages:
    190
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Nick, did that work out well for you? I cant believe its that easy. I have two cpanel boxes that i would love to do this with as as well. Guess i would just need to setup a cronjob to make sure the secondarymx folders are synced?
     
  5. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    Yeah it really is that simple, there are 2 ways of doing it: as originally discussed:

    remove the domain from /etc/localdomains and add it to /etc/secondarymx

    or use exim smartrouters (which is the way I do it, so that its sapm/virus filtered and then pushed on) there is a tutorial on the forums here by projectandrew for that (it is also on my site if you cant find it)
     
Loading...

Share This Page