On Wed, Feb 10, 2021 at 09:05:03PM +0000, Chris Green wrote: > OK, but every system I know about has hostname as just the hostname > with no domain.
Only because you configured it that way, perhaps via an "installer" that made that default choice for you, but all these systems allow you to configure the system hostname to an FQDN. The DANE survey server is a Fedora 31 system, there I have: $ cat /etc/hostname dnssec-stats.ant.isi.edu $ uname -n dnssec-stats.ant.isi.edu > It's how systems are configured 'out of the box' as installed with > various different (OK, mostly LInux) different operating systems. It > *may* be wrong but I'm afraid it's the way things are. More precisely, it is the way you let them stay after running the base installer. You then customise them in various other ways, but have so far chosen to not override the hostname. On a Postfix server, it is IMHO simplest to set the hostname to an FQDN. You *can* avoid doing that, but at a greater complexity cost. Your choice. > So, I have several local systems on a LAN behind a single NATted ipv4 > address which is zbmc.eu, they have to have names, those names are > necessarily invalid 'outside'. See: http://www.postfix.org/SOHO_README.html#fantasy > Yes, I think you have hit exactly on the issue! :-) Not everyone > agrees what the 'hostname' should be. I'm stuck in the crossfire. You're going around in cicles. Ultimately, your systems need a working setting of "myhostname", "mydomain", "myorigin", "mydestination", "smtp_helo_name", "inet_interfaces" and "proxy_interfaces". Some of these can be inferred from an FQDN hostnames, or else explicitly set. You should first get a working configuration by setting explicit values that do what you want. Then you can decide whether to use explicit or inferred settings to scale these to multiple machines. This thread is going nowhere, because your immediate goal is rather unclear. Do you have a working explicit configuration? If not, fix that *first*. Once that's done, you can think about how to abstract it across multiple machines. > Thanks Bob, I think you have convinced me that there probably is no > simple answer to this. Maybe I'll just have to have more than one > main.cf, one for the systems on the zbmc.uk domain and one (or more) > for systems on other domains. It's probably the easiest to understand > solution at least. Not the conclusion I would draw, but certainly a possibility. As explained earlier, if the systems are "cookie-cutter" nodes differing only in where they happen to be hosted, it is simplest in fact to just give each a unique FQDN, and otherwise identical configurations. If the FQDN is configured via /etc/hostname (evidenced via `uname -n`), then the main.cf files can typically be identical and may not require any further machine-specific post-processing. -- Viktor.