Check_email_delivery - O365

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
r34220
Posts: 72
Joined: Fri Feb 06, 2015 6:47 pm

Re: Check_email_delivery - O365

Post by r34220 »

looks like the same version on other servers as well.

Code: Select all

yum list installed|grep openssl
openssl.x86_64                     1.0.1e-42.el6         @rhel-x86_64-server-6
openssl-devel.x86_64               1.0.1e-42.el6         @rhel-x86_64-server-6
openssl098e.x86_64                 0.9.8e-18.el6_5.2     @rhel-6-server-rpms
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Check_email_delivery - O365

Post by rkennedy »

Odd, that rules out SSL then. It might be the connection, can you try making the following change and see if this works?

At the top of check_email_delivery look for
# look for required modules

Below that, add -

Code: Select all

use IO::Socket::SSL 'inet4';
Former Nagios Employee
r34220
Posts: 72
Joined: Fri Feb 06, 2015 6:47 pm

Re: Check_email_delivery - O365

Post by r34220 »

Code: Select all

./check_email_delivery --mailto [email protected] --mailfrom [email protected] -H outlook.office365.com --smtp-server smtp.office365.com --smtp-username '[email protected]' --smtp-password 'NagRules08' --smtp-port 587 --imap-server outlook.office365.com --username '[email protected]' --password 'NagRules08' --imap-port 993 --smtptls --imapssl
EMAIL DELIVERY CRITICAL - imap failed: IMAP RECEIVE CRITICAL - Could not connect to outlook.office365.com port 993: IO::Socket::INET configuration failederror:00000000:lib(0):func(0):reason(0) (if you get this only when using both --ssl and --ssl-ca-file, but not when using just --ssl, the server SSL certificate failed validation) at /usr/local/nagios/libexec/check_imap_receive line 140.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check_email_delivery - O365

Post by lmiltchev »

Where did you place the line below:

Code: Select all

use IO::Socket::SSL 'inet4';
in the "check_email_delivery" or "check_imap_receive"? In needs to be in the "check_imap_receive", right above:

Code: Select all

# look for required modules
Let us know if this helped. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
r34220
Posts: 72
Joined: Fri Feb 06, 2015 6:47 pm

Re: Check_email_delivery - O365

Post by r34220 »

I had placed it in check_imap_receive file
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check_email_delivery - O365

Post by lmiltchev »

Remove the "--smtptls" from your command and try running:

Code: Select all

./check_email_delivery --mailto [email protected] --mailfrom [email protected] -H outlook.office365.com --smtp-server smtp.office365.com --smtp-username '[email protected]' --smtp-password 'NagRules08' --smtp-port 587 --imap-server outlook.office365.com --username '[email protected]' --password 'NagRules08' --imap-port 993 --imapssl
Be sure to check out our Knowledgebase for helpful articles and solutions!
r34220
Posts: 72
Joined: Fri Feb 06, 2015 6:47 pm

Re: Check_email_delivery - O365

Post by r34220 »

different error...

Code: Select all

EMAIL DELIVERY CRITICAL - smtp failed: SMTP SEND CRITICAL - Could not send to [email protected]
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Check_email_delivery - O365

Post by tgriep »

I think the server for the -H "Hostname" variable needs to be set to the smtp server at office365. Can you edit your command to the following and let us know if this works for you?

Code: Select all

./check_email_delivery --mailto [email protected] --mailfrom [email protected] -H smtp.office365.com --smtp-server smtp.office365.com --smtp-username '[email protected]' --smtp-password 'NagRules08' --smtp-port 587 --imap-server outlook.office365.com --username '[email protected]' --password 'NagRules08' --imap-port 993 --imapssl
Be sure to check out our Knowledgebase for helpful articles and solutions!
r34220
Posts: 72
Joined: Fri Feb 06, 2015 6:47 pm

Re: Check_email_delivery - O365

Post by r34220 »

That had no effect. I don't think there is an issue with smtp. Its imap connection failing.

Code: Select all

EMAIL DELIVERY CRITICAL - imap failed: IMAP RECEIVE CRITICAL- Could not connect to outlook.office365.com port 993: IO::Socket::INET configuration failederror:00000000:lib(0):func(0):reason(0) (if you get this only when using both --ssl and --ssl-ca-file, but not when using just --
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Check_email_delivery - O365

Post by tgriep »

Can you run the following in a command prompt as root and post the output here?

Code: Select all

 /usr/local/nagios/libexec/check_imap_receive -V
Can you go to the following link and see if the versions of the plugins on your system are updated to these?
https://exchange.nagios.org/directory/P ... ry/details
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked