From 5e3ac08d71a46c7056c7c480941df48b5c386b89 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Mon, 23 Jan 2017 18:46:16 -0800 Subject: [PATCH] Improve Reply-to vs From comparison when replying. (closes #3909) Prior to this patch, if the Reply-to mailbox matched the From mailbox, mutt would always use the From address. This was probably done to preserve the display name, as the Reply-to address is often missing one. Unfortunately, there are circumstances where the Reply-to display-name has significance, such as in ticket 3909. Change mutt so that it only uses the From address if the Reply-To has no display-name. --- send.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/send.c b/send.c index 8423934d..acf27e85 100644 --- a/send.c +++ b/send.c @@ -455,7 +455,8 @@ static int default_to (ADDRESS **to, ENVELOPE *env, int flags, int hmfupto) } else if (env->reply_to) { - if ((mutt_addrcmp (env->from, env->reply_to) && !env->reply_to->next) || + if ((mutt_addrcmp (env->from, env->reply_to) && !env->reply_to->next && + !env->reply_to->personal) || (option (OPTIGNORELISTREPLYTO) && mutt_is_mail_list (env->reply_to) && (mutt_addrsrc (env->reply_to, env->to) || @@ -466,7 +467,7 @@ static int default_to (ADDRESS **to, ENVELOPE *env, int flags, int hmfupto) * * We also take the from header if our correspondent has a reply-to * header which is identical to the electronic mail address given - * in his From header. + * in his From header, and the reply-to has no display-name. * */ rfc822_append (to, env->from, 0); -- 2.40.0