fix: Ensure /var/log/mail permissions + ownership are correct#4374
Merged
polarathene merged 2 commits intomasterfrom Feb 17, 2025
Merged
fix: Ensure /var/log/mail permissions + ownership are correct#4374polarathene merged 2 commits intomasterfrom
/var/log/mail permissions + ownership are correct#4374polarathene merged 2 commits intomasterfrom
Conversation
georglauterbach
approved these changes
Feb 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is an interim fix for DMS v15 until a proper fix can more confidently be implemented.
Changes:
setup-stack.shfor container restart support./var/log/mail/and it's contents are corrected if a volume mount differs.History for these changes is messy (as documented in the "proper fix" link), but looks like it shouldn't really be necessary going forward (new permissions fix may be relevant to avoid the
logrotatefailure scenario).Workaround for volume mounts that are too relaxed
In the kubernetes helm project, a user reports their
/var/log/mailmount with777permissions which appears to impactlogrotateservice as a result:According to that linked discussion, correcting that mount permissions for a specific mount in the Helm chart is problematic? 🤷♂️
Chance of regression low
In addition these are runtime corrections intended for volume mounts, thus is intended as part of the DMS v15 improved restart support.
Prior to this PR these changes would have occurred much earlier during startup:
docker-mailserver/target/scripts/start-mailserver.sh
Line 46 in 0294294
There is a slight chance that shifting the changes to apply at the end of
_setup()introduces a regression, but it should be unlikely:docker-mailserver/target/scripts/start-mailserver.sh
Lines 122 to 124 in 0294294
Restart support calls same two methods + (rsyslog daemon starts with
/var/log/mail/mail.log):docker-mailserver/target/scripts/start-mailserver.sh
Lines 167 to 196 in 0294294
DMS v15 is to release with the two separate call sites shown above as no maintainer presently has the time to investigate test failures introduced when moving methods those into a unified location.
Type of change
Checklist
CHANGELOG.md