Hello to everybody, as maybe you remember, I've setup 2 mailserver with a master-master replication of mysql and /var/vmail (with glusterfs). Now that the configuration is finished, I've to setup the DNS. The idea is: from the webpage of my ISP, I'll setup the DNS with 2 priorities, the first one for the master server, the second one for the backup server, so that if the master server is down, the backup server will be the master one. What I have to setup in ISPConfig to finish this configuration? Thanks Michele
I'm completly lost with DNS parameters... This is what I;ve already done: On the webpage of my ISP, I've pointed the domain test.com to my 2 servers, as primary and secondary name server. (SRV1 and SRV2) Now it's the time of ISPConfig. What I want is this: the email must be read ad mail.test.com This link must point to SRV1/roundcube and, as second option, to SRV2/roundcube, so that is SRV1 is down, the customers can read the email from the SRV2. Of course the priority is a business of my ISP. Now, how can I setup ISPConfig to have : ON SRV1: mail.test.com -> SRV1/roundcube and ON SRV2: mail.test.com -> SRV2/roundcube ??? Thanks Michele
Create two dns A-Records for mail.test.com, one that points to IP of server one and one that points to the IP of server 2. then create a website mail.test.com on every server and install roundcube in it. Every roundcube installation shall connect to the imap server on localhost.
Thanks a lot Till for your suggestions. At the moment I'm having a problem with priority of the domains... my ISP (1&1) look like don't give me the possibility to setup 2 servers for a DNS with prioritities... so now I've the problem how to setup DNS in the way that, when SRV1 is down, the DNS will be connected with SRV2... Any idea? Thanks again Michele
Ok I find the way to setup two name servers dor the DNS with 1&1, but now the problem is that there is no priority (randomly the DNS is pointing to SRV1 and SRV2). This is a problem because, for example, is I'm reading a webmail to srv1 and after 2 minutes I refresh the page, maybe the DNS will be pointed ti SRV2 and I've to autenthicate again...
This is the point: once that I've created two dns A-Records for mail.test.com, one that points to IP of server one and one that points to the IP of server 2, I'll have a round-robin DNS, and it's fine. The problem is: even if I'll setup a cache limit that decide when DNS will skip from SRV1 to SRV2, what will happen if somebody is reading his email on SRV1 and in that moment DNS will skip to SRV2? The customer will have to logon again... Somebody knows a solution for this problem? Sorry if I'm posting a lot, but I've almost finish my installation and I would like to complete it to see the final result... Thanks Michele
I recommend that you just try it. Do you expect that your clients keep up sessions open for days or weeks? If thats really an issue for you, you might need to install a failover and session aware loadbalancer. Falko has published some howtos on these topics here on howtoforge.
Thanks I will look into them. Not days but at least a few hours (business hours). If I set the TTL to 9 hours though then I could in theory have 9 hours of downtime which is too high.
Just checked those articles but unfortunately I haven’t got access to any virtual IPs or more then 2 servers
Ok this is the solution that I've found: - I've added in my mysql master-master replication of the mail tables also the part of the database regarding the dns. - I've create a bash script that is running on SRV2 and that basically ping the SRV1 and, after 20 ping failed, will update in the dbispconfig: Code: "UPDATE dns_rr SET data = 'IP_SRV2' where data = 'IP_SRV3';" I've tested it and it's working. During this test I've setup this DNS Zone Values: Refresh = 60 Retry = 600 Expire = 604800 Minimum = 60 TTL = 60 Now it's time to find the right values for this configuration. I was reading what does this values means and I found something here: http://www.interworx.com/support/docs/iworx-cp/sysadmin/system-services/dns/howto-zone-defaults Any suggestion? thanks Michele