Peter Wienemann:
> On 06.01.23 13:15, Wietse Venema wrote:
> >> is there a way to dump the effective postfix configuration rather than
> >> the one specified in main.cf/master.cf? It seems that changes to
> >> main.cf/master.cf have an immediate impact on the output of postconf
> >> regardless of whether a reload/restart of the service was performed.
> > 
> > How would that work? Different Postfix processes start at different
> > times, and some processes (qmgr, master) run forever.
> 
> I could think of something like this:
> 
> Instead of sending a HUP signal like it is done to trigger a reload, one 
> sends a different signal (e. g. USR1) to the master. The further 
> processing of the signal is similar to the HUP case except that 
> configuration dumps are triggered rather than configuration reloads.

How could that be useful? On a busy server, there will be be 100+
smtpd (SMTP server) processes, 100+ cleanup processes, 100+ smtp
(SMTP client) processes and so on. Those processes were started an
different times and they will produce different dumps if you change
Postfix configuration without "postfix reload".

If you want an accurate picture of what configuration is in effect.
then I think that is not too much trouble to run "postfix reload"
after a configuration change. Then "postconf" output reflects the
effective configuration.

Instead of dumping configurations, there are other ways. For example,
each daemon could log configuration file stamps when the process
is started (or communicate that info in some other manner). Given
a history of (time stamp, config file content) you could use the
logged time stamps to find out what configuration is (or was) in
effect for each daemon process.

        Wietse

Reply via email to