[Users] Creating threads manually
H.Merijn Brand
h.m.brand at xs4all.nl
Wed Jul 18 21:33:14 CEST 2018
On Wed, 18 Jul 2018 20:47:39 +0300, Removed GDPR <removed-gdpr at example.com>
wrote:
> > Note that this script only removes all In-Reply-To:
> > and References: tags from the header.
>
> It doesn't work. After running it on a bunch of
> messages I see those headers remain. I tested removing
> the headers using sed in bash:
>
> sed -i 's/^In-Reply-To:.*//ig' *
> sed -i 's/^References:.*//ig' *
>
> which restores the flat structure but creates too
> many new lines. I couldn't find a way to capture the
> trailing '\n' in the regex pattern.
That will fail if a message references (many) other messages, which can
happen, and the lines spread across multiple lines like in this thread:
In-Reply-To: <20180718122437.22556caa at pc09.procura.nl>
References: <20180716143445.1a48e79a at localhost>
<20180716150830.6e6bfcbd at localhost>
<20180716160125.29777141 at riri.DEF.witbe.net>
<20180716172128.09549b09 at localhost>
<20180716162517.0000598b at surtees.fenrir.org.uk>
<20180716164303.571be67a at bletchley.towers.org.uk>
<20180716180106.638895dd at penny>
<20180716172613.523d6f19 at bletchley.towers.org.uk>
<20180716203728.10b22882 at localhost>
<20180717084536.256db7c5 at pc09.procura.nl>
<20180717120433.4e07e0eb at localhost>
<20180717112131.6b60b365 at pc09.procura.nl>
<20180717124039.71372ece at localhost>
<20180717120110.67a93b02 at pc09.procura.nl>
<20180717174344.1507ddbe at localhost>
<20180717172556.625ba5b2 at pc09.procura.nl>
<20180717183417.3f4ca0b0 at localhost>
<20180717174457.653b0024 at pc09.procura.nl>
<20180718004249.6381889f at localhost>
<20180718010852.284f729a at localhost>
<20180718090416.2c4b6b42 at pc09.procura.nl>
<20180718125107.20d56a27 at localhost>
<20180718122437.22556caa at pc09.procura.nl>
My perl script should take care of that.
Another problem with your sed example is that it might break embedded
mails
--
H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/
using perl5.00307 .. 5.27 porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/
http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20180718/e1e75945/attachment.sig>
More information about the Users
mailing list