Просмотр исходного кода

Merge pull request #525 from sawolf/522-mailq-regexp

Minutes and seconds are not recognized properly in nullmailer SMTP queue.
Sebastian Wolf 6 лет назад
Родитель
Сommit
0978c7a1f5
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      NEWS
  2. 1 1
      plugins-scripts/check_mailq.pl

+ 1 - 0
NEWS

@@ -3,6 +3,7 @@ This file documents the major additions and syntax changes between releases.
 2.3.2 2020-??-??
 	FIXES
 	check_http: Fix host:port syntax when using -H (Isaac White)
+	check_mailq: Fix nullmailer regular expression to recognize minutes and seconds properly (#522)
 	check_icmp: Fix incorrect status when run against multiple hosts (#520)
 	build: Fix broken builds on some systems, including Homebrew (#508)
 	perl dependencies: updated the included Module::Build to work with newer versions of perl (#505)

+ 1 - 1
plugins-scripts/check_mailq.pl

@@ -587,7 +587,7 @@ elsif ( $mailq eq "nullmailer" ) {
 	while (<MAILQ>) {
 	    #2006-06-22 16:00:00  282 bytes
 
-	    if (/^[1-9][0-9]*-[01][0-9]-[0-3][0-9]\s[0-2][0-9]\:[0-2][0-9]\:[0-2][0-9]\s{1,2}[0-9]+\sbytes$/) {
+	    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{1,2}[0-9]+\sbytes$/) {
 		$msg_q++ ;
 	    }
 	}