diff -Pur mutt-1.3.23-base/parse.c mutt-1.3.23/parse.c --- mutt-1.3.23-base/parse.c Sun Apr 29 17:00:19 2001 +++ mutt-1.3.23/parse.c Fri Oct 12 16:57:10 2001 @@ -862,14 +862,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);