Skip to content

scripts: fix setting SRS_EXCLUDE_DOMAINS during startup#3271

Merged
georglauterbach merged 1 commit intodocker-mailserver:masterfrom
jamebus:fix-srs-exclude-domains
Apr 18, 2023
Merged

scripts: fix setting SRS_EXCLUDE_DOMAINS during startup#3271
georglauterbach merged 1 commit intodocker-mailserver:masterfrom
jamebus:fix-srs-exclude-domains

Conversation

@jamebus
Copy link
Copy Markdown
Contributor

@jamebus jamebus commented Apr 18, 2023

Description

mailserver | sed: -e expression #1, char 302: invalid reference \1 on `s' command's RHS

The sed command has a syntax error preventing a reference from being created. There's also an errant "=" that would output.

This fixes the issue and allows SRS_EXCLUDE_DOMAINS to be set in the postsrsd configuration.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change that does improve existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Copy Markdown
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.

Thank you very much for finding this bug - very much appreciated! ❤️

The solution you propose does seem to work, but the regular expression that sed was working with is strange to begin with. I have therefore proposed a cleaner and simpler solution that is coherent with the rest of the code.

Comment thread target/scripts/startup/setup.d/postfix.sh Outdated
@georglauterbach georglauterbach added area/scripts kind/bug/fix A fix (PR) for a confirmed bug labels Apr 18, 2023
@georglauterbach georglauterbach added this to the v12.1.0 milestone Apr 18, 2023
@georglauterbach georglauterbach changed the title Fix setting SRS_EXCLUDE_DOMAINS during start up scripts: fix setting SRS_EXCLUDE_DOMAINS during startup Apr 18, 2023
@jamebus jamebus force-pushed the fix-srs-exclude-domains branch from 73bdd64 to 07a84af Compare April 18, 2023 14:13
@georglauterbach georglauterbach merged commit a735ddd into docker-mailserver:master Apr 18, 2023
@jamebus jamebus deleted the fix-srs-exclude-domains branch April 18, 2023 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/scripts kind/bug/fix A fix (PR) for a confirmed bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants