From 1381a2037b663ce612c7b86295b323cbaedebb1a Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 19 Jun 2023 07:15:15 +0000 Subject: [PATCH] Remove left over d/p/31_checl_mailq_separate_submission_queue --- .../31_checl_mailq_separate_submission_queue | 77 ------------------- 1 file changed, 77 deletions(-) delete mode 100644 debian/patches/31_checl_mailq_separate_submission_queue diff --git a/debian/patches/31_checl_mailq_separate_submission_queue b/debian/patches/31_checl_mailq_separate_submission_queue deleted file mode 100644 index 51bdd78..0000000 --- a/debian/patches/31_checl_mailq_separate_submission_queue +++ /dev/null @@ -1,77 +0,0 @@ -From 12ae1fb6627bfef419fb4571a7189909107f5e6e Mon Sep 17 00:00:00 2001 -From: Jan Wagner -Date: Tue, 1 Oct 2013 15:06:51 +0200 -Subject: [PATCH] check_mailq.pl: separate submission queue - -check_mailq.pl ignores the separate submission queue used in (modern?) sendmail -implementations. - -For the queue output below with one message in the submission queue and no -messages in the transport queue, check_mailq.pl reports zero messages in the -queue because the request count from the last queue always overwrites previous -queues. If the sendmail MTA isn't running or has become wedged, messages will -sit in the submission queue forever. - -The attached patch fixes this in a backwards compatible way (i.e., it shouldn't -break any of the currently supported formats). --- -Just turning attached patch of github issue #972 into a push request. -(Closes #972) ---- - -diff --git a/plugins-scripts/check_mailq.pl b/plugins-scripts/check_mailq.pl -index 27073d3cc..f02c90fbc 100755 ---- a/plugins-scripts/check_mailq.pl -+++ b/plugins-scripts/check_mailq.pl -@@ -149,7 +149,26 @@ - ##/var/spool/mqueue/qF/df is empty - ## Total Requests: 1 - -- -+# separate submission/transport queues, empty -+## MSP Queue status... -+## /var/spool/mqueue-client is empty -+## Total requests: 0 -+## MTA Queue status... -+## /var/spool/mqueue is empty -+## Total requests: 0 -+# separate submission/transport queues: 1 -+## MSP Queue status... -+## /var/spool/mqueue-client (1 request) -+## -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- -+## oAJEfhdW014123 5 Fri Nov 19 14:41 jwm -+## (Deferred: Connection refused by [127.0.0.1]) -+## root -+## Total requests: 1 -+## MTA Queue status... -+## /var/spool/mqueue is empty -+## Total requests: 0 -+ -+ my $this_msg_q = 0; - while () { - - # match email addr on queue listing -@@ -189,13 +208,18 @@ - # - # single queue: first line - # multi queue: one for each queue. overwrite on multi queue below -- $msg_q = $1 ; -+ $this_msg_q = $1 ; -+ $msg_q += $1 ; - } - } elsif (/^\s+Total\sRequests:\s(\d+)$/i) { -- print "$utils::PATH_TO_MAILQ = $_ \n" if $verbose ; -- # -- # multi queue: last line -- $msg_q = $1 ; -+ if ($this_msg_q) { -+ $this_msg_q = 0 ; -+ } else { -+ print "$utils::PATH_TO_MAILQ = $_ \n" if $verbose ; -+ # -+ # multi queue: last line -+ $msg_q += $1 ; -+ } - } - - }