I'm sending this to the list too, in case someone would like to voice a caution about the change. As far as I can tell, there should be a single ';' in the Received header, so for correct emails there shouldn't be a problem with the patch. Is there any reason to avoid making this change?
Thanks. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA http://www.8t8.us/configs/gpg-key-transition-statement.txt
# HG changeset patch # User Kevin McCarthy <[email protected]> # Date 1451528004 28800 # Wed Dec 30 18:13:24 2015 -0800 # Node ID e61398944d14faf060d84ef5297fbb69bce01fe4 # Parent 9480a363a68a7472d61c8e27a29fd2312cac8721 Use strrchr to search for Received date separator. (closes #3798) Sample email provided by the submitter showed a Received header with a ";" at the end of each line, instead of a single ";" in front of the date. The emails are obviously not RFC compliant, but the fix is simple enough: find the last ";" using strrchr instead of the first. diff --git a/parse.c b/parse.c --- a/parse.c +++ b/parse.c @@ -1175,17 +1175,17 @@ { e->return_path = rfc822_parse_adrlist (e->return_path, p); matched = 1; } else if (!ascii_strcasecmp (line + 1, "eceived")) { if (hdr && !hdr->received) { - char *d = strchr (p, ';'); + char *d = strrchr (p, ';'); if (d) hdr->received = mutt_parse_date (d + 1, NULL); } } break; case 's':
signature.asc
Description: PGP signature
