I have this recipe:
REPLYTO=`formail -rtzxTo:`
:0fhw
| formail -I "X-Formail-Reply-To: $REPLYTO"
It usually works fine, but sometimes the header is inserted in the midst of
other headers:
For example:
Date: Fri, 2 Apr 1999 17:57:06 -0600
From: Stephen Crowley <crow(_at_)debian(_dot_)org>
To: PublicSource(_at_)public(_dot_)lists(_dot_)apple(_dot_)com
Subject: Re: Trademark violation
Message-ID: <19990402175706(_dot_)A19567(_at_)stephenc(_dot_)wf(_dot_)net>
Mail-Followup-To: PublicSource(_at_)public(_dot_)lists(_dot_)apple(_dot_)com
References:
<Pine(_dot_)OBSD(_dot_)4(_dot_)05(_dot_)9904021543400(_dot_)26783-100000(_at_)xantham(_dot_)king(_dot_)net>;
<19990402151120(_dot_)A4816(_at_)stephenc(_dot_)wf(_dot_)net>
<Pine(_dot_)OBSD(_dot_)4(_dot_)05(_dot_)9904021543400(_dot_)26783-100000(_at_)xantham(_dot_)king(_dot_)net>
<19990402140723(_dot_)B10959(_at_)requiem(_dot_)geecs(_dot_)org>
<l03130301b32af80390b0(_at_)[209(_dot_)148(_dot_)132(_dot_)247
X-Formail-Reply-To: crow(_at_)debian(_dot_)org
]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.4i
In-Reply-To: <l03130301b32af80390b0(_at_)[209(_dot_)148(_dot_)132(_dot_)247]>;
from Matthew Dylan
Tisdall on Fri, Apr 02, 1999 at 06:51:00PM -0500
Sender: owner-publicsource(_at_)public(_dot_)lists(_dot_)apple(_dot_)com
Precedence: bulk
X-UIDL: 920423658
Status: U
Why does this happen only occasionally, and how can I fix it?
(nb: I use global lockfiles in case that matters)