Skip to content

Commit

Permalink
Fixing nullmailer regex
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
abezella authored and waja committed Jan 18, 2023
1 parent 7214714 commit 916572c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins-scripts/check_mailq.pl
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,9 @@
}

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++ ;
}
}
Expand Down

0 comments on commit 916572c

Please sign in to comment.