Page 2 of 3

Re: Check_email_delivery - O365

Posted: Wed Nov 11, 2015 1:55 pm
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

Re: Check_email_delivery - O365

Posted: Wed Nov 11, 2015 3:38 pm
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';

Re: Check_email_delivery - O365

Posted: Wed Nov 11, 2015 3:58 pm
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.

Re: Check_email_delivery - O365

Posted: Thu Nov 12, 2015 10:27 am
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!

Re: Check_email_delivery - O365

Posted: Thu Nov 12, 2015 10:57 am
by r34220
I had placed it in check_imap_receive file

Re: Check_email_delivery - O365

Posted: Thu Nov 12, 2015 12:10 pm
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

Re: Check_email_delivery - O365

Posted: Thu Nov 12, 2015 12:22 pm
by r34220
different error...

Code: Select all

EMAIL DELIVERY CRITICAL - smtp failed: SMTP SEND CRITICAL - Could not send to [email protected]

Re: Check_email_delivery - O365

Posted: Thu Nov 12, 2015 3:19 pm
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

Re: Check_email_delivery - O365

Posted: Thu Nov 12, 2015 3:27 pm
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 --

Re: Check_email_delivery - O365

Posted: Fri Nov 13, 2015 10:05 am
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