cPanel: Mass Updating Hostmaster Email Addres

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 and we want to change it to, the command would be.

replace "" "" -- /var/named/*db

That will only change the zones that match 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

  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

cPanel: Running a ClamAV and Maldet scan

You may be familiar with ClamAV and Maldet (aka Linux Malware Detect). They're widely known as...

cPanel: What is mysqluserstore?

On cPanel servers, you may come across the process...

cPanel: Installing the LiteSpeed plugin

If your server is running cPanel/WHM, simply execute the below commands via SSH (as root):wget...

Changing the timezone

If you're like us, you'll want your server's timezone to match your local time to make log...

Finding the largest files and directories

This nifty command allows you to built up a list of the largest files and...