Unable to send emails via Nagios Xi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
louissiong
Posts: 32
Joined: Wed Nov 20, 2019 1:07 am

Unable to send emails via Nagios Xi

Post by louissiong »

Hi Nagios Support,

Over the last few days, we have been experiencing issues with sending out emails via Nagios XI.
All alerts as seemed not able to send out notifications. Error message received is as follows :

SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/ ... leshooting (method=smtp;host=192.168.131.171;port=25;smtpauth=true;security=none), Referer: admin/testemail.php

Anything we should look at ? Please advise. Thanks a lot.




Regards,
Louis
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Unable to send emails via Nagios Xi

Post by benjaminsmith »

Hi Louis,

It looks like it's having trouble connecting to the SMTP server. We have a guide on how to turn on debug mode for phpmailer to help troubleshoot this.

Before we go ahead an enable that, let's make sure the settings are correct. I've seen a few cases where the input fields (saved by the browser) are not current, please double check your settings, and then follow the guide below to enable debugging.

PHPMailer - Troubleshooting Using Debug Logging

Next, try to send a test email and post a screenshot of the error to the thread. Thanks.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
louissiong
Posts: 32
Joined: Wed Nov 20, 2019 1:07 am

Re: Unable to send emails via Nagios Xi

Post by louissiong »

Hi Ben,

Thanks for your prompt reply.
I managed to turn on the phpmailer debug logging. From the test result, it seems a test email
was send out successfully but I was unable to receive anything at my end. What could this be due
to ?

Please revert. Thanks. Attached are the screenshots.




Regards,
Louis
You do not have the required permissions to view the files attached to this post.
louissiong
Posts: 32
Joined: Wed Nov 20, 2019 1:07 am

Re: Unable to send emails via Nagios Xi

Post by louissiong »

