Make sender/recipient search case-insensitive
[exim.git] / src / src / exiqgrep.src
index 75265a2bb37ed0e277c521984ddd7d8bdc0fad71..e05589073142f823cd2b179cf06a14b2a545b3c0 100644 (file)
@@ -15,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;
@@ -115,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);
                }