Redundant e-mail with CPanel??

hostserve

Well-Known Member
Aug 25, 2006
51
0
156
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.
 
Last edited:

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,462
25
473
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).
 

hostserve

Well-Known Member
Aug 25, 2006
51
0
156
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 ???
 

bazzi

Well-Known Member
May 23, 2004
119
0
166
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!
 

gdwebhosting

Member
Nov 30, 2006
6
0
151
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.
 

bazzi

Well-Known Member
May 23, 2004
119
0
166
just make a database with the domains and let your backupservers every hour generate your secondarymx...
 

bin_asc

Well-Known Member
Jul 18, 2005
280
0
166
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.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
10
313
Houston, TX
cPanel Access Level
Root Administrator
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.
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.
 

bin_asc

Well-Known Member
Jul 18, 2005
280
0
166
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.
Well, thinking of your workflow that most users can see, I can imagine the works on email clustering is delayed :)
 

SoftDux

Well-Known Member
May 27, 2006
1,024
5
168
Johannesburg, South Africa
cPanel Access Level
Root Administrator
Easiest ways : scp, rsync ... it`s not limited.
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.
 

Zeth

Member
Sep 6, 2004
8
0
151
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?
 

expedio

Active Member
Jun 30, 2007
36
0
56
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.