Applied, thanks! * On 20 Apr 2013, Kevin J. McCarthy wrote: > Minor formatting adjustment to patch. Sorry for the goof-up. > > -Kevin > > # HG changeset patch > # User Kevin McCarthy <[email protected]> > # Date 1366511132 25200 > # Branch HEAD > # Node ID d4b7432e3c9dcae128abb46f32d8a673bcae9bf0 > # Parent 4c5163272b9c391b12724f9543e173c118d62003 > Fix postpone/resume to not remove a Mail-Followup-To header. > > This solution changes mutt_prepare_template() to check whether the > message_id field is NULL to decide whether to wipe the message-id and > mail-followup-to headers when instantiating the message. > > If we are resending a message, we don't want the previous message-id > and mail-followup-to headers. If we are resuming a postponed message, > however, we want to keep the mail-followup-to header if any was set > before the postpone. > > diff --git a/postpone.c b/postpone.c > --- a/postpone.c > +++ b/postpone.c > @@ -540,18 +540,25 @@ > /* parse the message header and MIME structure */ > > fseeko (fp, hdr->offset, 0); > newhdr->offset = hdr->offset; > newhdr->env = mutt_read_rfc822_header (fp, newhdr, 1, weed); > newhdr->content->length = hdr->content->length; > mutt_parse_part (fp, newhdr->content); > > - FREE (&newhdr->env->message_id); > - FREE (&newhdr->env->mail_followup_to); /* really? */ > + /* If message_id is set, then we are resending a message and don't want > + * message_id or mail_followup_to. Otherwise, we are resuming a > + * postponed message, and want to keep the mail_followup_to. > + */ > + if (newhdr->env->message_id != NULL) > + { > + FREE (&newhdr->env->message_id); > + FREE (&newhdr->env->mail_followup_to); > + } > > /* decrypt pgp/mime encoded messages */ > > if ((WithCrypto & (APPLICATION_PGP|APPLICATION_SMIME) & hdr->security) > && mutt_is_multipart_encrypted (newhdr->content)) > { > int ccap = WithCrypto & (APPLICATION_PGP|APPLICATION_SMIME) & > hdr->security; > newhdr->security |= ENCRYPT | ccap;
-- David Champion • [email protected]
pgpTH4awj4P_w.pgp
Description: PGP signature
