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.

Redundant e-mail with CPanel??

Discussion in 'E-mail Discussions' started by hostserve, May 9, 2007.

  1. hostserve

    hostserve Well-Known Member

    Joined:
    Aug 25, 2006
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Good afternoon All,

    I've been sifting through the forums for about 4 hours now and just can't seem to find anything that really answers my questions:

    - We have 14 cpanel servers being used for hosting
    - We have 3 servers set aside as part of a DNS cluster

    and I'm looking for some e-mail redundancy.....

    As many people have said.. customers can accept that their website might be having an issue but e-mail is critical...

    I'd Like to add 3 servers to act as our redundant fail over mail servers.... what i'd like to do is figure put how to automate it so that all of the 14 hosting servers use the their own server as the primary mail server and if they are off line one of the other 3 servers queue's the mail to be delivered when the hosting server comes back online.

    Editing the MX records is the simple part... but how do I tell these 3 servers what domains can they queue mail for?

    I don't care it they are stand-alone servers or Cpanel servers.. its worth the money.. but It needs to be automated so that after a new domain is added to one of our servers (and is part of the DNS cluster) the secondary MX servers will know that they are able to accept mail for the domain.

    Is there anyone that can tell me in detail how to do this, or has anyone written a script to sync the "remotedomains" files off the servers and make them all one? I'd be willing to pay for this to be done.
     
    #1 hostserve, May 9, 2007
    Last edited: May 9, 2007
  2. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    I don't know how todo this myself, but would like to find out too
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    On a cPanel server it's simply a matter of adding any domains on the secondary MX server to the /etc/secondarymx file on that server and it will perform the backup MX functionality (i.e. hold email in the queue and forward to the primary when it becomes available).
     
  4. hostserve

    hostserve Well-Known Member

    Joined:
    Aug 25, 2006
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    Chirpy,

    Is there any other config that is needed..???

    in theory what you are suggesting sounds all too simple... :D with that being said, an extra cpanel license fee per month for the extra redundancy is totaly worth it.

    So... all I have to do is take one of my servers, configure it with Cpanel and fill /etc/secondarymx with the list of domains we want that server to handle mail for... and its off to the races...???

    Does it matter if the list of domains it has added to the secondarymx file are on more than one server? does it matter if the domains end location is a NON-CPanel server..??

    Does this work with CPanel 11 as well as 10 ???
     
  5. bazzi

    bazzi Well-Known Member

    Joined:
    May 23, 2004
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Yes it will simply work with cpanel11.

    We have made a php/mysql based script so every backup mail server will get automaticly new domains. But you also can just scp your localdomains file to the backup mailserver and add it to the secondarymx servers....

    Good luck!
     
  6. gdwebhosting

    gdwebhosting Member

    Joined:
    Nov 30, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I'm running cPanel 11 on all servers and im at a loss how to have cPanel include the domains in the secondarymx file on the redundant server automatically. Anyone help?

    It also means an extra MX record needs to be added automatically one would assume.
     
  7. bazzi

    bazzi Well-Known Member

    Joined:
    May 23, 2004
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    just make a database with the domains and let your backupservers every hour generate your secondarymx...
     
  8. ramprage

    ramprage Well-Known Member

    Joined:
    Jul 21, 2002
    Messages:
    667
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    Yeah I could script something for you custom. The easiest way would to be to grab all the active domains from your billing system like Modernbill.
     
  9. rejected

    rejected Well-Known Member

    Joined:
    Sep 19, 2006
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    0
    If you drop me a PM we could maybe work something out :).

    We have *clustered* every part of cPanel for stability and redundancy
     
  10. hostserve

    hostserve Well-Known Member

    Joined:
    Aug 25, 2006
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6


    PM Sent... Looking forward to hearing from you.
     
  11. rejected

    rejected Well-Known Member

    Joined:
    Sep 19, 2006
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    0
    Replied keep in contact via email I dont watch the thread's I subscribe to much or jump on efnet (IRC) I will be there :)
     
  12. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    After the DNS clustering cPanel integrated, clustering Mail Servers would be an awsome addition. And from what I see, implementation wouldn`t cause too many changes to the cPanel Structure.
     
  13. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    From what I understand from the developers, the groundwork for doing this was coded into 11 so that actually implementing it in 12 wouldn't be a monumental task. However, there are many things the developers have to take into account to ensure smooth seamless functionality customers would expect, hence this didn't make the cut for version 11.
     
  14. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    Well, thinking of your workflow that most users can see, I can imagine the works on email clustering is delayed :)
     
  15. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    How would the backup / cluster server know about new email accounts, account quotas, new domain, etc?
     
  16. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    Easiest ways : scp, rsync ... it`s not limited.
     
  17. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    To some great extend. Let's say a user forgot his password, and I / he / an admin resets it in cPanel, then he needs to wait for the rsync / scp conjob to have run (which could be every 15 minutes only) before using his email. I don't know if that'll work quite so lekker.

    On the other hand, if all of this was handled by a MySQL DB, and the two DB's were setup in a cluster, then it could be a "live transaction" taking place.
     
  18. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    Or there could be SSH keys involved. No authentification.
     
  19. Zeth

    Zeth Member

    Joined:
    Sep 6, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I would like to know more about this...

    Lets say I have 2 cpanel servers. One is the primary one the other is acting as the redundant (slave) mail server. The domains in localdomains are transfered to the redundant server and renamed to secondarymx. All domains need to have a second MX entry for the redundant server. When the primary server goes down, there is 50% chance that the mail gets delivered to the slave one (a la round robin style)? When the primary server comes up the mails are relayed to the primary server. Are the emails at this point still being scanned by spamassassin? This setup still wouldnt let the customers login to their mailboxes to send/receive mails if the primary one is down, right?
     
  20. expedio

    expedio Active Member

    Joined:
    Jun 30, 2007
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    We have designed failsafe cpanel clusters that mirror data in real-time across multiple servers and manage automatic failover in case of outage.

    You can use all mail addons and tools like Spamassasin and RBL lists and much more.
     
Loading...

Share This Page