Issues with Email Alerts

Hi there, I’m having a weird issue with email alerts. I THINK I’ve set it up all right in the UI. I looks ok. But when I push “test transport” the button goes red for a moment then nothing. I’ve Set up a few alerts to use email and they all give the error “Could not issue recovery for rule ‘Storage space warning’ to transport ‘mail’ Error: Could not instantiate mail function.”

The host can contact the mail server and SMTP isn’t blocked. tcpdump shows no attempt to connect to port 25 on the remote server. It’s just like nothing is happening. Upload of my conf screen for email.

output of my validate.

====================================

Component Version
LibreNMS 1.36-67-g30ca1e1
DB Schema 235
PHP 7.0.25-0ubuntu0.16.04.1
MySQL 10.0.33-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3
====================================

[OK] Database connection successful
[OK] Database schema correct
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX] You can fix this with ./scripts/github-remove
Modified Files:
daily.sh

Can we see your general alert settings?

Try with send mail

Here is my General alert settings page.

I’ve tried both sendmail and mail. Same “Cannot instantiate error”

You need to fix this first then run updates again.

run ./scripts/github-remove -d

That’s not broken. That’s a deliberate change to the daily.sh file. I’ve commented out the 3 lines that grab the updated notifications from the librenms site as I didn’t want to receive them. All other featured of the daily.sh file are untouched. This problem existed before I made that minor change.

The change was literally this.

#            notifications)
#                # Get notifications
#                local options=("notifications");
#                call_daily_php "${options[@]}";
#            ;;

okay, well I don’t know what else to recommend to you then at this point.

Is there any good debug I can enable or look at? Surly when I mash the “test transport” button it must execute some code? Is it possible to enable debug that would show up in some log that I can then use to figure out where it is failing. Because at the moment it doesn’t even look like it’s trying to send an email.

Something similar to the auth_test.php scripts in the /scripts folder?

Can you pastebin your config.php?

Same here and some other guy on discord, it worked perfectly for several months, but an update between 12.-14. Feb seems to destroy the smtp function.
So it’s not just you!

@Kevin_Krumm please tell us how to debug, if possible :slight_smile:

PS: The SMTP Host doesn’t even get contacted. Telnet works fine, so it’s not a firewall issue etc.

Edit: Did you release an update or something? SMTP Mail works now, after ~4 days of not working

Like I said need to update run. /daily.sh there was fix for this issue that was released.

To debug check librenms logs and look I’m the docs.librenms.org under alerting in there you should find alert testing.

Ok thanks, but either I’m blind, or you didn’t say this in this thread.

Sorry It was like three other threads. To many threads to keep up with.

Even I am having same issue now. After correcting the error: no config in email alerts.

Below is the validate output

./validate.php

Component Version
LibreNMS 1.48-3-g83a53d7cd
DB Schema 2019_01_16_195644_add_vrf_id_and_bgpLocalAs (131)
PHP 7.2.10-0ubuntu0.18.04.1
MySQL 10.1.34-MariaDB-0ubuntu0.18.04.1
RRDTool 1.7.0
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.8.3
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

Please, check Enabling Email alerts return "Error: No config item"