-
-
Notifications
You must be signed in to change notification settings - Fork 48
cmdeploy: fail on errors in postfix/dovecot config #813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit 0aa0324.
|
Fails with: |
|
Ok, addressed the syntax error (I sincerely wonder how this slipped through, I suppose it only manifests on a full dovecot restart); and added a config check before restarting so syntax errors don't bring down the service again. |
|
maybe it makes sense to do such a check on postfix as well? |
trickier, |
aeadae2 to
9e31985
Compare
04a6b01 to
74267b1
Compare
| if need_restart: | ||
| server.shell( | ||
| name="Validate postfix configuration", | ||
| commands=["postconf -n >/dev/null"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will not fail on warnings, only fatal errors; e.g. wrong config keys only cause warnings. But that's fine I guess, at least the service will start normally.
github deployments: be lenient on the whitespace in sed replace of mtail_address
The ! character in != is an invalid token in Dovecot's unified filter language (2.3.12+). The parser expected a comparison operator (=, >, <) and choked on !.
postfix: also fail on warnings
ea128dc to
5410bb3
Compare
j4n
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
improved postconf checks (not as nice as doveconf)
This should fail CI, at least the commit failed when deployed manually.
When we confirmed that CI fails on broken config, we can fix the dovecot config and merge to main.