SMTP connect() failed on new setup
SMTP connect() failed on new setup
Hello Team,
Here is the brief of notification issue we are facing.
Hosted Nagios XI on WAS cloud with public IP assigned and trying to send email notification but could not do so. We have configured O365 email settings as per Microsoft documents.
Also tested the SMTP relay on PowerShell and it works without an issue, so it is not the email account.
Below is the error we received when try to generate test notification.
A test email was sent to [email protected]
----
Mailer said: [02-06-2022 18:04:40] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=ssl), Referer: admin/testemail.php
An error occurred sending a test email!
I have attached our system profile.
Regards
JP
Here is the brief of notification issue we are facing.
Hosted Nagios XI on WAS cloud with public IP assigned and trying to send email notification but could not do so. We have configured O365 email settings as per Microsoft documents.
Also tested the SMTP relay on PowerShell and it works without an issue, so it is not the email account.
Below is the error we received when try to generate test notification.
A test email was sent to [email protected]
----
Mailer said: [02-06-2022 18:04:40] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=ssl), Referer: admin/testemail.php
An error occurred sending a test email!
I have attached our system profile.
Regards
JP
You do not have the required permissions to view the files attached to this post.
Re: SMTP connect() failed on new setup
Hi
Please go to Admin, Email Settings: If the Send From: is showing Nagios XI <root@localhost> then please change it to a legitimate
email address as most mail servers will reject emails from root@localhost.
Thanks!
Please go to Admin, Email Settings: If the Send From: is showing Nagios XI <root@localhost> then please change it to a legitimate
email address as most mail servers will reject emails from root@localhost.
Thanks!
You do not have the required permissions to view the files attached to this post.
Re: SMTP connect() failed on new setup
I can confirm that my email settings are correct as per my attached screenshot.
I have tested with multiple O365 accounts and still failing
A test email was sent to [email protected]
----
Mailer said: [02-07-2022 16:05:04] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=ssl), Referer: admin/testemail.php
An error occurred sending a test email!
I have tested with multiple O365 accounts and still failing
A test email was sent to [email protected]
----
Mailer said: [02-07-2022 16:05:04] SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=smtp.office365.com;port=587;smtpauth=true;security=ssl), Referer: admin/testemail.php
An error occurred sending a test email!
You do not have the required permissions to view the files attached to this post.
Re: SMTP connect() failed on new setup
Hi
What version of php are you running?
Thanks
What version of php are you running?
Thanks
Re: SMTP connect() failed on new setup
How am I able to check that? as I am new with Nagios XI, please provide steps on how to check?
I have also attached our current profile downloaded
I have downloaded the latest version and not sure but maybe the php is the problem
I have also attached our current profile downloaded
I have downloaded the latest version and not sure but maybe the php is the problem
You do not have the required permissions to view the files attached to this post.
Re: SMTP connect() failed on new setup
Hi
Please go to a shell (command line) on your Nagios XI server and run:
php -v
That will tell you the php version.
If it is 5.xx.xx then we will need to get you to php7
Let me know what version you get.
Thanks!
Please go to a shell (command line) on your Nagios XI server and run:
php -v
That will tell you the php version.
If it is 5.xx.xx then we will need to get you to php7
Let me know what version you get.
Thanks!
Re: SMTP connect() failed on new setup
Hi
Thank you for your message, sorry I am very bad with Linux and with your help managed to check the version.
My version is PHP 5.4.16
So it will need to be updated, would you be able to provide the steps to update the PHP to the correct version?
I take it has to do with Microsoft getting rid of TLS 1.0 and 1.1
Thank you for your message, sorry I am very bad with Linux and with your help managed to check the version.
My version is PHP 5.4.16
So it will need to be updated, would you be able to provide the steps to update the PHP to the correct version?
I take it has to do with Microsoft getting rid of TLS 1.0 and 1.1
Re: SMTP connect() failed on new setup
You should be able to follow the guide below:
https://support.nagios.com/kb/article/n ... 7-860.html
But before you do, send the output of this command:
If your XI install was installed via RPM or via the offline package, DO NOT follow that guide.
EDIT: You likely need to do this after upgrading PHP as well because of Microsoft getting rid of TLS 1.0 and 1.1.
Edit this file:
Change line 360 from:
To:
https://support.nagios.com/kb/article/n ... 7-860.html
But before you do, send the output of this command:
Code: Select all
rpm -qa | grep nagiosxiEDIT: You likely need to do this after upgrading PHP as well because of Microsoft getting rid of TLS 1.0 and 1.1.
Edit this file:
Code: Select all
/usr/local/nagiosxi/html/includes/phpmailer/class.smtp.phpCode: Select all
$crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT;Code: Select all
$crypto_method = STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;Re: SMTP connect() failed on new setup
Hi,
thank you for your message, please see below response for command: rpm -qa | grep nagiosxi that was run on our server.
Our Nagios was installed via a custom template on AWS, so I am not sure which steps should be followed.
I will attach the screenshot of the setup that was used on AWS.
[centos@ip-172-31-16-10 ~]$ rpm -qa | grep nagiosxi
nagiosxi-deps-el7-5.8.7-1.noarch
thank you for your message, please see below response for command: rpm -qa | grep nagiosxi that was run on our server.
Our Nagios was installed via a custom template on AWS, so I am not sure which steps should be followed.
I will attach the screenshot of the setup that was used on AWS.
[centos@ip-172-31-16-10 ~]$ rpm -qa | grep nagiosxi
nagiosxi-deps-el7-5.8.7-1.noarch
You do not have the required permissions to view the files attached to this post.
Re: SMTP connect() failed on new setup
You would follow that guide:
- Take a VM snapshot before doing it though in case you run into issues
https://support.nagios.com/kb/article/n ... 7-860.html
- Take a VM snapshot before doing it though in case you run into issues
https://support.nagios.com/kb/article/n ... 7-860.html