cPanel: Mass Updating Hostmaster Email Addres Print

  • 52

Currently, there is no built in way to update the hostmaster email address for every DNS zone on the server with cPanel/WHM provided tools/scripts. There is, however, a way to change the email address manually, which does require basic SSH knowledge.

Firstly, please make sure to backup /var/named:

cp -ax /var/named /var/named_backup

In this example the existing address in the zones are admin@domain.com and we want to change it to george@domain.com, the command would be.

replace "admin.domain.com" "george.domain.com" -- /var/named/*db

That will only change the zones that match admin.domain.com in this case.

The serials and zones also need to be updated, to do so, please run:

find /var/named/*.db -mtime -1 -exec perl -pi -e 'if (/^\s+(\d{10})\s+;\s+serial/i) { my $i = $1+1; s/$1/$i/;}' '{}' \;
rndc reload


Was this answer helpful?

« Back


Ethernet Servers Ltd
124 City Road
London
EC1V 2NX
United Kingdom


Registered Limited Company: #09114946

Telephone:
+44 330 043 1258

Email:
hello@ethernetservers.com

Copyright © 2014 - 2024 - Ethernet Servers Ltd - All Rights Reserved.

Proudly serving customers in 143 countries since July 2014!