Error e-mail notification

Hey everyone,

I have a problem with sending CheckMk alerts by mail. I have followed the official instructions for the configuration, installed Nullmailer and sent myself a test mail which arrived successfully. However, I do not receive mails from CheckMk itself, I have created a user as described in the instructions, entered mail address and added him to the contact group “everything”. But I do not receive any emails, what is the reason for this?

In the events of recent I just get the message “spooled mail to local mail transmission agent”

**CMK version:2.1.0p22
**OS version:Debian 11.6

**Error message:Spooled mail to local mail transmission agent

Hi Himbo,

Have you looked at the Nullmailer logs to see what is happening with the message(s) after Checkmk hands them off?

Spooled mail to local mail transmission agent is not an error message. It is the best Checkmk can provide in terms of the status of outbound email messages. Once Checkmk has handed it off to the local MTA, it (Checkmk) has no further visibility into what happens to the message.

Hope this helps,
Jason

Hey jsmyth,

thanks for the response. I am still a beginner to Linux so I have some difficulties and get confused in where to exactly find some stuff but I tried to look for the nullmailer log files in /var/spool/nullmailer. There are just 3 folders (failed, queue and tmp) which are empty and a file called “trigger” which is 0kb big.

In the syslog directory I also can’t find any indication that mails are tried to be sent by CheckMk.

However, when I connect to the server via SSH and send a test mail I also get to see something in the syslog file.

nullmailer-send[134112]: Trigger pulled.
Mar 23 10:44:37 Monitoring nullmailer-send[134112]: Queue being rescanned.
Mar 23 10:44:37 Monitoring nullmailer-send[134112]: Starting delivery, 1 message(s) in queue.
Mar 23 10:44:37 Monitoring nullmailer-send[134112]: Delivery starts: host: 172.20.0.108 protocol: smtp file: 1679564677.1257063
Mar 23 10:44:37 Monitoring nullmailer-send[134112]: From: <“.”> to: <“mailaddress”>
Mar 23 10:44:37 Monitoring nullmailer-send[134112]: Message-Id: <1679564677.467322.1257062.nullmailer@“monitoring.domain.local"l>
Mar 23 10:44:37 monitoring systemd[1]: session-121709.scope: Succeeded.
Mar 23 10:44:37 monitoring systemd[1]: session-121719.scope: Succeeded.
Mar 23 10:44:37 monitoring nullmailer-send[1257064]: smtp: Successful: 250 2.6.0 1679564677.467322.1257062.nullmailer@monitoring.domain.local [InternalId=67332202301155, Hostname=”…"] 1763 bytes in 0.109, 15.727 KB/sec Mail queued for delivery.
Mar 23 10:44:37 Monitoring nullmailer-send[134112]: File sent.
Mar 23 10:44:37 Monitoring nullmailer-send[134112]: Delivery complete, 0 message(s) remaining.

Apparently there seems to be no problem when I directly send out a test mail, but the automated mails from CheckMk do not even make it to the logs…

Hi Himbo,

I’m not familiar with Nullmailer but, from what you posted it seems that it logs to the syslog file.

As a troubleshooting step, I recommend watching the syslog file while triggering an email notification from within Checkmk. You can watch the syslog file with tail -f /var/log/syslog. If you find that there is a lot of unrelated information being written to syslog during your test, you can filter the output with grep: tail -f /var/log/syslog | grep -Fi nullmailer. Depending on your system configuration, you may need to preface the commands with sudo to request elevated permissions.

If there really is nothing shown in the logs then Checkmk is likely failing to pass the message to Nullmailer correctly. If there is something in the logs then the log messages should give a better indication of what is happening.

Hope this helps,
Jason

2 Likes

Hi jsmyth,

I think I am getting closer… now I get the following:

Maybe it is because I am running checkmk on Docker? Do I have to edit anything in my settings?

Hi Himbo,

Maybe it is because I am running checkmk on Docker?

Yes, this is a key piece of the puzzle. When Checkmk is running in Docker, the local MTA is not on the Docker host; it is inside the container.

Have you followed the configuration instructions in the documentation?

Regards,
Jason

2 Likes

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.