Explorar o código

Merge branch 'utking-master'

Sebastian Wolf %!s(int64=2) %!d(string=hai) anos
pai
achega
da2b12a091
Modificáronse 2 ficheiros con 6 adicións e 2 borrados
  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.
 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
 2.4.5 2023-06-01
 	FIXES
 	FIXES
 	check_dns: Fix buffer overflow on Ubuntu 22.04 (#699)
 	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
      ## open mailq
 	if ( defined $utils::PATH_TO_MAILQ ) {
 	if ( defined $utils::PATH_TO_MAILQ ) {
 		if (-x $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";
 				print "ERROR: $utils::PATH_TO_MAILQ$mailq_args returned an error\n";
 				exit $ERRORS{'UNKNOWN'};
 				exit $ERRORS{'UNKNOWN'};
 			}
 			}
 		}
 		}
 		else {
 		else {
 			if ( $sudo ne "" ) {
 			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";
 					print "ERROR: $utils::PATH_TO_MAILQ$mailq_args is not executable with sudo by (uid $>:gid($)))\n";
 					exit $ERRORS{'UNKNOWN'};
 					exit $ERRORS{'UNKNOWN'};
 				}
 				}