silence errorneous output when not generating reports#1657
Merged
georglauterbach merged 4 commits intodocker-mailserver:masterfrom Oct 21, 2020
Conversation
3bac875 to
2b3eadd
Compare
2b3eadd to
cc8592e
Compare
georglauterbach
requested changes
Oct 18, 2020
Contributor
Author
|
Ok, I took another look and I now see that my first understanding of the logic of the script was off. My changes now boil down to the following:
|
Member
I like this. Nevertheless, I will request a review more. But I will already approve of this :) |
georglauterbach
approved these changes
Oct 18, 2020
casperklein
approved these changes
Oct 19, 2020
erik-wramner
approved these changes
Oct 21, 2020
Contributor
|
Perhaps the message should be info rather than warning as having the reports disabled is perfectly normal? Other than that it looks fine! |
Member
|
That's a good idea @erik-wramner. @erdos4d I will just do this, as this is the fastest and easiest way. Then I will merge it. |
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.
Another small PR in my efforts to get the logs clean. The documentation states that for the postfix and logwatch reports, we should set PFLOGSUMM_TRIGGER and LOGWATCH_INTERVAL to empty (the defaults) to not generate those reports. When doing this, the functions _setup_mail_summary and _setup_logwatch get called and generate the erroneous output:
Error PFLOGSUMM_TRIGGER not found in _setup_mail_summery
Warning LOGWATCH_INTERVAL not found in _setup_logwatch
This PR corrects the start-mailserver.sh script to not call those function in the case that we are not generating reports. I tested it with a container build and run both with and without the changes and the log lines disappear when the changes are present.