help troubleshooting check_imap_receive and office365
Posted: Fri Aug 16, 2013 5:02 pm
I'm working on mail loop monitors. I am having a problem getting check_imap_receive to log into office 365.
I've configured thunderbird to connect to
outlook.office365.com:993 (SSL imap)
This all works fine, and I have a message sitting in the inbox with subject "Testing check_imap_receive"
Check_imap_receive fails:
$ ./check_imap_receive --hostname outlook.office365.com --username '############' --password '###########' --search -s SUBJECT -s "Testing check_imap_receive" --ssl
IMAP RECEIVE CRITICAL - Could not connect to outlook.office365.com port 993: IO::Socket::INET6 configuration failederror:00000000:lib(0):func(0):reason(0) at ./check_imap_receive line 121.
Here is a snippet of check_imap_receive (which is perl), near line 121:
114 eval {
115 local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
116 alarm $timeout;
117
118 if( $ssl ) {
119 $imap_port = $default_imap_ssl_port unless $imap_port;
120 my $socket = IO::Socket::SSL->new("$imap_server:$imap_port");
121 die IO::Socket::SSL::errstr() unless $socket;
122 $socket->autoflush(1);
123 $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 );
124 $imap->State(Mail::IMAPClient->Connected);
125 $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail:: IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works
Perl-IO-Socket-SSL in installed, per yum (this is on rhel6).
Does anyone have advice on how to troubleshoot this?
Thank you!
David Summers
I've configured thunderbird to connect to
outlook.office365.com:993 (SSL imap)
This all works fine, and I have a message sitting in the inbox with subject "Testing check_imap_receive"
Check_imap_receive fails:
$ ./check_imap_receive --hostname outlook.office365.com --username '############' --password '###########' --search -s SUBJECT -s "Testing check_imap_receive" --ssl
IMAP RECEIVE CRITICAL - Could not connect to outlook.office365.com port 993: IO::Socket::INET6 configuration failederror:00000000:lib(0):func(0):reason(0) at ./check_imap_receive line 121.
Here is a snippet of check_imap_receive (which is perl), near line 121:
114 eval {
115 local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
116 alarm $timeout;
117
118 if( $ssl ) {
119 $imap_port = $default_imap_ssl_port unless $imap_port;
120 my $socket = IO::Socket::SSL->new("$imap_server:$imap_port");
121 die IO::Socket::SSL::errstr() unless $socket;
122 $socket->autoflush(1);
123 $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 );
124 $imap->State(Mail::IMAPClient->Connected);
125 $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail:: IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works
Perl-IO-Socket-SSL in installed, per yum (this is on rhel6).
Does anyone have advice on how to troubleshoot this?
Thank you!
David Summers