Correct gecos expansion when From: is a prefix of the username.
[exim.git] / src / src / receive.c
index 1943a74c75d02e8aef718bc2e24c7896c5162012..4d77bcd9657f17f95fce73462d40aa13bf5c633c 100644 (file)
@@ -2037,7 +2037,7 @@ for (h = header_list->next; h != NULL; h = h->next)
         {
         uschar *s = Ustrchr(h->text, ':') + 1;
         while (isspace(*s)) s++;
-        if (strncmpic(s, originator_login, h->slen - (s - h->text) - 1) == 0)
+        if (strcmpic(s, originator_login) == 0)
           {
           uschar *name = is_resent? US"Resent-From" : US"From";
           header_add(htype_from, "%s: %s <%s@%s>\n", name, originator_name,