Skip to content

capture sendmail output#923

Open
jnweiger wants to merge 1 commit into
Checkmk:masterfrom
jnweiger:propagate_sendmail_errors
Open

capture sendmail output#923
jnweiger wants to merge 1 commit into
Checkmk:masterfrom
jnweiger:propagate_sendmail_errors

Conversation

@jnweiger

Copy link
Copy Markdown

Seen with checkmk 2.4.0p24 in appliance 1.7.17

When there is an error with sending an email, the return code of sendmail is captured, but no further diagnostics.
In my example, a reporting background job failed (due to a postfix missconfiguration) with this terse message in the logs and in the gui:

Scheduling report in background failed:

With nothing after the colon.

Expected behaviour: Error messages from sendmail should propagate into logs and gui.

As one part of the fix, I suggest to capture stderr and stdout of sendmail.
This enables other parts of the code to pick up error messages and show them appropriately.

and encode it into the Exception message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant