On Wed, 4 Jun 2008, Diego Liziero wrote:
On Tue, Jun 3, 2008 at 3:05 PM, Timo Sirainen <tss@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
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.
Python has an re.MULTILINE option you can pass to the regular expression so that it can cross lines. Perhaps Perl or your favorite regular expression toolkit has something similar?
If not, Python it is! (-;
-- Asheesh.
-- Do not drink coffee in early A.M. It will keep you awake until noon.