mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-02-20 00:10:09 -05:00
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.
This commit is contained in:
parent
72147140ed
commit
916572c1ae
1 changed files with 2 additions and 2 deletions
|
|
@ -537,9 +537,9 @@ elsif ( $mailq eq "nullmailer" ) {
|
|||
}
|
||||
|
||||
while (<MAILQ>) {
|
||||
#2006-06-22 16:00:00 282 bytes
|
||||
#2022-08-25 01:30:40 502 bytes from <user@example.com>
|
||||
|
||||
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++ ;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue