I’m using 3.0rc2 and I having issues with check_imap timing out. The command line I using to test the plugin before I implement it looks like this:
check_imap -H smms -p 443 -e “OK” -v
The output is this:
Using service IMAP
Port: 443
flags: 0x2
Quit string: a1 LOGOUT
server_expect_count: 1
0: OK
CRITICAL - Socket timeout after 10 seconds
what am I doing wrong?
Loose
2
Hi!
I had the same problem with this command;
So I “wrote” a small perl script to check if there’s a mail in my imap server:
it uses these librairies:
perldoc.perl.org/Benchmark.html (to mesure how long it takes to receive the mail)
search.cpan.org/~markov/Mail-IMA … Client.pod (the IMAP lib)
[code]#!/usr/bin/perl
use strict;
use Mail::IMAPClient;
use Benchmark;
my $server = $ARGV[0];
my $user= $ARGV[1];
my $passwd = $ARGV[2];
returns an unconnected Mail::IMAPClient object:
my $imap = Mail::IMAPClient->new;
$imap = Mail::IMAPClient->new(
Server => $server,
User => $user,
Password=> $passwd
);
my $folder = “INBOX”;
$imap->select($folder);
my @output;
@output = $imap->messages();
my $count = @output;
if ($count == 0) {
print “No mail in mailbox!\n”;
exit 2;
}
my$ msgid = @output[0];
my $start_time = new Benchmark;
@output = $imap->message_string($msgid);
my $end_time = new Benchmark;
$imap->disconnect();[/code]
maybe it can help you if you give up on check_imap