On September 27, 2022 10:16:40 PM GMT+02:00, Eddie Rowe 
<eddie.r...@tdhca.state.tx.us> wrote:
>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.
Thats because postconf -d myhostname gives you the _default_ configuration 
setting.

man postconf

       -d     Print  main.cf default parameter settings instead of actual set‐
              tings.  Specify -df to fold long  lines  for  human  readability
              (Postfix 2.9 and later).

Use postconf myhostname to get the actual configured parameter.

>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.
>

-- 
Christian Kivalo

Reply via email to