In my last email I did share that I tried setting myhostname in the main.cf to 
the FQDN that is returned by the above steps and there was no change as part of 
my troubleshooting.  After this I reloaded the configuration and even restarted 
the service and postconf -d myhostname is still wrong.

I am just baffled that /etc/hosts has the fully qualified domain name, the 
/usr/bin/hostname -f command gives the output that is FQDN...not a programmer 
so no idea how to see what the function that is documented does.


-----Original Message-----
From: owner-postfix-us...@postfix.org <owner-postfix-us...@postfix.org> On 
Behalf Of Viktor Dukhovni
Sent: Tuesday, September 27, 2022 1:28 PM
To: postfix-users@postfix.org
Subject: Re: Wrong Domain in Null Client Setup
...

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.

Reply via email to