tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: tools@linux.kernel.org, users@kernel.org, meta@public-inbox.org
Subject: Re: Does anyone have any tips for efficient lei and dovecot integration?
Date: Fri, 6 Jun 2025 18:02:18 +0000	[thread overview]
Message-ID: <20250606180218.M374829@dcvr> (raw)
In-Reply-To: <0bb9762f3bcee7b185f1eabc6c88859c0bf6f4ac.camel@HansenPartnership.com>

James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
> This will only interest the diminishing number of you actually running
> your own email server (or possibly if you have a shell login to the
> actual dovecot system).

+Cc: meta@public-inbox.org

Fwiw, lei can output directly to IMAP and not just Maildir.  The
main problem is Mail::IMAPClient is awful on high-latency links
due to a lack of pipelining right now.

> The next problem I have is that I don't really want to use double the
> storage, so I need to use my dovecot maildir backend as the only
> storage.  This leads to trying to use the --no-import-remote on the
> queries, but it doesn't seem to work: I still get allocations in the
> store greater in size than the contents of the existing mailbox ... so
> if anyone has a fix for that, I'm all ears?

I think that's answered below...

> The command I'm using (after unsubscribing from a list) is:
> 
> lei q --augment --no-import-remote --dedupe=mid -o <maildir list location> -I <lore list location> "d:<currentdate>.."
 
> Don't forget --augment (I did once and it destroyed my entire mailbox).
> Then I have to get dovecot to index it:

Oops, yeah, --augment being off by default is a mairix behavior
I imitated :x.  Unless you used --no-import-before, lei imported
your mailbox into ~/.local/share/lei/store before writing to
the -o destination; so you could dump everything it imported
back out: lei q --augment -o OUTPUT z:0..
(z:0.. means message size >= 0)

> doveadm force-resync -u jejb <maildir list location>

AFAIK, dovecot uses inotify||kevent to detect changes to its
Maildirs.  I never needed to run `doveadm force-resync' after
writing with 3rd-party tools (e.g. lei, mutt) to Maildirs used
by dovecot.

> So far I've been converting over my lists slowly (especially as it
> takes this lei shard command ages to run over a large existing mbox)
> but it seems to be working.

Yeah, performance is pretty awful but have some long-term goals
to work on, there (a separate discussion later/elsewhere).

> Actually the most annoying issue now is
> the confirmation round trip to unsubscribe from every list ...

Probably easier to set up bounces on your MTA and let the
mailing list software auto-unsubscribe you :>

  reply	other threads:[~2025-06-06 18:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-30 18:46 Does anyone have any tips for efficient lei and dovecot integration? James Bottomley
2025-06-06 18:02 ` Eric Wong [this message]
2025-06-06 20:24   ` James Bottomley
2025-06-07  0:04     ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250606180218.M374829@dcvr \
    --to=e@80x24.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=meta@public-inbox.org \
    --cc=tools@linux.kernel.org \
    --cc=users@kernel.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 NNTP newsgroup(s).