]> Pileus Git - ~andy/fetchmail/commitdiff
Note that ID comparisons are caseblind.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 18 Dec 1996 03:24:58 +0000 (03:24 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 18 Dec 1996 03:24:58 +0000 (03:24 -0000)
svn path=/trunk/; revision=656

NEWS
pop3.c
uid.c

diff --git a/NEWS b/NEWS
index f7014c9732a406a0a9e5f6d39d69cd6a79914bde..d56f62b113a41f3f40594f0fa83fb18215288113 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,9 @@ features --
 * SIGUSR1 is now used for wakeup rather than SIGHUP.  This eliminates any
   possible confusion about fetchmail's behavior at logout time.
 
+* Received line parsing for envelope addresses now matches MX as well as 
+  canonical DNS addresses, making multidrop routing slightly more reliable.
+
 bugs --
 
 * Fixed a FreeBSD compilation glitch involving SIGCLD (thanks to
diff --git a/pop3.c b/pop3.c
index f99b9f35c7a98e8dd9db93498d3e18391e4aaef9..3ee5489befd1273c961cc1a1b4b58589ef84e42c 100644 (file)
--- a/pop3.c
+++ b/pop3.c
@@ -181,6 +181,8 @@ static int pop3_getrange(FILE *sockfp, struct query *ctl, int*countp, int*newp)
                    else if (sscanf(buf, "%d %s", &num, id) == 2)
                    {
                        save_str(&ctl->newsaved, num, id);
+
+                       /* note: ID comparison is caseblind */
                        if (!str_in_list(&ctl->oldsaved, id))
                            (*newp)++;
                    }
@@ -231,6 +233,7 @@ static int pop3_is_old(FILE *sockfp, struct query *ctl, int num)
     if (!ctl->oldsaved)
        return (num <= last);
     else
+       /* note: ID comparison is caseblind */
         return (str_in_list(&ctl->oldsaved,
                            str_find (&ctl->newsaved, num)));
 }
diff --git a/uid.c b/uid.c
index 84f4626779ed0e2738572bdc5fa5e459383ade4e..f4e81a9f5a3ce2b1b87e77a445394fd8aaf11f14 100644 (file)
--- a/uid.c
+++ b/uid.c
@@ -163,11 +163,11 @@ void free_str_pair_list(struct idlist **idl)
 #endif
 
 int str_in_list(struct idlist **idl, const char *str)
-/* is a given ID in the given list? */
+/* is a given ID in the given list? (comparison is caseblind) */
 {
     if (*idl == (struct idlist *)NULL || str == (char *) NULL)
        return(0);
-    else if (strcmp(str, (*idl)->id) == 0)
+    else if (strcasecmp(str, (*idl)->id) == 0)
        return(1);
     else
        return(str_in_list(&(*idl)->next, str));