Prevent TLS rebinding in LDAP connections
[exim.git] / src / src / exiqgrep.src
index 9abaab787f4c85b42c12d4016061cd6169468c56..e05589073142f823cd2b179cf06a14b2a545b3c0 100644 (file)
@@ -1,5 +1,4 @@
 #!PERL_COMMAND
-# $Cambridge: exim/src/src/exiqgrep.src,v 1.1 2004/10/07 10:39:01 ph10 Exp $
 
 # Utility for searching and displaying queue information.
 # Written by Matt Hubbard 15 August 2002
@@ -16,7 +15,7 @@
 # Routine for extracting the UTC timestamp from message ID
 # lifted from eximstat utility
 
-# Version 1.1
+# Version 1.2
 
 use strict;
 use Getopt::Std;
@@ -88,7 +87,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;
@@ -116,13 +115,13 @@ sub selection() {
        foreach my $msg (keys(%id)) {
                if ($opt{f}) {
                        # Match sender address
-                       next unless ($id{$msg}{from} =~ /$opt{f}/);
+                       next unless ($id{$msg}{from} =~ /$opt{f}/i);
                }
                if ($opt{r}) {
                        # Match any recipient address
                        my $match = 0;
                        foreach my $rcpt (@{$id{$msg}{rcpt}}) {
-                               $match++ if ($rcpt =~ /$opt{r}/);
+                               $match++ if ($rcpt =~ /$opt{r}/i);
                        }
                        next unless ($match);
                }