Jelajahi Sumber

Merge branch 'utking-master'

Sebastian Wolf 2 tahun lalu
induk
melakukan
da2b12a091
2 mengubah file dengan 6 tambahan dan 2 penghapusan
  1. 4 0
      NEWS
  2. 2 2
      plugins-scripts/check_mailq.pl

+ 4 - 0
NEWS

@@ -1,5 +1,9 @@
 This file documents the major additions and syntax changes between releases.
 
+2.4.6 2023-08-01
+	FIXES
+	check_mailq: Correctly handle "Mail queue is empty" when monitoring Postfix over SSMTP (#611)
+
 2.4.5 2023-06-01
 	FIXES
 	check_dns: Fix buffer overflow on Ubuntu 22.04 (#699)

+ 2 - 2
plugins-scripts/check_mailq.pl

@@ -319,14 +319,14 @@ elsif ( $mailq eq "postfix" ) {
      ## open mailq
 	if ( defined $utils::PATH_TO_MAILQ ) {
 		if (-x $utils::PATH_TO_MAILQ) {
-			if (! open (MAILQ, "$utils::PATH_TO_MAILQ$mailq_args | ")) {
+			if (! open (MAILQ, "$utils::PATH_TO_MAILQ$mailq_args 2>&1 | ")) {
 				print "ERROR: $utils::PATH_TO_MAILQ$mailq_args returned an error\n";
 				exit $ERRORS{'UNKNOWN'};
 			}
 		}
 		else {
 			if ( $sudo ne "" ) {
-				if (! open (MAILQ, "$sudo $utils::PATH_TO_MAILQ$mailq_args | " ) ) {
+				if (! open (MAILQ, "$sudo $utils::PATH_TO_MAILQ$mailq_args 2>&1 | " ) ) {
 					print "ERROR: $utils::PATH_TO_MAILQ$mailq_args is not executable with sudo by (uid $>:gid($)))\n";
 					exit $ERRORS{'UNKNOWN'};
 				}