Why and how is Postfix automatically reading main.cf file?

Picking up changes is by design standard procedure in most Postfix components. In fact, many parts of Postfix explicitly permit swapping out running processes for new ones at any point. Many configuration parameters are setup to automatically take effect eventually - with or without manual intervention (reload).

Changes to main.cf are picked up automatically, as smtpd(8) processes run for only a limited amount of time. Use the command "postfix reload" to speed up a change. - man 8 smtpd

If the way you manage your certificates makes such reloads undesirable, you are advised to place your certificates and matching keys together in files that are only changed when such reload operation is safe.

With Postfix ≥ 3.4 the preferred way to configure server keys and certificates is via the "smtpd_tls_chain_files" parameter. - man 5 postconf

See the documentation of the smtpd_tls_chain_files parameter for additional explanation.


Most likely Postfix got either restarted or got SIGHUP signal while you were working on the config.

One common cause for daemon restarts/reloads is logrotate: it may restart/reload services so that they re-open their configuration files after log rotation.

It is also possible that Postfix crashed for some other reason and systemd restarted it.

I suggest checking your logs for other events (cron job runs, etc) around the time Postfix went down for you.