fix: Support chmod on /var/log/mail/* when dir is empty#4391
fix: Support chmod on /var/log/mail/* when dir is empty#4391georglauterbach merged 3 commits intodocker-mailserver:masterfrom
chmod on /var/log/mail/* when dir is empty#4391Conversation
|
LGTM. However, I am wondering about the error message. Since we don't use |
|
Thanks for spotting this, it'd trigger on first container setup too with a fresh volume mount that doesn't copy the images internal content.
We use it a few times in scripts. The setup call for getmail during initial container setup does set it which might continue to affect usage afterwards that follows outside the function? (I haven't verified, just a guess): docker-mailserver/target/scripts/startup/setup.d/getmail.sh Lines 23 to 25 in 5686a40 |
|
Thanks for pointing that out. You are right, I've overlooked that. |
chmod on /var/log/mail/* when dir is empty
polarathene
left a comment
There was a problem hiding this comment.
Good to merge.
Might wait a day or two for any other v15 bug reports, then push this out as a bug fix release as v15.0.1? @casperklein @georglauterbach
I'm reluctant to delay until a 15.1 given what our release cadence typically is like.
|
I'll review this today, please do not merge yet. |
|
@georglauterbach the fix seems fine, it properly only applies to files, not that I think they'd be any directories in The directory would be empty when given a fresh volume mount at container startup, or like the author during container restarts with
|
|
I just wanted to verify that there are not too many files, and no directories inside The Releasing v15.0.1 sounds like a good idea 👍🏼 |
It's an issue, but not a big one. OPs error message would be different, if getmail was not enabled. See my first post. I think that should be streamlined. We could move the nullglob command to the top of start-mailserver.sh, making it consequently available to all code that is processed by |
Description
To prevent SSD wear from logs, I mount
/var/log/mail/to tmpfs in my setup. I collect logs from standard output using Loki.As a result, the
/var/log/maildirectory is empty whenever the container restarts. Attempting to change permissions on this directory using shell expansion leads to errors like:Using
findavoids runningchmodif there is nothing to modify, preventing these errors. It's also more convenient than shell expansion, which can cause errors like "too many arguments".Type of change
Checklist
docs/)CHANGELOG.md