From 402aa67f45479a5575caf674ca1e44b83c19ac2e Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Tue, 22 Aug 2000 19:39:58 +0000 Subject: [PATCH] fixed problem with regexp for picking bogus queue # of request entries --- src/lib/Spong/Client/plugins/check_mailq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Spong/Client/plugins/check_mailq b/src/lib/Spong/Client/plugins/check_mailq index 79beb10..c1a527e 100755 --- a/src/lib/Spong/Client/plugins/check_mailq +++ b/src/lib/Spong/Client/plugins/check_mailq @@ -1,7 +1,7 @@ # Register routine with plugin registery $CHECKFUNCS{'mailq'} = \&check_mailq; -# $Id: check_mailq,v 1.2 2000/08/21 19:35:17 sljohnson Exp $ +# $Id: check_mailq,v 1.3 2000/08/22 19:39:58 sljohnson Exp $ # Sendmail mailq check for mail servers. If checks the numeber of mail # message queue against the $MAILQWARN AND $MAILQCRIT variables @@ -18,7 +18,7 @@ sub check_mailq { while () { if (/Mail Queue\s+\((\d+)/) { $mqcnt = $1; $singleq=1; } elsif (/Total Requests:\s+(\d+)/) { $mqcnt = $1; } - elsif (/\s+(\S+)\s+\((\d+)/) { $qcnt{$1} = $2; } + elsif (/\s+(\S+)\s+\((\d+)\s+requests\)/) { $qcnt{$1} = $2; } elsif (/(\S+)\s+is empty/) { $qcnt{$1} = 0; } # If sendmail is pre 8.10, just grab the first few entries for message -- 2.30.2