Fix exiqgrep issue where malformed lines not parsed
[exim.git] / src / src / exiqgrep.src
index 9abaab787f4c85b42c12d4016061cd6169468c56..fd8b5a6c3a8f18f1901aedc6c635397bca9833e4 100644 (file)
@@ -88,7 +88,7 @@ sub collect() {
                chomp();
                my $line = $_;
                #Should be 1st line of record, if not error.
-               if ($line =~ /^\s*(\w+)\s+(\S+)\s+(\w{6}-\w{6}-\w{2})\s+(<.*?>)/) {
+               if ($line =~ /^\s*(\w+)\s+((?:\d+(?:\.\d+)?[A-Z])?)\s*(\w{6}-\w{6}-\w{2})\s+(<.*?>)/) {
                        my $msg = $3;
                        $id{$msg}{age} = $1;
                        $id{$msg}{size} = $2;