I was not getting alerts from check_mk when my servers needed attention

I was not getting alerts from check_mk when my servers needed attention. I then tried the mail command from the server designed to be the checkmk server. The mail command did not return any error and I used mailq command and saw that no messages were in q. However, When I checked my work email (which uses Microsoft Outlook) there was No email there. One of my collegues suggest that the issue is how the sender appears and that it is seen as spam before it gets to my inbox. It used to appear like this root@fullyqualifieddomainnameofserver (ONE email of the 25 I sent came through) so I created this script #!/bin/bash

Input parametersFROM=β€œ$1"SUBJECT=”$2"

Send email/usr/sbin/sendmail.sendmail -f β€œ$FROM” β€œ$TO” <<EOFFrom: $FROMSubject: $SUBJECTTo: "workemail"BODY:"test content"SMTPPORT:25EOF

and have been chaning the From variable however I am still NOT Recieving any emails anyone know why?

Hallo,
insert one host, configure everything and send test notifications.
You should see enough informations in the logfiles of the host if you use a local mailserver like postfix.

1 Like

Become site user and send a test email:

apt install mailutils
omd su SITENAME
echo test | mail -s test someone@example.com