Changing Domain Name Does Not Update Postfix $myhostname

2 posts / 0 new
Last post
#1 Thu, 10/12/2017 - 00:04
micster

Changing Domain Name Does Not Update Postfix $myhostname

When changing a virtual host's domain name, the "Internet hostname of this mail system" field within the Postfix Mail Server Module is not updated.

According to the help tool-tip popup, I believe this field sets the "myhostname" value within Postfix.

The "myhostname" remains the same as the old domain even though all of the email alias and accounts have been updated to the new domain.

While I am able to send and receive email, the headers list the erroneous old domain name which I believe will cause problems in the future.

I also noticed that the field "What domain to use in outbound mail" which seems to set the "myorigin" value within Postfix is currently set to the third option, an input field with the value of "/etc/mailname". The contents of this file also list the erroneous old domain name.

Is this the expected behavior?
Are the Postfix configuration files and the contents of "/etc/mailname" suppose to be updated when I change a domain's name?
Is there a way to set the General Options for the Postfix Mail Server Module upon installation?

Thu, 10/12/2017 - 10:30
Joe
Joe's picture

"Is this the expected behavior?"

Yes. myhostname is for the hostname of the system and has nothing to do with virtual hosts (and should have nothing to do with virtual hosts). Virtual hosts are set in the virtual map file (/etc/postfix/virtual).

"Are the Postfix configuration files and the contents of "/etc/mailname" suppose to be updated when I change a domain's name?"

No. Domains are not supposed to affect the system-wide Postfix configuration. All virtual hosts are handled in various map files for Postfix.

"Is there a way to set the General Options for the Postfix Mail Server Module upon installation?"

What options are you wanting to set? Our installer sets several options, but mostly relies on the system settings, like hostname, being correct. If you're having problems with myhostname or mailname make sure you've got a correct fully qualified domain name before installing Virtualmin. Those things generally work themselves out automatically when your network, hostname, etc. are right. Debian/Ubuntu complicate it somewhat by adding (unnecessary and error-prone) extra configuration files, but those should end up right if your FQDN is right. I think. If there are issues, let's talk about why they aren't right automatically, rather than how to change them in an extra process.

--

Check out the forum guidelines!

Topic locked