FS#48324 - [postfix] is updating files in /etc/postfix

Attached to Project: Arch Linux
Opened by Sébastien Luttringer (seblu) - Wednesday, 24 February 2016, 16:55 GMT
Last edited by Gaetan Bisson (vesath) - Monday, 14 March 2016, 04:56 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Gaetan Bisson (vesath)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hello,

Postfix is updating configuration files in /etc/postfix without using pacfiles and this cannot be stopped by using NoUpdate as it's a post_install script which do that.

Until now, all these updates are counter productive, for example, the last I tested, which add commented lines in master.cf and add "inet_protocols = ipv4" (despite of the fact that I have "compatibility_level = 2")

# pacman -S postfix
: Processing package changes...
(1/1) reinstalling postfix [########################################] 100%
Editing /etc/postfix/master.cf, adding missing entry for postscreen TCP service
Editing /etc/postfix/master.cf, adding missing entry for smtpd unix-domain service
Editing /etc/postfix/master.cf, adding missing entry for dnsblog unix-domain service
Editing /etc/postfix/master.cf, adding missing entry for tlsproxy unix-domain service
COMPATIBILITY: editing /etc/postfix/main.cf, setting
inet_protocols=ipv4. Specify inet_protocols explicitly if you want
to enable IPv6. In a future release IPv6 will be enabled by default.

Could we drop the postfix post_install script, and rely on pacman to upgrade these files.

Cheers,
This task depends upon

Closed by  Gaetan Bisson (vesath)
Monday, 14 March 2016, 04:56 GMT
Reason for closing:  Implemented
Additional comments about closing:  postfix-3.1.0-3 in [extra]
Comment by Gaetan Bisson (vesath) - Wednesday, 24 February 2016, 17:31 GMT
In my own experience upstream's own post_install script does a pretty good job at updating standard configurations to newer defaults. In fact, this script is a must to me because:
- it's official from upstream
- postfix configuration is such a mess otherwise

Having post_install just print "Run the XXX script if you want to" would result in vast numbers of decaying postfix installs, which is really to be avoided. I really do appreciate modular configuration files a la systemd, with defaults in /usr/lib, overrides in /etc and such, but it is really not how postfix currently works...
Comment by Sébastien Luttringer (seblu) - Wednesday, 24 February 2016, 21:56 GMT
I didn't share the same experience than you about what this script is doing or the messiness of the postfix configuration, but it's not the real problem.

This package is overwriting my configuration incorrectly, at each update, without my consent and the only way I have to fix that is to run ansible again to reconfigure my server.

It is well known that Arch is not automatically upgrading your configuration files, even more outside of the pacman watch.
Everyone expect to run pacdiff after an upgrade and choose which configuration part he wants to update.

I read the post-install script. You are calling only the configuration update part. So there is no perm fix (which is, like the configuaration, a pacman job).
So the script is mainly adding new daemons in the master.cf which can be handled with pacdiff, as you are providing master.cf in /etc/postfix/.
And the update of main.cf is nightmare (it disables ipv6, even with compatibility_level=2). Some part have even been commented.

So, I think we don't even need a message asking to run it.

Comment by Gaetan Bisson (vesath) - Friday, 26 February 2016, 02:43 GMT
"It is well known that" Arch strives to be as close to upstream as possible.
"Everyone expects" their daemons to keep running after an upgrade and a reboot.

See, I too can use that empty rethoric.

Now, this script has been written by upstream with that exact application in mind. I just upgraded to postfix-3.1.0 and, again, my /etc/postfix/ files were usefully merged to newer defaults and to include new additions to postfix-files. So I acknowledge your gripe but unless you understand that this script is useful to others and start looking for a compromise then we're just going to have to disagree...
Comment by Sébastien Luttringer (seblu) - Friday, 26 February 2016, 12:17 GMT
I'm sorry to have a so uncomfortable rhetoric.

Do we agree that configuration should be updated through pacman ?

Do you have a common ground to propose?
Comment by Sébastien Luttringer (seblu) - Saturday, 12 March 2016, 16:48 GMT
Gaetan, what do you propose?

(41/72) upgrading postfix [########################################] 100%
Editing /etc/postfix/master.cf, adding missing entry for postscreen TCP service
Editing /etc/postfix/master.cf, adding missing entry for smtpd unix-domain service
Editing /etc/postfix/master.cf, adding missing entry for dnsblog unix-domain service
Editing /etc/postfix/master.cf, adding missing entry for tlsproxy unix-domain service
Comment by Jens Adam (byte) - Saturday, 12 March 2016, 20:28 GMT
I think 'm on seblu's side here. While the upstream script tries to do the 'right thing' [tm], I really prefer the KISS approach of simply having {main,master}.cf in backup() and letting the users merge manually.
Comment by Gaetan Bisson (vesath) - Sunday, 13 March 2016, 08:50 GMT
Fair enough. I'll implement this when I find the time, hopefully this week (real life is a bit hectic for me at the moment). If I haven't done anything by next week, feel free to do it. Cheers.

Loading...