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

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



The following reply was made to PR mutt/2304; it has been noted by GNATS.

From: Derek Martin <code@xxxxxxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: 
Subject: Re: mutt/2304: reply / group reply behavior broken WRT $reply_to and 
$reply_self
Date: Sat, 24 Jun 2006 11:15:38 -0400

 --L+ofChggJdETEG3Y
 Content-Type: text/plain; charset=iso-8859-1
 Content-Disposition: inline
 
 Patch attached.
 
 
 --L+ofChggJdETEG3Y
 Content-Type: text/plain; charset=iso-8859-1
 Content-Disposition: attachment; filename=muttpatch
 
 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);
  
 
 --L+ofChggJdETEG3Y--