Unable to send email notifications via external SMTP server

CMK version: 2.2.0 Raw Edition
OS version: docker container checkmk/check-mk-raw:2.2.0

I want checkmk to be able to send email notifications. To do this I have read Notifications - via Email, SMS, Ticketsystems and more, but the information there is quite sparse.

In theory the task is quite simple. I just want to use an existing mail account we have at IONOS and use this to send notifications. IONOS provides this info:
Server: smtp.ionos.de, Port: 465, Connection type: SSL/TLS
And together with my email address and password sending emails should by fairly simple.

In practice I have tried a lot of guides on how to configure sendmail, postfix or mailx for a few hours now and nothing worked. I don’t even get error messages or logs. It just doesn’t do anything. Most guides assume you already have a local mail server, which we don’t. I don’t actually know anything about SMTP server configuration and most of this seems so overcomplicated when all I want is just to send a mail via SMTP.

Can somebody please assist in configuring this?

I suggest using a local nullmailer.

Thank you very much!

I didn’t know this existed. For posterity here is what I did:

apt-get install nullmailer
echo "smtp.ionos.de smtp --auth-login --user=mymail@example.com --pass=mypassword --port=587 --starttls" > /etc/nullmailer/remotes
echo "example.com" > /etc/nullmailer/defaultdomain
chmod 600 /etc/nullmailer/remotes
service nullmailer restart

Tested with this and with the fake check results command:

echo "error" | NULLMAILER_NAME="Testsystem check" mail -s "This is just a test with nullmailer" "mymail@example.com"
1 Like

We recently emphasized it in the general article on installation on non container Linux. It is understandable that you won’t look there. We’ll update the docker article accordingly.

I think a mention of this here: Notifications - via Email, SMS, Ticketsystems and more would be the most useful.

Yes, that part is overly complicated! And we’ll have to fix the typographical quotation marks there. Ouch!