PHPMailer and SMTP Alerts

This one has me stumped. I’m trying to get email alerting working but PHPMailer just doesn’t seem to be doing anything.
Testing with scripts/test-alert.php seems to process normally, no errors, and I get:

Attempting to email Alert to: [email protected]
OK

I’m monitoring in another console with a simple “tcpdump -i ens192 port 25” and no traffic happens.
The event log is generated saying it issued an alert to the “mail” transport.
I’ve verified the transport template is syntactically correct. (It’s default.)

I think I have toggled every setting in the Alerts configuration. I have tried using SMTP direct and sendmail. With sendmail, nothing enters the queue (have verified path.) I have also modified the line in LibreNMS/Util/Mail.php to “$mail->SMTPDebug = 4;” but I cannot get it to spit out any additional debug in CLI or UI regardless of php.ini settings.

Is there anything else I can do to verify PHPMailer is working? I feel like the disconnect is before it even attempts to send the alert. I’ve rechecked that my PHP dependencies are all installed.

This is running on Debian 12.
validate.php output:

Component Version
LibreNMS 23.8.2-30-g2618a99be (2023-09-06T16:34:39-05:00)
DB Schema 2023_08_30_105156_add_applications_soft_deleted (259)
PHP 8.2.10
Python 3.11.2
Database MariaDB 10.11.3-MariaDB-1
RRDTool 1.7.2
SNMP 5.9.3
===========================================

[OK] Composer Version: 2.6.1
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrdtool version ok
[OK] Connected to rrdcached

Thanks for reading!

In my case, I believe this was caused by having the default From: address ("LibreNMS" <[email protected]>)

I changed it to contain only the email address and it began sending.

Cheers!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.