• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Jürgen_T

Regular Pleskian
After upgrading my V-Server to Ubuntu 20.04.3 LTS + Obsidian I spent some time on the "permanent hostname" issue again. Changing the "hostname" in Plesk did not survive a reboot at all as the necessary files etc/hostname and etc/mailname got kept but etc/hosts got the original content again.

Using the commad after reboot "hostnamectl" shows what happend:

Static hostname: <my changed name.de>
Transient hostname: <the old name>
Icon name: computer-container
Chassis: container
Machine ID: a57c314212ae183afdaddcf3852191c
Boot ID: 2a5a3619ddcc11cf2dc44322acffc
Virtualization: openvz
Operating System: Ubuntu 20.04.3 LTS
Kernel: Linux 5.4.0
Architecture: x86-64

So, the problem occured, that amavis-new was using the <old name> in the E-Mail header i.e. for Authentication-Results and also for the helo/Ehlo in parallel to the usage of <my changed name.de> for other header entries. Obviously not optmal.

My workaround is to start a skript on reboot (crontab, user: root) with the following content:

<Start skript>
#!/bin/bash
cp /etc/my.hosts /etc/hosts
cp /etc/my.hostname /etc/hostname
cp /etc/my.mailname /etc/mailname
hostnamectl set-hostname <my changed name.de>
sleep 1
../etc/init.d/amavis restart
<End skript>

where my.hostname, my.hosts and my.mailname contain the "right" contents and the command hostnamectl set-hostname <my changed name.de> make the difference to earlier approaches.

Having done this the commad "hostnamectl" does not shows a Transient hostname any longer and amavis produces the right e-mail header entries.

If there are better solutions please let me know.
 
Back
Top