#3070: Bug#482883: mutt: removes custom headers on postpone+resume (fwd)
---------------------+----------------------
Reporter: myon | Owner: mutt-dev
Type: defect | Status: new
Priority: major | Milestone:
Component: mutt | Version: 1.5.20
Resolution: | Keywords:
---------------------+----------------------
Comment (by kevin8t8):
To clarify, this bug is specifically for the Mail-Followup-To header.
Other custom headers are properly restored after a postpone/recall.
This is caused by the line
{{{
FREE (&newhdr->env->mail_followup_to); /* really? */
}}}
in mutt_prepare_template() [postpone.c]
This function is called by both mutt_get_postponed() [postpone.c] and
mutt_resend_message() [send.c] for the <recall-message> and <resend-
message> commands.
The line was originally added in changeset 840:b39dbb28b760 for some
<resend-message> cleanup by Thomas Roessler.
Later on, the comment was added in changeset 1402:08ee0a190bb7 for an
unrelated cleanup patch, also by Thomas.
My guess was that the FREE was added initially without considering the
overlapping use by postpone/recall.
Two obvious solutions I can see to the bug are:
1. Move the FREE to mutt_resend_message(), so it only takes place for a
resend. It needs to be investigated whether this is feasible or if there
is code below in mutt_prepare_template() that makes this difficult.
2. Add a flag to mutt_prepare_template() to differentiate usage between
resend and postpone. However, if there are no other differences, this is
fairly awkward.
--
Ticket URL: <http://dev.mutt.org/trac/ticket/3070#comment:2>
Mutt <http://www.mutt.org/>
The Mutt mail user agent