2020-06-09 03:04:07 Connection: opening to 192.168.131.171:25, timeout=300, options=array ()
2020-06-09 03:04:07 Connection: opened
2020-06-09 03:04:07 SMTP -> get_lines(): $data is ""
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "220 abft1smtsvr01.ABTNP.int Microsoft ESMTP MAIL Service, Version: 10.0.14393.0 ready at Tue, 9 Jun 2020 11:04:07 +0800 "
2020-06-09 03:04:07 SERVER -> CLIENT: 220 abft1smtsvr01.ABTNP.int Microsoft ESMTP MAIL Service, Version: 10.0.14393.0 ready at Tue, 9 Jun 2020 11:04:07 +0800
2020-06-09 03:04:07 CLIENT -> SERVER: EHLO 192.168.131.137
2020-06-09 03:04:07 SMTP -> get_lines(): $data is ""
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250-abft1smtsvr01.ABTNP.int Hello [192.168.131.137]"
2020-06-09 03:04:07 SMTP -> get_lines(): $data is "250-abft1smtsvr01.ABTNP.int Hello [192.168.131.137]"
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250-TURN"
2020-06-09 03:04:07 SMTP -> get_lines(): $data is "250-abft1smtsvr01.ABTNP.int Hello [192.168.131.137]250-TURN"
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250-SIZE 33554432"
2020-06-09 03:04:07 SMTP -> get_lines(): $data is "250-abft1smtsvr01.ABTNP.int Hello [192.168.131.137]250-TURN250-SIZE 33554432"
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250-ETRN"
2020-06-09 03:04:07 SMTP -> get_lines(): $data is "250-abft1smtsvr01.ABTNP.int Hello [192.168.131.137]250-TURN250-SIZE 33554432250-ETRN"
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250-PIPELINING"
2020-06-09 03:04:07 SMTP -> get_lines(): $data is "250-abft1smtsvr01.ABTNP.int Hello [192.168.131.137]250-TURN250-SIZE 33554432250-ETRN250-PIPELINING"
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250-DSN"
2020-06-09 03:04:07 SMTP -> get_lines(): $data is "250-abft1smtsvr01.ABTNP.int Hello [192.168.131.137]250-TURN250-SIZE 33554432250-ETRN250-PIPELINING250-DSN"
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250-ENHANCEDSTATUSCODES"
2020-06-09 03:04:07 SMTP -> get_lines(): $data is "250-abft1smtsvr01.ABTNP.int Hello [192.168.131.137]250-TURN250-SIZE 33554432250-ETRN250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES"
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250-8bitmime"
2020-06-09 03:04:07 SMTP -> get_lines(): $data is "250-abft1smtsvr01.ABTNP.int Hello [192.168.131.137]250-TURN250-SIZE 33554432250-ETRN250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-8bitmime"
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250-BINARYMIME"
2020-06-09 03:04:07 SMTP -> get_lines(): $data is "250-abft1smtsvr01.ABTNP.int Hello [192.168.131.137]250-TURN250-SIZE 33554432250-ETRN250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-8bitmime250-BINARYMIME"
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250-CHUNKING"
2020-06-09 03:04:07 SMTP -> get_lines(): $data is "250-abft1smtsvr01.ABTNP.int Hello [192.168.131.137]250-TURN250-SIZE 33554432250-ETRN250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-8bitmime250-BINARYMIME250-CHUNKING"
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250-VRFY"
2020-06-09 03:04:07 SMTP -> get_lines(): $data is "250-abft1smtsvr01.ABTNP.int Hello [192.168.131.137]250-TURN250-SIZE 33554432250-ETRN250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-8bitmime250-BINARYMIME250-CHUNKING250-VRFY"
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250 OK"
2020-06-09 03:04:07 SERVER -> CLIENT: 250-abft1smtsvr01.ABTNP.int Hello [192.168.131.137]250-TURN250-SIZE 33554432250-ETRN250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-8bitmime250-BINARYMIME250-CHUNKING250-VRFY250 OK
2020-06-09 03:04:07 CLIENT -> SERVER: MAIL FROM:<[email protected]>
2020-06-09 03:04:07 SMTP -> get_lines(): $data is ""
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250 2.1.0 [email protected] OK"
2020-06-09 03:04:07 SERVER -> CLIENT: 250 2.1.0 [email protected] OK
2020-06-09 03:04:07 CLIENT -> SERVER: RCPT TO:<[email protected]>
2020-06-09 03:04:07 SMTP -> get_lines(): $data is ""
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "250 2.1.5 [email protected] "
2020-06-09 03:04:07 SERVER -> CLIENT: 250 2.1.5 [email protected]
2020-06-09 03:04:07 CLIENT -> SERVER: DATA
2020-06-09 03:04:07 SMTP -> get_lines(): $data is ""
2020-06-09 03:04:07 SMTP -> get_lines(): $str is "354 Start mail input; end with <CRLF>.<CRLF>"
2020-06-09 03:04:07 SERVER -> CLIENT: 354 Start mail input; end with <CRLF>.<CRLF>
2020-06-09 03:04:07 CLIENT -> SERVER: Date: Tue, 9 Jun 2020 11:04:07 +0800
2020-06-09 03:04:07 CLIENT -> SERVER: To: [email protected]
2020-06-09 03:04:07 CLIENT -> SERVER: From: [email protected]
2020-06-09 03:04:07 CLIENT -> SERVER: Reply-To: [email protected]
2020-06-09 03:04:07 CLIENT -> SERVER: Subject: Nagios XI Email Test
2020-06-09 03:04:07 CLIENT -> SERVER: Message-ID: <[email protected]>
2020-06-09 03:04:07 CLIENT -> SERVER: X-Mailer: PHPMailer 5.2.26 (https://github.com/PHPMailer/PHPMailer)
2020-06-09 03:04:07 CLIENT -> SERVER: MIME-Version: 1.0
2020-06-09 03:04:07 CLIENT -> SERVER: Content-Type: multipart/alternative;
2020-06-09 03:04:07 CLIENT -> SERVER: boundary="b1_e82ac1932409593e6c63dd243337bfc1"
2020-06-09 03:04:07 CLIENT -> SERVER: Content-Transfer-Encoding: 8bit
2020-06-09 03:04:07 CLIENT -> SERVER:
2020-06-09 03:04:07 CLIENT -> SERVER: This is a multi-part message in MIME format.
2020-06-09 03:04:07 CLIENT -> SERVER:
2020-06-09 03:04:07 CLIENT -> SERVER: --b1_e82ac1932409593e6c63dd243337bfc1
2020-06-09 03:04:07 CLIENT -> SERVER: Content-Type: text/plain; charset=us-ascii
2020-06-09 03:04:07 CLIENT -> SERVER:
2020-06-09 03:04:07 CLIENT -> SERVER: This is a test email from Nagios XI
2020-06-09 03:04:07 CLIENT -> SERVER:
2020-06-09 03:04:07 CLIENT -> SERVER:
2020-06-09 03:04:07 CLIENT -> SERVER: --b1_e82ac1932409593e6c63dd243337bfc1
2020-06-09 03:04:07 CLIENT -> SERVER: Content-Type: text/html; charset=us-ascii
2020-06-09 03:04:07 CLIENT -> SERVER:
2020-06-09 03:04:07 CLIENT -> SERVER: This is a test email from Nagios XI
2020-06-09 03:04:07 CLIENT -> SERVER:
2020-06-09 03:04:07 CLIENT -> SERVER:
2020-06-09 03:04:07 CLIENT -> SERVER:
2020-06-09 03:04:07 CLIENT -> SERVER: --b1_e82ac1932409593e6c63dd243337bfc1--
2020-06-09 03:04:07 CLIENT -> SERVER:
2020-06-09 03:04:07 CLIENT -> SERVER: .
2020-06-09 03:04:08 SMTP -> get_lines(): $data is ""
2020-06-09 03:04:08 SMTP -> get_lines(): $str is "250 2.6.0 <[email protected]> Queued mail for delivery"
2020-06-09 03:04:08 SERVER -> CLIENT: 250 2.6.0 <[email protected]> Queued mail for delivery
2020-06-09 03:04:08 CLIENT -> SERVER: QUIT
2020-06-09 03:04:08 SMTP -> get_lines(): $data is ""
2020-06-09 03:04:08 SMTP -> get_lines(): $str is "221 2.0.0 abft1smtsvr01.ABTNP.int Service closing transmission channel"
2020-06-09 03:04:08 SERVER -> CLIENT: 221 2.0.0 abft1smtsvr01.ABTNP.int Service closing transmission channel
2020-06-09 03:04:08 Connection: closed
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Unable to send emails via Nagios Xi

Post by benjaminsmith »

Hi Louis,

Interesting. Have you checked the spam folder on the test email account? In the initial error message, it was unable to connect, but now it is connecting and sending successfully but you did not receive the message. In this instance, it is typically the case that the message is being blocked or filtered.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
louissiong
Posts: 32
Joined: Wed Nov 20, 2019 1:07 am

Re: Unable to send emails via Nagios Xi

Post by louissiong »

Thanks Ben for shedding some light.
Managed to resolve the issue. Problem due to the mail routing has been disabled at the
Exchange Server accidentally by mail admin. What a relief !



Regards,
Louis
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Unable to send emails via Nagios Xi

Post by scottwilkerson »

louissiong wrote:Thanks Ben for shedding some light.
Managed to resolve the issue. Problem due to the mail routing has been disabled at the
Exchange Server accidentally by mail admin. What a relief !



Regards,
Louis
Glad it is resolved!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked