There is an easy way to to change a hostname on already installed ISPConfig server, but ih includes a couple of additional steps.
The basic operation of hostaname change is in these steps: ISPConfig > System > Server Config and change Hostname
I also change a server name, as I usually set it to be the same as hostname: ISPConfig > System > Server Services and change Servername.
By doing this, files that get auto-updated by ISPConfig are:
/etc/postfix/main.cf /etc/hostname /etc/mailname /etc/hosts
We still must change the following files:
You can do it automatically with sed, but I usually do it manually.
newaliases, the binary file
/etc/aliases.db is also
Detect if there are still configuration files where old hostname or old domain is mentioned:
grep -r oldhostname /etc