Gentoo Archives: gentoo-user

From: John Blinka <john.blinka@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Postfix config and update
Date: Sun, 27 Nov 2022 13:21:41
In Reply to: [gentoo-user] Postfix config and update by Wols Lists
1 On Sun, Nov 27, 2022 at 5:36 AM Wols Lists <antlists@××××××××××××.uk> wrote:
3 > I've just had emerge telling me it wants to trash my postfix config :-)
4 >
5 > I'm not sure whether my setup is actually using it, I use dovecot to
6 > deliver my mail, but is there any way I can stop random updates trying
7 > to trash my local changes? I'm rubbish at merging updates, and last time
8 > I tried I think the result was a complete mess.
9 >
10 > And I said I use dovecot to deliver mail - that takes a leaf out of the
11 > systemd book and has a master config file pointing to a local config
12 > file. Any updates to dovecot don't touch the local file, and don't touch
13 > my local settings.
14 >
15 > Can I do anything similar for postfix?
16 >
17 > Cheers,
18 > Wol
19 >
20 > I’m not a systemd user, so I don’t know precisely what systemd does. But
21 my /etc/postfix/ is a soft link to “”, which was an
22 unoriginal name for an experimental config file that worked (as opposed to
23 a series of trial configs that didn’t). The original is renamed
24 to keep it around as an unadulterated reference. Works for me
25 and doesn’t get clobbered in updates.
27 If I change any config file I usually rename it with a .orig suffix, alter
28 a copy of the original, and point to the altered copy with a soft link. The
29 soft link has the standard config file name. The altered copy has a name
30 different from anything expected by the installation. The soft link allows
31 me to try a bunch of different configs as I’m tuning the application.
33 Haven’t lost any custom configurations doing this, it makes my own
34 modifications abundantly clear, and it keeps an original around for when I
35 make a mess of my customizations. A quick diff between the .orig file and
36 any ._cfg files after an update shows me what’s changed in the update.
38 There are portage file merging tools for config updates, but I don’t use
39 them often enough to use them properly. So I’ve reverted to this simple
40 minded system. And backups!
42 HTH
44 John


Subject Author
Re: [gentoo-user] Postfix config and update Wol <antlists@××××××××××××.uk>