fix: Ensure .svbin files are newer than .sieve source files#3779
Merged
georglauterbach merged 4 commits intodocker-mailserver:masterfrom Jan 15, 2024
Merged
Conversation
This change prevents operations applied to both files that adjusts their `mtime` attribute which sometimes results in the same timestamp which causes Dovecot to log errors. Functionally there doesn't appear to be any issue. After logging the error, the existing svbin is used and works correctly. This does help avoid false-positives in the test-suite that are asserting for errors in a log.
polarathene
commented
Jan 15, 2024
georglauterbach
approved these changes
Jan 15, 2024
Member
|
I merged this right away so we can put it into v13.3.0. |
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 change prevents operations applied to both files that adjusts their
mtimeattribute which sometimes results in the same timestamp which causes Dovecot to log errors.Functionally there doesn't appear to be any issue. After logging the error, the existing svbin is used and works correctly.
This does help avoid false-positives in the test-suite that are asserting for errors in a log.
Fixes: #3558 (comment)
Context
This fix prevents the two error log lines below that are preceding the log where the sieve script is run successfully regardless:
I've only witnessed this personally on my current system (AMD 7940HS with Windows 11 + WSL2), it's possibly related to the filesystem layer and changes happening within a certain window to be coalesced into the same timestamp as an optimization? 🤷♂️
If the
.sievefile is newer (or the same timestamp in this case), Dovecot will try compile a new.svbin(and presumably fallback to the existing one when that fails).We can see that the failure is due to the VMail user
docker:docker/5000:5000lacking permissions to write.svbinas the directory ownership isdovecot:root/110:0with755permissions.misc.sh,dovecot.sh,rspamd.shall runsievecfor.sievefiles in either/usr/lib/dovecot/sieve-pipeor/usr/lib/dovecot/sieve-global. As such, while we could adjust the permission for the VMail static user, it won't support deployments with accounts that have their own unique UID (some LDAP users are known to have this setup).mtimeis adjusted as this PR does, as we are intentionally compiling these during startup scripts and there should be no need to compile again afterwards when mail is received and processed by these scripts.Type of change
Checklist:
CHANGELOG.md