--- mutt-1.1.12-orig/parse.c Sat Apr 22 03:48:56 2000 +++ mutt-1.1.12/parse.c Sun Apr 23 17:51:22 2000 @@ -811,14 +811,21 @@ return (mutt_mktime (&tm, 0) + tz_offset); } -/* extract the first substring that looks like a message-id */ +/* extract the first substring that looks like a message-id + something between angle brackets that follows " from " + is assumed to be an email address + */ static char *extract_message_id (const char *s) { - const char *p; + const char *p, *f; char *r; size_t l; + f = strstr (s, " from "); if ((s = strchr (s, '<')) == NULL || (p = strchr (s, '>')) == NULL) + return (NULL); + if (f != NULL && f < s && + ((s = strchr (p, '<')) == NULL || (p = strchr (s, '>')) == NULL)) return (NULL); l = (size_t)(p - s) + 1; r = safe_malloc (l + 1);