On Wed, Sep 30, 2026 at 11:08:25 -0500, nwe wrote: > On 9/30/26 10:33 AM, Chris Green wrote: > > > All very well but there is software (e.g. postfix) that does need the > > system's domainname and I'm not going to rewrite postfix! 🙂 > > From my running Debian13 postfix mail server: > > nwe@mail:~$ ypdomainname > ypdomainname: Local domain name not set > nwe@mail:~$ domainname > (none) > nwe@mail:~$ dnsdomainname > gitcoding.net > nwe@mail:~$ cat /etc/mailname > mail.gitcoding.net > nwe@mail:~$ cat /etc/hostname > mail.gitcoding.net > > I understand my postfix gets its hostname from /etc/hostname or > /etc/mailname
My postfix box is running Debian 10, and it has these lines in its /etc/postfix/main.cf file (two separate snippets): # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. #myorigin = /etc/mailname myhostname = remote.wooledge.org alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = $myhostname, wooledge.org, localhost.wooledge.org, localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 It has the following /etc/mailname file: greg@remote:~$ cat /etc/mailname wooledge.org This system does not run NIS. (Most don't! It's very old tech.) greg@remote:~$ domainname (none)

