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

Re: mutt/2186: Mutt doesn't add Content-Length/Content-Lines when saving a rfc822 attachment



The following reply was made to PR mutt/2186; it has been noted by GNATS.

From: Thomas Roessler <roessler@xxxxxxxxxxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: 
Subject: Re: mutt/2186: Mutt doesn't add Content-Length/Content-Lines when 
saving a rfc822 attachment
Date: Tue, 21 Feb 2006 09:10:44 +0100

 On 2006-02-21 08:53:45 +0100, vincent@xxxxxxxxxx wrote:
 
 > When I save a message/rfc822 attachment to a mbox, Mutt
 > copies it or appends it to a file, adding a "From_" line,
 > but no additional headers such as Content-Length or
 > Content-Lines. Unfortunately the message may contain "From_"
 > lines, so that Mutt should have added such headers when
 > saving to mbox to avoid mbox corruption.
 
 ooops...
 
 --- attach.c   21 Oct 2005 04:35:37 -0000      3.20
 +++ attach.c   21 Feb 2006 08:09:35 -0000
 @@ -782,7 +782,7 @@
        return -1;
        }
        if (ctx.magic == M_MBOX || ctx.magic == M_MMDF)
 -      chflags = CH_FROM;
 +      chflags = CH_FROM | CH_UPDATE_LEN;
        chflags |= (ctx.magic == M_MAILDIR ? CH_NOSTATUS : CH_UPDATE);
        if (_mutt_copy_message (msg->fp, fp, hn, hn->content, 0, chflags) == 0 
          && mx_commit_message (msg, &ctx) == 0)
 
 -- 
 Thomas Roessler                              <roessler@xxxxxxxxxxxxxxxxxx>