If the cPanel server has been recently updated to version: 11.46, there are chances that an email alert with the content as shown below will be received:
=========
WHM has detected a manual hostname change.
To fix this problem, we recommend that you perform the following action:
Update your hostname in WHM (
http://new.hostname.com:2087/scripts2/changehostname) interface (Home » Networking Setup » Change Hostname).
=========
If the hostname had been changed, then that means that the hostname was updated outside of WHM after cPanel was installed on that server.
To fix the issue, one will have to manually change the cPanel-configured hostname by editing the HOST definition in /etc/wwwacct.conf:
-bash-4.1# hostname
new.hostname.com
-bash-4.1# grep HOST /etc/wwwacct.conf
HOST old.hostname.com
You will be able to see that the hostname that gets displayed while running the command: 'grep HOST /etc/wwwacct.conf' will be different to the one that gets displayed while running the command: 'hostname'. So, editing the HOST definition in /etc/wwwacct.conf file will fix the issue.
Once that’s done, one can test that the server will no longer send an alert by running the hostname validation script manually:
-bash-4.1# /usr/local/cpanel/scripts/check_valid_server_hostname
OK