Bug 2055024 - Default settings in`postfix -d` differ from the actual default settings of postfix in RHEL
Summary: Default settings in`postfix -d` differ from the actual default settings of po...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: postfix
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jaroslav Škarvada
QA Contact: František Hrdina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-16 08:53 UTC by Sergei Petrosian
Modified: 2023-08-16 07:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-16 07:28:34 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-112476 0 None None None 2022-02-16 09:08:19 UTC

Description Sergei Petrosian 2022-02-16 08:53:45 UTC
Description of problem:
A common user scenario is to be able to reset configuration to the defaults.
When running `postconf -d` to receive default values, `postconf` prints upstream defaults. However, in RHEL, some defaults settings are different from the upstream defaults. Hence, it is impossible to get the real default settings for some parameters.
The fault defaults can be found by running `postconf -n` that prints settings that are different from the defaults. 

Version-Release number of selected component (if applicable):
postfix-3.5.8-2.el8.x86_64.rpm

How reproducible:
Always

Steps to Reproduce:
1. Install postfix
2. Enter `postconf -d` to find the default settings
3. Enter `postconf` to find the current settings

Actual results:
Some values at the output of `postconf -d` and `postconf` are different.

Expected results:
The outputs of `postconf -d` and `postconf` must be the same because we have just installed the package and did not change any settings.

Additional info:
The script that compares outputs of two commands and prints settings that are different:
~~~
#!/bin/bash
settings_to_apply=__postconf_settings_to_apply.txt
current_settings=__postconf_current.txt
default_settings=__postconf_defaults.txt
postconf > $current_settings
postconf -d > $default_settings
while read line; do
  if ! grep -Fxq "$line" $current_settings; then
    echo $line >> $settings_to_apply
  fi
done < $default_settings
cat $settings_to_apply
~~~

I think that the settings are rewritten in the spec file here but I might be wrong:
https://src.osci.redhat.com/rpms/postfix/blob/rhel-9.0.0/f/postfix.spec#_356

Comment 1 Jaroslav Škarvada 2022-02-16 16:44:57 UTC
Yes, this is problem and currently I am unsure how to solve it the best way. RHEL defaults differ a bit from the upstream defaults. The 'postconf -d' shows upstream defaults. But there is no option to show RHEL defaults. We could a) patch 'postconf -d' to show the RHEL defaults but then there will be no way how to get the upstream defaults (i.e. 'postconf -d' behavior will differ from the upstream). Or b) we could propose new postconf option to show the RHEL defaults, then the postconf behavior will differ from the upstream. Or c) we could provide new tool to show just the RHEL defaults. Or d) update the RHEL defaults to be the same as the upstream defaults. Unfortunately, d) probably isn't currently possible, because we need some hardening.

Comment 2 Sergei Petrosian 2022-02-21 12:15:02 UTC
How about providing a new file `/etc/postconf/main.cf.distribution.defaults` that is a copy of the distribution default `main.cf`?
This can be done within the spec file.

Comment 4 RHEL Program Management 2023-08-16 07:28:34 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


Note You need to log in before you can comment on or make changes to this bug.