[MlMt] Copying the contents of a smart folder to a zip file?
John Doherty
jld at jld3.net
Thu May 16 10:14:38 EDT 2024
On Thu 2024-05-16 06:36 AM MDT -0600,
<mmlist-20120120 at billmail.scconsult.com> wrote:
> On 2024-05-15 at 20:18:29 UTC-0400 (Wed, 15 May 2024 20:18:29 -0400)
> Steven M. Bellovin <mailmate at lists.freron.com>
> is rumored to have said:
>
>> Is there any rational way to copy every message in a smart folder to
>> a single zip file, preserving the date order? If I cmd-C the list of
>> messages and copy/paste the files somewhere (or do the same via the
>> command line), the order is quasi-random, not preserving dates. (I'm
>> perfectly happy to do any sort of weird stuff from the command line.)
>
> Have you tried the functions in the Commands->Export menu? It's a bit
> non-obvious in UI but it will export a selected set of messages to a
> directory full of individual messages or a mbox file.
I tried this. It will produce a set of files whose names sort properly
by date, but not by time. For example:
2021-07-14-034025fdb044ca26.eml
2021-07-15-a76c7c2dcfff4c9f.eml
2021-07-15-e9b288418d937cd6.eml
2021-12-17-77f765e4606ab29b.eml
2021-12-30-7a4eb44e137708f8.eml
2021-12-30-9c30e2c3aee58e9c.eml
2021-12-30-a3324846d8b73fd8.eml
2021-12-31-77452226d0768915.eml
And that's fine as far as it goes, but it turns out that, for example,
the two files from 2021-07-15 are not correctly sorted by time:
$ grep '^Date: ' 2021-07-15*
2021-07-15-a76c7c2dcfff4c9f.eml:Date: Sun, 15 Jul 2021 00:26:14 +0000
2021-07-15-e9b288418d937cd6.eml:Date: Sun, 15 Jul 2021 00:03:14 +0000
Exporting to mbox format doesn't seem to produce a file in which the
messages are sorted by date either:
$ grep '^Date: ' INBOX.mbox | head -4
Date: Tue, 31 Dec 2021 00:07:54 +0000
Date: Mon, 30 Dec 2021 23:16:24 +0000
Date: Mon, 28 Feb 2022 15:57:23 +0000
Date: Sun, 15 Jul 2021 00:03:14 +0000
That surprised me a little. I have no idea what, if any, order the
messages are in.
More information about the mailmate
mailing list