Setting up smtp on checkmk raw?

Raw: Latest:

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)
command not found

I’m in the process of trying to setup CheckMK raw and have hit a barrier pretty early on.

I’m trying to point the server at my internal SMTP relay without much luck and have burnt a few hours on it.
I’ve tried variations of modifying /omd/sites/cmk/etc/mail.rc and /etc/postfix/mail.cf (which the mail command appears to be using) and have not successfully gotten an email through to my SMTP host itself.

Is there any better documentation for this task then 3.2 on the following page?

Does raw even support SMTP?

Hi @gawainsr2 and welcome to the checkmk community.

Checkmk uses just the os included mail program to send mails and this works out of the box. If you like to use you local machine just as relay you have to configure sendmail (seems like the program in your case) accordingly.
If you can send mails via echo "My message" | mail -s <subject> <your-user@<your-domain>.com you have configured it right. The key component to configure inside main.cf should be relayhost = <your-smtp-server>.com.

Have you enabled the notification and configured at least a fallback address at wato? Could you take a look at the the log file ~site/var/log/notify.log if there is any hint whats going wrong?

Just configure exim4 to use a smarthost like O365 with the right credentials, domain and port…

I cannot find a file named “main.cfg” (or main.cf) under /omd , just /etc/postfix/main.cf (although by default that’s not in a persistent directory)

?

I recently had the same issue and had to configure sendmail to be able to use my Microsoft 365 account for sending mail. Following tutorial, starting from the header “Configure SMTP”, helped me to achieve that:

Did you do this on a docker container?

I don’t know what a docker container is. Pretty new with Checkmk. (-:
I adjusted the sendmail of the ubuntu server where Checkmk is running on.

That’s the right file, sorry for misspelling it.

OK I was definitely looking at the right file then, I may need to mount that to the host.

I figured out why It wasn’t sending though, Appppearantly you can’t communicate with the host IP when using the IPVLAN driver so I’ll need to bind the mail server to a discrete IP rather then a port binding on the host (thank god I use hostname alias rather then IP)

I’m still struggling with this some. Through a bunch of effort I’ve gotten postfix working but I have to manually start it after the container loads…

Someone helped me find this and i think i’m set!

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.