On Thu, Feb 11, 2021 at 11:36:24AM +0100, Matus UHLAR - fantomas wrote: > > > On 10.02.21 15:55, Chris Green wrote: > > > > I could just edit the value in each system, but then all the main.cf > > > > files would be different. > > > On Wed, Feb 10, 2021 at 05:31:47PM +0100, Matus UHLAR - fantomas wrote: > > > setting "myhostname = $(dnsdomainname)" what Wietse recommended would not. > > On 10.02.21 17:05, Chris Green wrote: > > Yes, but since I'd have to add something to each rc.local (and they're > > mostly default, i.e. as installed) it's more stuff to keep maintained. > > either you have to change system hostname to a FQDN anywhere once > or you have to change postfix's main.cf to correct domain anywhere once > or you have to change rc.local to set postfix domain anywhere at each boot > > you still have to change something, because your systems are clearly not > configured enough to find the FQDN by default. > Yes, I think this is what it comes down to, *something* needs to be changed for each system. I was just hoping that postfix could use something that was there already (the systems do know their names and domains already).
> > > I was in your situation some years ago, when I maintained the same configs > > > for multiple apps on multiple servers. I maintained /etc/hosts and > > > hostnames per-machine and most of the rest was the same. > > > > > So I have the FQDN everywhere:- > > > > chris@isbdGandi$ hostname > > isbdGandi.isbd.uk > > chris@isbdGandi$ more /etc/hosts > > # The following lines are desirable for IPv4 capable hosts > > 127.0.0.1 isbdGandi.isbd.uk isbdGandi isbd localhost > > no no no. > 127.0.0.1 is always supposed to resolve to "localhost". > If those hosts don't have their assigned IP, Debian uses "127.0.1.1" for > their hostnames. > Given that some of my systems have their IP address allocated dynamically there's not really much alternative except to put the system's name against 127.0.0.1. Lots of things *do* rely on the name being there. (or for 127.0.1.1). -- Chris Green