]> granicus.if.org Git - neomutt/commitdiff
Improve Reply-to vs From comparison when replying. (closes #3909)
authorKevin McCarthy <kevin@8t8.us>
Tue, 24 Jan 2017 02:46:16 +0000 (18:46 -0800)
committerKevin McCarthy <kevin@8t8.us>
Tue, 24 Jan 2017 02:46:16 +0000 (18:46 -0800)
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

diff --git a/send.c b/send.c
index 8423934d867aef8819ebfc30b8f1a6660c33f729..acf27e854e8304504bd5387fe23e987c0bd47077 100644 (file)
--- 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);