Still problems that break Postfix when changing network settings


We still run into problems when changing/saving settings in network config! This morning one employee added a DNS server and saved the changes, and this also made changes to Postfix... it removed the FQDN and added just the hostname breaking the mail traffic. I did realize this when I got back in the office in the afternoon! In other word - Our mail was down all day!

When this happens the mail routs back to it self! dsn=5.4.6, status=bounced (mail for HOST.DOMAIN.TLD loops back to myself) And I have addressed this bug/behavior many month ago, with other network issues.

Operating system CentOS 7.7.1908, Webmin version 1.941, Usermin version 1.791, Virtualmin version 6.08 Pro, Authentic theme version 19.45

Best regards, Leffe



Title: Still problems that break Postfix on when changing network settings » Still problems that break Postfix when changing network settings
Ilia's picture
Submitted by Ilia on Sat, 02/15/2020 - 07:44

Assigned: Unassigned »


Thanks for your feedback. I will pass this to Jamie for an overview.

If you go to Webmin -> Webmin Actions Log and find the action for changing the network settings, what modification does it show was made to the Postfix config file ?


Here is the action log.

Changed file /etc/sysconfig/network-scripts/ifcfg-em1

< DNS3=
< DNS2=
> DNS2=
< DNS1=
> DNS1=
< IPADDR=111.222.333.444
> IPADDR=111.222.333.444

Changed file /etc/resolv.conf

< # Generated by NetworkManager
< search domain.tld
< nameserver
> domain DOMAIN.TLD
> # Generated by NetworkManager

Executed command

hostname servertwo

Changed file /etc/sysconfig/network

> HOSTNAME=servertwo

Executed command

hostnamectl set-hostname servertwo

Changed file /etc/postfix/

< mydestination = $myhostname, localhost.$mydomain, localhost, servertwo.DOMAIN.TLD
> mydestination = $myhostname, localhost.$mydomain, localhost, servertwo
< myhostname = servertwo.DOMAIN.TLD
> myhostname = servertwo

Executed command

/usr/sbin/postfix -c /etc/postfix reload

This change the Postfix General settings What domains to receive mail for and Internet hostname of this mail system so that mail delivery breaks.

I guess FQDN and hostname is used in many other places and I don't know if other things get affected by this as well. And as I have said before, this behavior started AFTER I did my first change in network settings on a fresh install. At first there were no problem, I could do a restarts without any changes, but after the first change in network settings many things started to change and break after a server restart. Se my previous issue 66983.

Best regards, Leffe

I would guess that the problem is the changes to the myhostname and mydestination lines.

When you changed the hostname, did you remove the FQDN and just switch it back to a bare hostname?

Hi Jamie,

Do you mean about the changes shown in the log? If so, No, I did not touch that, the only thing I did was changing DNS Servers.

But in Network "Configuration" and "Hostname and DNS Client" the "Hostname" just holds the hostname part. All these settings did get changed after the first time I hit "Save" and "Apply Configuration" there. The "Hostname" field at first after the install held the full FQDN, but after save/apply that it changed to just the hostname, and I did change that to FQDN again but it changed back to just the hostname part again. The field requires the hostname and to be fair, that would be just the hostname part not the FQDN so I have left it at that!

What I mean is, did you intentionally remove the FQDN when editing the hostname, or did Virtualmin do that without you asking for it?


I did not change the hostname at all, I just changed DNS-Servers - Nothing else! The other settings did Virtualmin change without any notification at all.