From: Rocco Rutte Date: Thu, 11 Jun 2009 16:14:05 +0000 (+0200) Subject: Don't reformat Return-Path (angle brackets are not optional). Closes #1702. X-Git-Tag: neomutt-20160307~589 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=044a10500e2834d34fc2c48ecd65bba33d8ed254;p=neomutt Don't reformat Return-Path (angle brackets are not optional). Closes #1702. --- diff --git a/ChangeLog b/ChangeLog index bf61774d6..06cba4bc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-06-10 17:44 +0200 Rocco Rutte (0721c3f6320d) + + * mbox.c, mx.c: Only print messages about CONTEXT when quiet flag not + set + +2009-06-09 22:09 -0700 Brendan Cully (dc9ec900c657) + + * ChangeLog, mutt_ssl.c: Improve host checking for SSL with + intermediate certificates. + 2009-06-09 22:03 -0700 Brendan Cully (9dcb7288039d) * mutt_ssl.c: Whitespace. diff --git a/copy.c b/copy.c index 95e12aed7..90a65dad9 100644 --- a/copy.c +++ b/copy.c @@ -865,7 +865,7 @@ static void format_address_header (char **h, ADDRESS *a) static int address_header_decode (char **h) { char *s = *h; - int l; + int l, rp = 0; ADDRESS *a = NULL; @@ -876,6 +876,7 @@ static int address_header_decode (char **h) if (ascii_strncasecmp (s, "return-path:", 12) == 0) { l = 12; + rp = 1; break; } else if (ascii_strncasecmp (s, "reply-to:", 9) == 0) @@ -936,15 +937,20 @@ static int address_header_decode (char **h) mutt_addrlist_to_local (a); rfc2047_decode_adrlist (a); - - *h = safe_calloc (1, l + 2); - - strfcpy (*h, s, l + 1); - - format_address_header (h, a); + + /* angle brackets for return path are mandated by RfC5322, + * so leave Return-Path as-is */ + if (rp) + *h = safe_strdup (s); + else + { + *h = safe_calloc (1, l + 2); + strfcpy (*h, s, l + 1); + format_address_header (h, a); + } rfc822_free_address (&a); - + FREE (&s); return 1; }