]> git.etc.gen.nz Git - spong.git/commitdiff
fixed problem with regexp for picking bogus queue # of request entries
authorStephen L Johnson <sjohnson@monsters.org>
Tue, 22 Aug 2000 19:39:58 +0000 (19:39 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Tue, 22 Aug 2000 19:39:58 +0000 (19:39 +0000)
src/lib/Spong/Client/plugins/check_mailq

index 79beb103fd0edb118e7158fc9253cbc8470506d6..c1a527e27f9e08617e4a66242c13b2cf6c0c92e0 100755 (executable)
@@ -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 (<FOO>) {
        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