Viktor Dukhovni: > On Fri, Jan 06, 2023 at 01:45:48PM -0500, Wietse Venema wrote: > > > > Most changes in main.cf require a reload to become effective but there > > > are some exceptions requiring a restart, e. g. a change of > > > inet_interfaces. > > > > That is incorrect. If inet_interfaces is changed, then a "postfix > > reload" (not restart) is required because the master daemon is a > > long-running process. > > The documentation of inet_interfaces says otherwise, my recollection is > that master(8) does not attempt to rebind inet sockets on "reload":
I see. Yes, that could be dififcult. Or maybe not. The Postfix master creates as many sockets as needed for an inet service, and sets the socket option SO_REUSEADDR on each socket, and bind()s them to the desired addresses. With that, it may be possible for the Postfix master to create new sockets, set SO_REUSEADDR on each socket, and bind() them to the new addresses; if successful, close() the old sockets, otherwise close() the new sockets. Am I missing something? This will have to work on all supported systems, though. Not just Linux, not just *BSD. Wietse