From: Todd Lyons Date: Wed, 4 Sep 2013 20:12:54 +0000 (-0700) Subject: Make sender/recipient search case-insensitive X-Git-Tag: exim-4_82_RC1~9 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9815773952dd56fe4d33291ace6d0ee7afd77852;p=exim.git Make sender/recipient search case-insensitive --- diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index ae6e33efe..ad4df88ea 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -34435,14 +34435,14 @@ options are available: .vlist .vitem &*-f*&&~<&'regex'&> -Match the sender address. The field that is tested is enclosed in angle -brackets, so you can test for bounce messages with +Match the sender address using a case-insensitive search. The field that is +tested is enclosed in angle brackets, so you can test for bounce messages with .code exiqgrep -f '^<>$' .endd .vitem &*-r*&&~<&'regex'&> -Match a recipient address. The field that is tested is not enclosed in angle -brackets. +Match a recipient address using a case-insensitve search. The field that is +tested is not enclosed in angle brackets. .vitem &*-s*&&~<&'regex'&> Match against the size field. diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index d8990102d..b2a31442a 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -49,6 +49,8 @@ TL/06 Add Experimental DMARC support using libopendmarc libraries. TL/07 Fix an out of order global option causing a segfault. Reported to dev mailing list by by Dmitry Isaikin. +TL/08 Adjust exiqgrep to be case-insensitive for sender/receiver. + JH/01 Bugzilla 1201 & 304 - New cutthrough-delivery feature, with TLS support. JH/02 Support "G" suffix to numbers in ${if comparisons. diff --git a/src/src/exiqgrep.src b/src/src/exiqgrep.src index 75265a2bb..e05589073 100644 --- a/src/src/exiqgrep.src +++ b/src/src/exiqgrep.src @@ -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); }