Kulturmensch
Regular Pleskian
(My v-serer: Plesk Obsidian 18.0.34 Update #2, Ubuntu 18.04.5 LTS)
When I change the hostname in Plesk/Tools&Settings/server settings then the files etc/hostname, etc/mailname and etc/postfix/main.cf become changed to the new hostname (as expected).
But the "helo" in E-Mails managed by postfix uses the old hostname.
Connecting to the server via ssh shows the old hostname as prompt in the bash i.e. root@{old hostname}:~# and not root@{new hostname}:~#
In addition the command root@{old hostname}:~#hostname brings up the old hostname, too.
However the command hostname -b
root@{old hostname}:~#hostname - b {new hostname} solves this problem.
After doing this the command root@{old hostname}:~#hostname now shows the new hostname, also the transmitted helo by postfix is correct and in a new ssh-session the prompt becomes: root@{new hostname}:~#, too.
However, this solution only works until a reboot of the server and I have to set hostname -b [new hostname} again. Any idea how to set a new hostname permanent?
When I change the hostname in Plesk/Tools&Settings/server settings then the files etc/hostname, etc/mailname and etc/postfix/main.cf become changed to the new hostname (as expected).
But the "helo" in E-Mails managed by postfix uses the old hostname.
Connecting to the server via ssh shows the old hostname as prompt in the bash i.e. root@{old hostname}:~# and not root@{new hostname}:~#
In addition the command root@{old hostname}:~#hostname brings up the old hostname, too.
However the command hostname -b
root@{old hostname}:~#hostname - b {new hostname} solves this problem.
After doing this the command root@{old hostname}:~#hostname now shows the new hostname, also the transmitted helo by postfix is correct and in a new ssh-session the prompt becomes: root@{new hostname}:~#, too.
However, this solution only works until a reboot of the server and I have to set hostname -b [new hostname} again. Any idea how to set a new hostname permanent?