diff options
Diffstat (limited to 'plugins-scripts')
-rwxr-xr-x | plugins-scripts/check_mailq.pl | 36 |
1 files changed, 30 insertions, 6 deletions
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 | } |