<<< Date Index >>>     <<< Thread Index >>>

Re: reply / group reply behavior broken WRT $reply_to and $reply_self



On Fri, Jun 16, 2006 at 02:05:05AM -0400, Derek Martin wrote:
> The essential problem is that when $reply_to is set (and there is a
> Reply-to header), but $reply_self is unset, Mutt does the wrong thing.
> It ignores the Reply-to header completely, whether the user is
> REPLYing or GROUPREPLYing.  This apparently is true of all versions of
> Mutt including and prior to the current CVS.

Assuming there is some agreement that the behavior described is broken
in the way I described, and should behave in the way I described, the
attached patch fixes this problem (tested).

Note that in the case where $reply_to is UNSET, and $reply_self is
SET, this behavior can be affected by the value of $metoo.  I would
argue that these two variables essentially serve the same function,
though arguably there is a subtle distinction between them.

I'd be inclined to call that a bug... At the very least, it should be
documented that if $reply_self is set, the user's e-mail address will
still be removed from the recipient list if $metoo is unset, when the
user does a GROUPREPLY.

Patch attached.

-- 
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail.  Sorry for the inconvenience.  Thank the spammers.

diff -ur mutt-20060616/send.c mutt-20060616.ddm/send.c
--- mutt-20060616/send.c        2006-01-09 14:43:59.000000000 -0500
+++ mutt-20060616.ddm/send.c    2006-06-16 20:35:56.000000000 -0400
@@ -453,12 +453,7 @@
   if (flags & SENDLISTREPLY)
     return 0;
 
-  if (!option(OPTREPLYSELF) && mutt_addr_is_user (env->from))
-  {
-    /* mail is from the user, assume replying to recipients */
-    rfc822_append (to, env->to);
-  }
-  else if (env->reply_to)
+  if (env->reply_to)
   {
     if ((mutt_addrcmp (env->from, env->reply_to) && !env->reply_to->next) || 
        (option (OPTIGNORELISTREPLYTO) &&
@@ -476,14 +471,11 @@
        */
       rfc822_append (to, env->from);
     }
-    else if (!(mutt_addrcmp (env->from, env->reply_to) && 
-              !env->reply_to->next) &&
-            quadoption (OPT_REPLYTO) != M_YES)
-    {
-      /* There are quite a few mailing lists which set the Reply-To:
-       * header field to the list address, which makes it quite impossible
-       * to send a message to only the sender of the message.  This
-       * provides a way to do that.
+    else if (quadoption (OPT_REPLYTO) != M_YES)
+    {
+      /* The user may wish to override the sender-provided Reply-to header,
+       * either because the sender has mistakenly set it incorrectly, or
+       * because it was set by list management software, etc.
        */
       snprintf (prompt, sizeof (prompt), _("Reply to %s%s?"),
                env->reply_to->mailbox, 
@@ -495,7 +487,10 @@
        break;
 
       case M_NO:
-       rfc822_append (to, env->from);
+       if (!option(OPTREPLYSELF) && mutt_addr_is_user (env->from))
+         rfc822_append (to, env->to);
+       else 
+         rfc822_append (to, env->from);
        break;
 
       default:
@@ -505,6 +500,11 @@
     else
       rfc822_append (to, env->reply_to);
   }
+  else if (!option(OPTREPLYSELF) && mutt_addr_is_user (env->from))
+  {
+    /* mail is from the user, assume replying to recipients */
+    rfc822_append (to, env->to);
+  }
   else
     rfc822_append (to, env->from);
 

Attachment: pgpyZCUnawZ9p.pgp
Description: PGP signature