summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--THANKS.in1
-rwxr-xr-xplugins-scripts/check_mailq.pl36
2 files changed, 31 insertions, 6 deletions
diff --git a/THANKS.in b/THANKS.in
index 73b3b3a7..b1327440 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -405,3 +405,4 @@ Robert Bohne
405Wolfgang Nieder 405Wolfgang Nieder
406andrew bezella 406andrew bezella
407Lorenz Gruenwald 407Lorenz Gruenwald
408John Morrissey
diff --git a/plugins-scripts/check_mailq.pl b/plugins-scripts/check_mailq.pl
index 27073d3c..f02c90fb 100755
--- a/plugins-scripts/check_mailq.pl
+++ b/plugins-scripts/check_mailq.pl
@@ -149,7 +149,26 @@ if ($mailq eq "sendmail") {
149##/var/spool/mqueue/qF/df is empty 149##/var/spool/mqueue/qF/df is empty
150## Total Requests: 1 150## Total Requests: 1
151 151
152 152# separate submission/transport queues, empty
153## MSP Queue status...
154## /var/spool/mqueue-client is empty
155## Total requests: 0
156## MTA Queue status...
157## /var/spool/mqueue is empty
158## Total requests: 0
159# separate submission/transport queues: 1
160## MSP Queue status...
161## /var/spool/mqueue-client (1 request)
162## -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
163## oAJEfhdW014123 5 Fri Nov 19 14:41 jwm
164## (Deferred: Connection refused by [127.0.0.1])
165## root
166## Total requests: 1
167## MTA Queue status...
168## /var/spool/mqueue is empty
169## Total requests: 0
170
171 my $this_msg_q = 0;
153 while (<MAILQ>) { 172 while (<MAILQ>) {
154 173
155 # match email addr on queue listing 174 # match email addr on queue listing
@@ -189,13 +208,18 @@ if ($mailq eq "sendmail") {
189 # 208 #
190 # single queue: first line 209 # single queue: first line
191 # multi queue: one for each queue. overwrite on multi queue below 210 # multi queue: one for each queue. overwrite on multi queue below
192 $msg_q = $1 ; 211 $this_msg_q = $1 ;
212 $msg_q += $1 ;
193 } 213 }
194 } elsif (/^\s+Total\sRequests:\s(\d+)$/i) { 214 } elsif (/^\s+Total\sRequests:\s(\d+)$/i) {
195 print "$utils::PATH_TO_MAILQ = $_ \n" if $verbose ; 215 if ($this_msg_q) {
196 # 216 $this_msg_q = 0 ;
197 # multi queue: last line 217 } else {
198 $msg_q = $1 ; 218 print "$utils::PATH_TO_MAILQ = $_ \n" if $verbose ;
219 #
220 # multi queue: last line
221 $msg_q += $1 ;
222 }
199 } 223 }
200 224
201 } 225 }