Hi Ryan,

On 2019-11-23 18:07, Ryan Kavanagh wrote:

I'm trying to understand the rationale for having a separate smtpd.conf.
/etc/smtpd.conf is listed in conffiles, so package upgrades will never
clobber the changes you have made to it. During upgrades, if a package
has a new version of /etc/smtpd.conf and you have local changes, then
dpkg will prompt you to figure out how to handle the differences.


Thats the point. If you have 300+ hosts you want to avoid this interactive
step during an upgrade. The idea is to provide /etc/default/opensmtpd and
/etc/nullclient.smtpd.conf in a dedicated config package, ignoring the
config files in the opensmtpd package completly.

dpkg-divert is not an option, because this tool is a mess. I am using
dpkg-divert exactly for this nullclient case at the moment.

If you want to always keep the old/local version (and have dpkg not
prompt you during upgrades), you can pass --force-confold and
--force-confdef to dpkg. See this writeup[0] by Raphaël Hertzog for more
details.


Raphaël keeps focus on upgrading a single package using dpkg. Problem here
is you might want these options for opensmtpd during "apt upgrade", but not
for other packages. You simply do not know in advance.

Does this solve the issues you've been encountering? If not, I'll apply
the patch. Please let me know.


That would be very nice. I tried to make the suggested patch as transparent
as possible.


Regards
Harri

Reply via email to