Best practice for SMTP notification setup on Docker

Hi

I was able to find some posts about this topic, however I still don’t know the best way to implement it.

I tried to use the internal Posftix and O365 direct send (can’t send emails to people outside your organization).

Using docker install parameters:
-e MAIL_RELAY_HOST=‘domain.mail.protection.outlook.com’’

Error, no solution found so far:
Status: PID file exists, but instance is not running!

If I interpreted this correctly it is not supported for docker?

Checkmk containers do not currently support configuring credentials for a smart host. You can bind a postfix configuration or a configuration folder from the Docker node if you need it.

so I really need to setup a dedicated Docker for the SMTP Relay?

Thanks for your help

Hi Nicola,

Were you able to find a solution to the problem?
I’m currently facing the same thing.

Just tested with the latest docker image. Postfix is starting just fine…

image

Have you tried adding " --cap-add=SYS_PTRACE" to your docker command?

Hi together

That was the support feedback I got:
In this case, you’re using a docker container, so you need to create a separate Docker container to send Emails.

Checkmk containers currently do not support the configuration of access data for a smart host as described here:

Since you are using the Checkmk Cloud Edition, you can try bypassing postfix completely so that Checkmk forwards notifications directly to a smarthost. This is done by the synchronous SMTP, which is described in detail in the article about notifications. Here an authentication over SMTP is also possible: Notifications - via Email, SMS, ticket system and more
(this workaround did not work for me)

I will try now the suggestion from @chauhan_sudhir

@a.kupenov solved after adding suggested parameter for docker installation (–cap-add=SYS_PTRACE) and changed from port 25 (with EXO relay connector) to 587 ( SMTP AUTH client submission) because docker blocked outgoing traffic with port 25:
How to set up a multifunction device or application to send emails using Microsoft 365 or Office 365 | Microsoft Learn

and 9.3. Synchronous delivery for HTML emails:
Notifications - via Email, SMS, ticket system and more (checkmk.com)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.