The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.17 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.1.17 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 749 - File: global.php PHP 8.1.17 (Linux)
File Line Function
/global.php 749 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 889 - File: global.php PHP 8.1.17 (Linux)
File Line Function
/global.php 889 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 889 - File: global.php PHP 8.1.17 (Linux)
File Line Function
/global.php 889 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $unreadreports - Line: 45 - File: global.php(956) : eval()'d code PHP 8.1.17 (Linux)
File Line Function
/global.php(956) : eval()'d code 45 errorHandler->error
/global.php 956 eval
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 47 - File: global.php(956) : eval()'d code PHP 8.1.17 (Linux)
File Line Function
/global.php(956) : eval()'d code 47 errorHandler->error
/global.php 956 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1021 - File: global.php PHP 8.1.17 (Linux)
File Line Function
/global.php 1021 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5196 - File: inc/functions.php PHP 8.1.17 (Linux)
File Line Function
/inc/functions.php 5196 errorHandler->error
/global.php 1021 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(257) : eval()'d code PHP 8.1.17 (Linux)
File Line Function
/printthread.php(257) : eval()'d code 2 errorHandler->error
/printthread.php 257 eval
/printthread.php 117 printthread_multipage
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined variable $nofollow - Line: 1 - File: inc/class_parser.php(1138) : eval()'d code PHP 8.1.17 (Linux)
File Line Function
/inc/class_parser.php(1138) : eval()'d code 1 errorHandler->error
/inc/class_parser.php 1138 eval
/inc/class_parser.php 1644 postParser->mycode_parse_url
[PHP]   postParser->mycode_auto_url_callback
/inc/class_parser.php 1597 preg_replace_callback
/inc/class_parser.php 524 postParser->mycode_auto_url
/inc/class_parser.php 201 postParser->parse_mycode
/printthread.php 179 postParser->parse_message
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.17 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Category5.TV Community Forum
Can not send notification mail - Printable Version

+- Category5.TV Community Forum (https://forum.category5.tv)
+-- Forum: NEMS - Nagios Enterprise Monitoring Server (https://forum.category5.tv/forum-8.html)
+--- Forum: Help and Support (https://forum.category5.tv/forum-9.html)
+--- Thread: Can not send notification mail (/thread-128.html)

Pages: 1 2


Can not send notification mail - luckyworlock - 01-31-2018

Hi,
I just found NEMS and install it and love it.
i can configure all the host that i want to monitored but still have a problem receiving notification email.
I have setting the contact details config properly and still can not receive email.
When i test with the command sudo nems-mailtest my@emailaddress this error coming :
Jan 31 10:32:24 nems sendemail[24614]: ERROR => TLS setup failed: SSL connect attempt failed error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Please help, cause i am newbie with this.

regards
Luckyworlock


RE: Can not send notification mail - BrendonKoz - 01-31-2018

Hello luckyworlock,

If you're currently using v1.3.0 of NEMS, RobbieFerguson (the author) just pushed a new version that aims to correct issues with the email notifications not working as expected. To force the update:

1) sudo nems-quickfix
2) Open NEMS SST and press "Save"
3) sudo systemctl restart nagios3

Once this is done, see if you're now able to receive notifications. Also, do be absolutely certain that you've provided a valid email address for your user, and assigned your user to the service notification(s) you intend to receive.


RE: Can not send notification mail - luckyworlock - 01-31-2018

Hi Brendon,

Thanks for the reply, i have follow your instruction but the error still same :

sudo nems-mailtest email@domain.com
Please wait...Feb 01 09:54:23 nems sendemail[14209]: DEBUG => Connecting to 192. 168.0.205:25
Feb 01 09:54:24 nems sendemail[14209]: DEBUG => My IP address is: 192.168.0.17
Feb 01 09:54:24 nems sendemail[14209]: SUCCESS => Received: 220 mail.domain.com Microsoft ESMTP MAIL Service ready at Thu, 1 Feb 2018 09:54:38 +0700
Feb 01 09:54:24 nems sendemail[14209]: INFO => Sending: EHLO nems
Feb 01 09:54:24 nems sendemail[14209]: SUCCESS => Received: 250-mail.domain.com Hello [192.168.0.17], 250-SIZE 10485760, 250-PIPELINING, 250-DSN, 250-ENHANCEDSTATUSCODES, 250-STARTTLS, 250-AUTH, 250-8BITMIME, 250-BINARYMIME, 250-CHUNKING, 250-XEXCH50, 250 XSHADOW
Feb 01 09:54:24 nems sendemail[14209]: INFO => Sending: STARTTLS
Feb 01 09:54:24 nems sendemail[14209]: SUCCESS => Received: 220 2.0.0 SMTP server ready
Feb 01 09:54:24 nems sendemail[14209]: ERROR => TLS setup failed: SSL connect attempt failed error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

