The pkg-install routine of mail/postfix calls postfix's post-install script on every update with the upgrade-package parameter. This parameter updates installed main.cf and master.cf, regardless of whether they were modified by a user or not. This is particularly problematic because of that script's odd behaviour to restrict postfix to ipv4 only, see [1]. We should really try to avoid changing configuration files after they've been modified by the user, in particular if it may result in unpleasant surprises. Is there any way to call this script if and only if the main.cf/master.cf file hasn't been modified by the user and/or restrict its modifications to the sample files? Cheers, Sascha [1] https://github.com/vdukhovni/postfix/blob/master/postfix/conf/post-install#L859
I thought it over many times and came to the conclusion that postfix's post-install script does a good job when updating the .cf files. Do you have any particular scenario (not mentioning inet_protocols) in mind? Because, in particular, for inet_protocols, specifying "inet_protocols=any" in main.cf is always a good idea.
(In reply to Juraj Lutter from comment #1) I ran into this issue setting inet_protocols=ipv4 after removing inet_protocols=all from my main.cf, *because* it became the default setting: mail> postconf -d inet_protocols inet_protocols = all Resetting this to inet_protocols=ipv4 *without* restarting postfix left my mailserver complaining and even throtteling [1] due to: http://www.postfix.org/postconf.5.html#inet_protocols "Note: you MUST stop and start Postfix after changing this parameter." I do sometimes recompile and reinstall all ports of mine, that is how I found out. I do consider this a serious bug, and I was about to open a new bug report but found this. Regards, Michael [1] Jan 17 20:06:31 mail postfix/master[54448]: warning: /usr/local/libexec/postfix/smtpd: bad command startup -- throttling
(In reply to Michael Grimm from comment #2) Forget the throtteling part. If one recompiles and reinstalls a port, one should restart postfix. I forgot, my bad.