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. postpone.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
# HG changeset patch # User Kevin McCarthy <[email protected]> # Date 1366509459 25200 # Branch HEAD # Node ID d0e42969a62e773bbbf48b88f95f4e415bbff756 # 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;
