On Tue, Sep 27, 2022 at 06:15:34PM +0000, Eddie Rowe wrote: > I cannot seem to get the Linux machine's domain name to be used, but > instead it is using "localdomain". I took over these duties from a > prior employee whose server was "almost ready" has the same issue. So > I created test VM and made the minimal changes from the NULL client > info shared on the Postfix site. I am using the current version of > Postfix that is available from my distribution. This is an internal > server for a single domain so nothing fancy. Just took the default > main.cf and changed the myorigin = $mydomain, mydestination = , > (nothing after the =), set the relayhost = $mydomain so it would use > MX, reloaded the configuration and even restarted the service. > > Running hostname -f shows the correct fully qualified domain that I > expect. So based on the information in the main.cf I think Postfix > should use the domain found there.
Your mistake is to use "hostname -f". Postfix uses the actual configured hostname, not some randomly canonicalised version that changes unpredictably. Either set the system hostname to the desired FQDN, or set "myhostname" in main.cf. > Running postconf -d myhostname returns the host.localdomain where the > host is the correct hostname, but localdomain is just the string > "localdomain" You need to configure a fully-qualified hostname, or set myhostname explicitly. -- Viktor.