Skip to content

Adjust envrionment variables - more sensible defaults#2428

Merged
georglauterbach merged 11 commits intomasterfrom
improvement/better-env-setup
Mar 2, 2022
Merged

Adjust envrionment variables - more sensible defaults#2428
georglauterbach merged 11 commits intomasterfrom
improvement/better-env-setup

Conversation

@georglauterbach
Copy link
Copy Markdown
Member

@georglauterbach georglauterbach commented Feb 21, 2022

Description

The new setup will now set env variables in one place and in one place
only. The old setup used two separate places wich is not DRY and
confusing.

Some default values changed:

  1. PFLOGSUMM_TRIGGER: logrotate => none
  2. REPORT_SENDER: mailserver-report@HOSTNAME => mailserver-report@DOMAIN
  3. REPORT_RECIPIENT: "0" => POSTMASTER_ADDRESS
  4. LOGROATE_INTERVAL: daily => weekly

One env variable was renamed: REPORT_INTERVAL => LOGROTATE_INTERVAL

I believe these defaults to be more sensible, especially the REPORT_RECIPIENT
address. The PFLOGSUMM_TRIGGER value was changed to none because otherwise
people would start getting daily Postfix log summary reports automatically.
Now, this is opt-in, and reports are sent only when enabled properly.

Some of the variables changed were marked as deprecated. I removed the note,
as the variables now bear some (sane) defaults again for other variables
(i.e.) REPORT_RECIPIENT is now default for other recipient addresses.

Although some defaults changed, this is not a breaking change as the
mail server starts exactly as before. Even for REPORT_RECIPIENT="0"
explictly set, other reports are opt-in as well with their defaults,
and as the recipient default changed, this is fine as well.

I would leave it up to vote whether this PR qualifies for 10.5.0 or for 11.0.0. I'm also open to other defaults, although I think they're okay as they are. Please watch out for inconsistencies in the documentation :D

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

The new setup will now set env variables on one place and on one place
only. The old setup used two separate places wich is not DRY and
confusing.

Some default values changed:

1. PFLOGSUMM_TRIGGER: logrotate => none
2. REPORT_SENDER: mailserver-report@HOSTNAME => mailserver-report@DOMAIN
3. REPORT_RECIPIENT: "0" => POSTMASTER_ADDRESS

One env variable was renamed: REPORT_INTERVAL => LOGROTATE_INTERVAL

I believe these defaults to be more sensible, especially the REPORT_RECIPIENT
address. The PFLOGSUMM_TRIGGER value was changed to `none` because otherwise
people would start getting daily Postfix log summary reports automatically.
Now, this is opt-in, and reports are sent only when enabled properly.

Some of the variables changed were marked as deprecated. I removed the note,
as the variables now bear some (sane) defaults again for other variables
(i.e.) REPORT_RECIPIENT is now default for other recipient addresses.

Although some defaults changed, this is not a breaking change as the
mail server starts exactly as before. Even for REPORT_RECIPIENT="0"
explictly set, other reports are opt-in as well with their defaults,
and as the recipient default changed, this is fine as well.
@georglauterbach georglauterbach self-assigned this Feb 21, 2022
@georglauterbach georglauterbach added area/scripts kind/improvement Improve an existing feature, configuration file or the documentation priority/low priority/medium labels Feb 21, 2022
Comment thread docs/content/config/environment.md Outdated
Comment thread docs/content/config/environment.md Outdated
Comment thread docs/content/config/environment.md Outdated
Comment thread docs/content/config/environment.md
Comment thread docs/content/config/environment.md Outdated
Comment thread docs/content/config/environment.md
Comment thread target/scripts/start-mailserver.sh Outdated
polarathene
polarathene previously approved these changes Feb 22, 2022
@georglauterbach
Copy link
Copy Markdown
Member Author

@polarathene @casperklein @wernerfred do you think this can go into 10.5.0 or should it go into 11.0.0?

@wernerfred
Copy link
Copy Markdown
Member

Refactoring is 10.4.1 but changing the Default is 11.0 from my point of view

@georglauterbach georglauterbach mentioned this pull request Feb 22, 2022
6 tasks
@georglauterbach
Copy link
Copy Markdown
Member Author

georglauterbach commented Feb 22, 2022

As much as I'd like to see this in 10.5.0, I understand that this may not be fitting for the next minor release. I prepared the next minor release and we need to decide on this and on @casperklein's PR #2424. Afterwards, we can enable the feature freeze, wait one week, release v10.5.0 and then merge this and #2424.

EDIT: I put this into the v11.0.0 milestone. Unless someone has objections, please confirm whether you think this is appropriate. @wernerfred has already voted, and I join his vote.

@georglauterbach georglauterbach added this to the v11.0.0 milestone Feb 22, 2022
@georglauterbach georglauterbach added the meta/feature freeze On hold due to upcoming release process label Feb 22, 2022
Comment thread mailserver.env Outdated
Comment thread mailserver.env
Comment thread target/scripts/start-mailserver.sh
Comment thread target/scripts/start-mailserver.sh Outdated
polarathene
polarathene previously approved these changes Feb 25, 2022
casperklein
casperklein previously approved these changes Feb 25, 2022
@georglauterbach georglauterbach removed the meta/feature freeze On hold due to upcoming release process label Mar 2, 2022
@georglauterbach georglauterbach enabled auto-merge (squash) March 2, 2022 15:04
@georglauterbach georglauterbach disabled auto-merge March 2, 2022 15:04
@georglauterbach georglauterbach dismissed stale reviews from casperklein and polarathene via f4d9b01 March 2, 2022 16:18
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2022

Documentation preview for this PR is ready! 🎉

Built with commit: a6e2bd1

@georglauterbach georglauterbach enabled auto-merge (squash) March 2, 2022 16:21
@georglauterbach georglauterbach merged commit e6af5a1 into master Mar 2, 2022
@georglauterbach georglauterbach deleted the improvement/better-env-setup branch March 2, 2022 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/scripts kind/improvement Improve an existing feature, configuration file or the documentation priority/low priority/medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants