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

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



On Fri, Jun 16, 2006 at 02:26:30AM -0400, Derek Martin wrote:
> 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.
> 
> I missed a case where this is broken:  if $reply_self is set,
> $reply_to is set, and the user REPLYs to a message with a reply-to
> header, Mutt will reply to the sender.  It should reply to the
> reply-to address.  Bizarrely, it works if the user GROUPREPLYs to the
> message.

The main part of the code which seems to be problematical is this if
block in send.c, default_to(), starting like so:

    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.
       */

The code and comments suggest that this if clause is checking for
cases where the Reply-to header and the From header match, as in the
case of a mailing list which sets Reply-to.  However, that case should
not be checked here, as it is more appropriately (and correctly)
dealth with in the previous if block, which checks the
IGNORELISTREPLYTO option.  It appears that if this conditional remains
intact, this function never examines the case where $reply_to is set,
but the Reply-to header doesn't match the From address.

I believe this conditional should be simplified to:

    else if (quadoption (OPT_REPLYTO) != M_YES)

Additionally, in that same block, for the case M_NO, this case also
needs to check the value of OPTREPLYSELF, as it should use env->from
if OPTREPLYSELF is set and the sender is the user, but otherwise it
should use env->to.  These changes, along with a minor reordering of
the if blocks in this function, should fix this problem.

Comments?


-- 
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.

Attachment: pgpwThgveSiZx.pgp
Description: PGP signature