[Dovecot] mbox: extra linefeed after Content-Length header in 1.1.rc8
Timo Sirainen
tss at iki.fi
Thu Jun 5 01:07:45 EEST 2008
On Wed, 2008-06-04 at 23:59 +0200, Diego Liziero wrote:
> On Tue, Jun 3, 2008 at 3:05 PM, Timo Sirainen <tss at iki.fi> wrote:
> > On Tue, 2008-06-03 at 10:34 +0200, Diego Liziero wrote:
> >> mbox messages get header corruption caused by an extra linefeed after
> >> Content-Length
> >
> > Fixed: http://hg.dovecot.org/dovecot-1.1/rev/e043135e971d
>
> Works, thank you.
>
> Now I have to fix users mbox files.
>
> As the extra linefeed is between Content-Length and Subject headers,
> I'm thinking about using a regexp based replace such as
> s/(Content-Length: [0-9]+)\n\n(Subject: )/$1\n$2/s
> but I can't find how to make multiple lines matching work.
>
> Any suggestion?
Perl maybe? Something like (not tested):
perl -pe 'BEGIN { $/ = ""; } s/^(Content-Length: [0-9]+)\n\n(Subject: )/$1\n$2/g' < mbox > mbox2
$/ changes the line separator.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080605/97fac46b/attachment.bin
More information about the dovecot
mailing list