From: Eric Wong <e@80x24.org>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: meta@public-inbox.org
Subject: Re: [PATCH] lei: support reading MH for convert+import+index
Date: Sun, 17 Dec 2023 07:59:05 +0000 [thread overview]
Message-ID: <20231217075905.M151589@dcvr> (raw)
In-Reply-To: <20231216181718.M211068@dcvr>
Eric Wong <e@80x24.org> wrote:
> Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote:
> > Nice, so eventually we should be able to specify the following instead of
> > faking out a maildir?
> >
> > watch=mh:/var/spool/mlmmj/list.name/archive
>
> Yes, that's the plan.
Well, reading /usr/lib/python*/mailbox.py on my system makes me cry:
def pack(self):
"""Re-name messages to eliminate numbering gaps. Invalidates keys."""
That's for the Python stdlib MH class where I was looking for a
non-racy write implementation.
And checking the nmh source[1] reveals packing happens there, too...
Packing makes sense for a memory-efficient representation of
.mh_sequences without resorting to a tree or hash table; but it
invalidates `lei index' and forces -watch to do a full rescan if
anybody uses pack. Ugh...
Fortunately, this doesn't seem to be the default behavior of nmh
(`nopack' appears to be the default).
[1] https://git.savannah.gnu.org/git/nmh.git sbr/folder_pack.c
> > > inotify|EVFILT_VNODE watches aren't supported, yet, either.
At least lei should have a reasonably fast way to handle this
using mail_sync.sqlite3 to compare SHA-(1|256) without having
to decode MIME/QP/Base-64 to get comparisons... I suppose
-watch needs to start using that, too...
> > In the case of mlmmj it's sufficient to watch the
> > /var/spool/mlmmj/list.name/index file for updates, but I don't know how well
> > this lends itself to other implementations (I am not at all familiar with MH).
>
> Just watching the directory itself is sufficient (like Maildir)
> and will report new files. We just have to check /\A[0-9]+\z/
At least mlmmj won't pack because it's an archive (or at
least it shouldn't....)
next prev parent reply other threads:[~2023-12-17 7:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-16 13:09 [PATCH] lei: support reading MH for convert+import+index Eric Wong
2023-12-16 16:15 ` Konstantin Ryabitsev
2023-12-16 18:17 ` Eric Wong
2023-12-17 7:59 ` Eric Wong [this message]
2023-12-29 18:05 ` [PATCH v2] " Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231217075905.M151589@dcvr \
--to=e@80x24.org \
--cc=konstantin@linuxfoundation.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).