From ff160b6fe15b47eeb4b71815c5ef59b10590dddf Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Wed, 18 Jan 2023 21:16:27 +0000 Subject: [PATCH] Adding d/p/26_check_mailq_fix_nullmailer_regex from upstream --- .../26_check_mailq_fix_nullmailer_regex | 28 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 29 insertions(+) create mode 100644 debian/patches/26_check_mailq_fix_nullmailer_regex diff --git a/debian/patches/26_check_mailq_fix_nullmailer_regex b/debian/patches/26_check_mailq_fix_nullmailer_regex new file mode 100644 index 0000000..b4e60d5 --- /dev/null +++ b/debian/patches/26_check_mailq_fix_nullmailer_regex @@ -0,0 +1,28 @@ +From 7ae8456e7a89faf0d9a10c0e2720910cbe0317b8 Mon Sep 17 00:00:00 2001 +From: andrew bezella +Date: Wed, 19 Oct 2022 21:33:18 +0200 +Subject: [PATCH] Fixing nullmailer regex + +attached is a patch that updates the format expected in the nullmailer +mailq output. the regex is a little more flexible and less specific +than the previous version. +--- + plugins-scripts/check_mailq.pl | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins-scripts/check_mailq.pl b/plugins-scripts/check_mailq.pl +index 4c72332a5..27073d3cc 100755 +--- a/plugins-scripts/check_mailq.pl ++++ b/plugins-scripts/check_mailq.pl +@@ -537,9 +537,9 @@ + } + + while () { +- #2006-06-22 16:00:00 282 bytes ++ #2022-08-25 01:30:40 502 bytes from + +- if (/^[1-9][0-9]*-[01][0-9]-[0-3][0-9]\s[0-2][0-9]\:[0-5][0-9]\:[0-5][0-9]\s+[0-9]+\sbytes/) { ++ if (/^\d{4}-\d{2}-\d{2}\s+\d{2}\:\d{2}\:\d{2}\s+\d+\sbytes/) { + $msg_q++ ; + } + } diff --git a/debian/patches/series b/debian/patches/series index 96d92ef..74c4218 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -14,3 +14,4 @@ 23_check_http_chunked_encoding 24_check_apt_usage 25_spell_fixes +26_check_mailq_fix_nullmailer_regex