I've just had emerge telling me it wants to trash my postfix config :-)
I'm not sure whether my setup is actually using it, I use dovecot to
deliver my mail, but is there any way I can stop random updates trying
to trash my local changes? I'm rubbish at merging updates, and last time
I tried I think the result was a complete mess.
And I said I use dovecot to deliver mail - that takes a leaf out of the
systemd book and has a master config file pointing to a local config
file. Any updates to dovecot don't touch the local file, and don't touch
my local settings.
Can I do anything similar for postfix?
Cheers,
Wol
I’m not a systemd user, so I don’t know precisely what systemd does. But my /etc/postfix/main.cf is a soft link to “main.cf.works”, which was an unoriginal name for an experimental config file that worked (as opposed to a series of trial configs that didn’t). The original main.cf is renamed main.cf.orig to keep it around as an unadulterated reference. Works for me and doesn’t get clobbered in updates.
If I change any config file I usually rename it with a .orig suffix, alter a copy of the original, and point to the altered copy with a soft link. The soft link has the standard config file name. The altered copy has a name different from anything expected by the installation. The soft link allows me to try a bunch of different configs as I’m tuning the application.
Haven’t lost any custom configurations doing this, it makes my own modifications abundantly clear, and it keeps an original around for when I make a mess of my customizations. A quick diff between the .orig file and any ._cfg files after an update shows me what’s changed in the update.
There are portage file merging tools for config updates, but I don’t use them often enough to use them properly. So I’ve reverted to this simple minded system. And backups!
HTH
John