Chris74 Posted November 8, 2013 Share Posted November 8, 2013 Hi I need someone to write me a script that can update some MX records on a cpanel server. This isn't my area of expertise and the guy that usually does this sort of thing for me is currently unavailable. Here's what I need... On a cPanel server there is a file that contains a list of local mail domain names, one per line. /etc/localdomains Files are listed as follows... mydomain.com yourdomain.co.uk theirdomain.net etc, etc I have set of DNS zone files in /var/named example... /var/named/mydomain.com.db /var/named/yourdomain.co.uk.db /var/named/theirdomain.net.db I need to identify all matching files in /var/named that match the domain names in /etc/localdomains and copy the zone files out to a new directory /root/named Then - for all files in /root/named I need to replace any instance of mx1.host.net. or mx2.host.net with the domain name corresponding to each file, ending in a period. e.g. in the filename "mydomain.com.db" the MX record hostname "mx1.host.net." will be replaced with "mydomain.com." It should do this for all files, using each files own filename before the "db" part, as the replacement for the old mx hostname. I already have a script that will update the zone serials. I just need the above script writing for me to replace the MX records. If someone can do this for a reasonable price then please let me know. Many thanks. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.