Hostname change on ISPConfig

Hostname change on ISPConfig

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:

/etc/dovecot/dovecot.conf
/root/.forward

You can do it automatically with sed, but I usually do it manually.

After executing newaliases, the binary file /etc/aliases.db is also fixed.

Find leftovers

Detect if there are still configuration files where old hostname or old domain is mentioned:

grep -r oldhostname /etc
date 12. Mar 2016 | modified 05. Oct 2024
filename: ISPConfig » Hostname Change