Please help


RE: Can not send notification mail - baggins - 02-01-2018

You are probably using the wrong port. Try 587 instead of 25.

BR


RE: Can not send notification mail - luckyworlock - 02-01-2018

i have change it to 587 but still no luck.


RE: Can not send notification mail - Robbie Ferguson - 02-01-2018

Hi Luckyworlock,
I'm so glad you love NEMS! Thanks!

On with your question... this tells us that NEMS tried to send an email using a secure connection, but your SMTP server rejected that connection.

So the first thing to check is that your server port for SMTP is set correctly in NEMS SST. It is very common for 587 to be correct, so if you're unsure, try it as baggins suggested above.

Looking deeper at your output...

192.168.0.205:25 -- this is a LAN IP you have set for your SMTP server.

Are you sure you have an SMTP server on your LAN? And if you do, do you have TLS support configured correctly?

Your issue looks like a problem with your SMTP server, not NEMS.

I have plans to add a switch to NEMS SST that allows you to use non-secure SMTP servers, but because I so HIGHLY recommend against it, I'm in no hurry to do so. You need to make sure your SMTP server supports TLS.

Also, because this is an internal SMTP server, what happens if your SMTP server goes down? NEMS will want to send you an alert, but you'll never get it  Smile  Catch 22. I'd recommend using an outside server, like Gmail.

Let me know how it goes.


RE: Can not send notification mail - luckyworlock - 02-03-2018

Hi Robbie,

Thank for the reply..
Im pretty sure my mail server (Exchange 2010) support TLS.
Because the error message is TLS setup failed: SSL connect attempt failed error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed, i wondering how to import personal certificate to NEMS?
or do you have any clue?


RE: Can not send notification mail - Robbie Ferguson - 02-04-2018

Why are you using a self-signed certificate with a SMTP server? I'd suggest giving it a hostname (subdomain) and registering with LetsEncrypt. An SMTP server has to have an external address, accessible from the web (otherwise it cannot be verified and mail will simply be marked as spam) so this comes down to your SMTP server being setup incorrectly, which has nothing to do with NEMS.

I can show you how to disable TLS but I won't do that. The moment I start showing people how to disable security measures that are in place for your protection, some unknowing user who doesn't understand it will do it and get themselves hacked.

Bypassing certificate verification opens you up to MITM attack. Please fix your SMTP server, or use a different one (like Gmail) that already has TLS configured with a cert, as I already stated.


RE: Can not send notification mail - Robbie Ferguson - 02-04-2018

I have decided that I will add a switch to NEMS SST in the next major release (1.4) that allows disabling TLS. It will be made clear in NEMS SST that this is not a recommended setup, but I'd like to add it for those who require it. https://docs.nemslinux.com/todo

I will not however provide details on how to "hack" the script to bypass this protection. Please use a SMTP server that supports TLS and has signed certificates.


RE: Can not send notification mail - luckyworlock - 02-05-2018

hi Robbie,

ok i try google and found this :

sudo nems-mailtest mail_address@yahoo.com
[sudo] password for joe:
Please wait...Feb 05 10:45:05 nems sendemail[10044]: DEBUG => Connecting to smtp.gmail.com:587
Feb 05 10:45:45 nems sendemail[10044]: ERROR => Connection attempt to smtp.gmail.com:587 failed: IO::Socket::INET6: getaddrinfo: Temporary failure in name resolution
Feb 05 10:45:45 nems sendemail[10044]: HINT => Try specifying a different mail relay with the -s option.

Please help..