* [gentoo-user] Postfix config and update
@ 2022-11-27 10:36 Wols Lists
2022-11-27 13:21 ` John Blinka
0 siblings, 1 reply; 7+ messages in thread
From: Wols Lists @ 2022-11-27 10:36 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Postfix config and update
2022-11-27 10:36 [gentoo-user] Postfix config and update Wols Lists
@ 2022-11-27 13:21 ` John Blinka
2022-11-27 14:42 ` Wol
0 siblings, 1 reply; 7+ messages in thread
From: John Blinka @ 2022-11-27 13:21 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2045 bytes --]
On Sun, Nov 27, 2022 at 5:36 AM Wols Lists <antlists@youngman.org.uk> wrote:
> 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
[-- Attachment #2: Type: text/html, Size: 2701 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Postfix config and update
2022-11-27 13:21 ` John Blinka
@ 2022-11-27 14:42 ` Wol
2022-11-27 22:29 ` John Blinka
0 siblings, 1 reply; 7+ messages in thread
From: Wol @ 2022-11-27 14:42 UTC (permalink / raw
To: gentoo-user
On 27/11/2022 13:21, John Blinka wrote:
> I’m not a systemd user, so I don’t know precisely what systemd does. But
> my /etc/postfix/main.cf <http://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 <http://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.
Systemd stores its *distro*supplied* config files in /usr.
It stores its user-supplied config files in /etc.
So when your distro updates systemd, it doesn't go anywhere near your
local changes.
Dovecot doesn't do it quite the same way, the default distro config
loads a "config.local" file if it exists. So when your distro updates
the master config, your local config is untouched.
Postfix afaik just has one humungous config file, so when your distro
updates the config, all your local changes are trashed :-(
I don't want to faff about with special copies, backups, origs etc.
Everything should "just work (tm)".
Cheers,
Wol
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Postfix config and update
2022-11-27 14:42 ` Wol
@ 2022-11-27 22:29 ` John Blinka
0 siblings, 0 replies; 7+ messages in thread
From: John Blinka @ 2022-11-27 22:29 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1358 bytes --]
On Sun, Nov 27, 2022 at 9:42 AM Wol <antlists@youngman.org.uk> wrote:
> On 27/11/2022 13:21, John Blinka wrote:
>
> Systemd stores its *distro*supplied* config files in /usr.
>
> It stores its user-supplied config files in /etc.
>
> So when your distro updates systemd, it doesn't go anywhere near your
> local changes.
>
> Dovecot doesn't do it quite the same way, the default distro config
> loads a "config.local" file if it exists. So when your distro updates
> the master config, your local config is untouched.
>
> Postfix afaik just has one humungous config file, so when your distro
> updates the config, all your local changes are trashed :-(
If your goal is to update postfix without clobbering your artfully crafted
config file, then that’s what portage has been doing for me quite reliably
for the past 20-30 years. No effort required to protect anything in /etc
from updates. A new humongous postfix config file gets installed in
/etc/postfix/._cfg<whatever> and your custom config file remains untouched.
It just works (tm). But you know that. I’m thinking I don’t at all
understand your issue.
>
> I don't want to faff about with special copies, backups, origs etc.
> Everything should "just work (tm)".
Fair enough! Not expecting that my faffing about would appeal to anyone but
me. ;)
John
[-- Attachment #2: Type: text/html, Size: 1987 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <FwneN-6Fad-1@gated-at.bofh.it>]
end of thread, other threads:[~2022-11-28 23:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-27 10:36 [gentoo-user] Postfix config and update Wols Lists
2022-11-27 13:21 ` John Blinka
2022-11-27 14:42 ` Wol
2022-11-27 22:29 ` John Blinka
[not found] <FwneN-6Fad-1@gated-at.bofh.it>
[not found] ` <FwpTj-6GVn-5@gated-at.bofh.it>
[not found] ` <Fwr8J-6HCU-21@gated-at.bofh.it>
2022-11-27 15:49 ` Mike Civil
2022-11-27 22:12 ` Wol
2022-11-28 23:17 ` Neil Bothwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox