• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Kulturmensch

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