On 26 8 2004 at 12:00 pm -0400, Jerry Amundson wrote: >This way, if the Internet goes down at either site, only Internet e-mail >at that site is affected, whereas, currently, Internet downtime creates >many problems (of course).
I am actually working on something similar. >Crazy? Perhaps, but rsync'ing shouldn't cause any problems because of >the unique file names, and it's --delete option should preserve the >Maildir structure across to the "mirror" server, right? Yes and no... you'll have to be careful with this such that you don't wipe out good messages on the wrong server. In principle here is how my in-progress system works: Two machines are both configured very similarly in terms of courier conf, users and their maildirs. Both serve authoritative DNS as well, and each is listed as MX. One server is designated "primary" and the other "secondary". Each is set up with the domain(s) in esmtpacceptmailfor. The primary has hosteddomains set accordingly and empty esmtproutes, while the secondary has hosteddomains empty and esmtproutes set to shunt all mail to the secondary. Given the above, all mail ends up on the primary server (though there are two functioning MXes). A cron job runs on both machines which causes them to speak to each other (via sockets and perl script) on a regular basis, e.g. every couple of minutes. This ensures functional connectivity for both hosts, and also runs an rsync --delete from primary to secondary once in awhile to keep the secondary updated as a mirror. If it is determined that one machine is down, the operating machine takes on role as "primary" (regardless of its current role) and reconfigures hosteddomains/esmtproutes and thus begins collecting mail locally. Eventually, once the other host comes back online, a bi-directional (non- 'delete') rsync is performed to mirror the maildirs, then both machines resume their de facto configurations. Using this approach, either machine can fail and no service is lost. The worst to happen is that some mail may be delivered in duplicate (mail deleted during the outage might re-appear, due to the recovery rsync). Comments on this design are welcome. (FWIW, I am developing this suite of scripts and site management tools for gentoo linux, if anyone is interested.) -ben -- Ben Kennedy, chief magician zygoat creative technical services 613-228-3392 | 1-866-466-4628 http://www.zygoat.ca ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ courier-users mailing list [EMAIL PROTECTED] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
