Fix exiqgrep issue where malformed lines not parsed
authorNigel Metheringham <nigel@exim.org>
Sun, 6 Feb 2011 19:20:06 +0000 (19:20 +0000)
committerNigel Metheringham <nigel@exim.org>
Sun, 6 Feb 2011 19:20:06 +0000 (19:20 +0000)
Fixes bug 943
Lightly tested, but not with report error condition,
would like reporter to check this fix on their system.

doc/doc-txt/ChangeLog
src/src/exiqgrep.src

index 083870af63cfa177ea80c9d71eeae1549efc0d14..135213b2d2f9deac8417d7f571121ca9281962dd 100644 (file)
@@ -35,6 +35,9 @@ NM/03 Allow underscore in dnslist lookups
 PP/04 Bugzilla 230: Support TLS-enabled LDAP (in addition to ldaps).
       Code patches from Adam Ciarcinski of NetBSD.
 
+NM/04 Fixed exiqgrep to cope with mailq missing size issue
+      Fixes bug 943.
+
 
 Exim version 4.74
 -----------------
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;