[exim-cvs] Make sender/recipient search case-insensitive

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Exim Git Commits Mailing List
Dátum:  
Címzett: exim-cvs
Tárgy: [exim-cvs] Make sender/recipient search case-insensitive
Gitweb: http://git.exim.org/exim.git/commitdiff/9815773952dd56fe4d33291ace6d0ee7afd77852
Commit:     9815773952dd56fe4d33291ace6d0ee7afd77852
Parent:     42bfef1e908fe60f8a7a86e66616b51702f1c0fb
Author:     Todd Lyons <tlyons@???>
AuthorDate: Wed Sep 4 13:12:54 2013 -0700
Committer:  Todd Lyons <tlyons@???>
CommitDate: Wed Sep 4 13:12:54 2013 -0700


    Make sender/recipient search case-insensitive
---
 doc/doc-docbook/spec.xfpt |    8 ++++----
 doc/doc-txt/ChangeLog     |    2 ++
 src/src/exiqgrep.src      |    6 +++---
 3 files changed, 9 insertions(+), 7 deletions(-)


diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index ae6e33e..ad4df88 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 d899010..b2a3144 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 75265a2..e055890 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);
         }