I think you want to be using MX records, rather than A records to point to your mailhost systems, those records allow you to specify a priority, the higher priory system (I believe the lower numeric value, but look it up) getting the mail if available, else working through the list of available mailservers.
I have scripts that will pretty much do what you are looking for (hint, SED, template zone file run through # sed) but I think that doing so would be completely unnecessary for you. On Mon, Nov 25, 2013 at 01:55:53PM +0100, Pawe? Ch. wrote: > Hi list, > > I would like to write script that change two entry in my zone file: SOA and > A record. > > I have 2 web site: mail site site1.tld and backup site site2.tld. Script > should monitor site1.tld and when site is unavailable it should change A > record in zone file to indicate to site2.tld. If site1.tld is available > again then A record should indicate to it. > Script should change SOA serial number. > > Please help with writing a script. > > pch0317 > _______________________________________________ > Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe > from this list > > bind-users mailing list > bind-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/bind-users --- Brian R Cuttler brian.cutt...@wadsworth.org Computer Systems Support (v) 518 486-1697 Wadsworth Center (f) 518 473-6384 NYS Department of Health Help Desk 518 473-0773 _______________________________________________ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users