Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@polarathene
Copy link
Member

@polarathene polarathene commented Aug 1, 2024

Description

Regression fix. A good example of why I loathe such logic with shell scripts 😩


stderr is filtered by grep to discard unwanted (expected) log noise when appending the override postfix-main.cf content (updated settings did not replace earlier defined instances).

That grep filter introduced a regression into DMS v14 release, since any other stderr content not being excluded was now blended into stdout and redirected with the original stdout output for the postconf -n command.

The fix is to ensure the grep output is redirect to stderr to avoid that mishap.

Fixes #4145

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • New and existing unit tests pass locally with my changes
  • I have added information about changes made in this PR to CHANGELOG.md

`stderr` is filtered by `grep` to discard unwanted (expected) log noise when appending the override `postfix-main.cf` content (_updated settings did not replace earlier defined instances_).

That `grep` filter introduced a regression into DMS v14 release, since any other `stderr` content not being excluded was now blended into `stdout` and redirected with the original `stdout` output for the `postconf -n` command.

The fix is to ensure the `grep` output is redirect to `stderr` to avoid that mishap.
@polarathene polarathene added this to the v14.1.0 milestone Aug 1, 2024
@polarathene polarathene self-assigned this Aug 1, 2024
Copy link
Member

@georglauterbach georglauterbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, even for me this seems ridiculous πŸ˜†

@casperklein
Copy link
Member

Not easy to spot, but once you understood how it works, it's still logical πŸ˜†

@polarathene polarathene merged commit 2f8ad14 into master Aug 1, 2024
@polarathene polarathene deleted the fix/postfix-main-override-stderr-mishap branch August 1, 2024 21:42
@georglauterbach georglauterbach modified the milestones: v14.1.0, v15.0.0 Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug report: postfix-main.cf is appending warnings to /etc/postfix/main.cf

4 participants