On Wed, Feb 10, 2021 at 04:40:13PM +0100, Jaroslaw Rafa wrote: > Dnia 10.02.2021 o godz. 15:10:09 Chris Green pisze: > > > > These systems are all systemd'ed so I can't just run postfix as above. > > However will 'postconf "myhostname = $(dnsdomainname)"' actually > > change/set the myhostname value in main.cf? If so then simply putting > > the postconf command in /etc/rc.local will do all I need, especially > > after one reboot. > > Are these machines moved from domain to domain? Ie. is it possible that > "dnsdomainname" will change, or is it the same all the time? If the latter, > I don't see why do you need to set it at each reboot - it is enough to set > it once. So I would try to set it in a script that deploys/copies Postfix > configuration to the target machine.
I could just edit the value in each system, but then all the main.cf files would be different. Currently I have a single main.cf file kept in mercurial that I deploy on all these systems. If I change the file in my mercurial repository the change gets distributed to all systems (by a file synchronising process). I'm just trying to see if I can keep my single master version of main.cf with a different domain name for each system. I can keep different versions of main.cf for each system in mercurial but that means if I want/need to change something related to postfix I have to remember to make the change in multiple main.cf files. I don't currently have a mechanism for manipulating files during deployment from the mercurial repository to the destination. -- Chris Green