lei refresh-mail-sync [vs. prune-mail-sync]

2021-09-08 Thread Eric Wong
I'm thinking "lei prune-mail-sync" should be replaced with "lei refresh-mail-sync". Some things move around in Maildir and get pruned from mail_sync.sqlite3 instead of updated if lei-daemon wasn't running (or the inotify queue overflows) -- unsubscribe: one-click, see List-Unsubscribe header arch

[PATCH] lei up: print messages before disconnecting

2021-09-08 Thread Eric Wong
Closing the socket for script/lei needs to be done AFTER the final message(s) are printed. --- lib/PublicInbox/LeiFinmsg.pm | 9 + lib/PublicInbox/LeiUp.pm | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/PublicInbox/LeiFinmsg.pm b/lib/PublicInbox/LeiFinmsg.pm

[PATCH 6/8] net_reader: combine Net::NNTP and IMAPClient args

2021-09-08 Thread Eric Wong
Since these are keyed by IMAP and NNTP URIs which can never conflict, it simplifies our internals to keep them in one big hash since we'll add POP3 and JMAP client support. --- lib/PublicInbox/NetReader.pm | 10 -- lib/PublicInbox/Watch.pm | 2 +- 2 files changed, 5 insertions(+), 7 d

[PATCH 8/8] net_reader: support Mail::IMAPClient Ignoresizeerrors

2021-09-08 Thread Eric Wong
Some proprietary servers may do wacky things and give the wrong size, so Mail::IMAPClient has a knob for this which we can expose to users to workaround this. --- lib/PublicInbox/NetReader.pm | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/NetReader.pm b/li

[PATCH 7/8] net_reader: improve naming of common args

2021-09-08 Thread Eric Wong
IMHO this makes things easier-to-follow than before. --- lib/PublicInbox/NetReader.pm | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm index 91e53913..181741f6 100644 --- a/lib/PublicInbox/NetRe

[PATCH 4/8] net_reader: nntp_opt => cfg_opt

2021-09-08 Thread Eric Wong
Since this our internal NNTP options are keyed by URI section, there's no need to have separate hashes for NNTP and IMAP options since they URI already distinguishes them. This will make future changes to support POP3 and JMAP and arg caching with lei/store easier. --- lib/PublicInbox/NetReader.p

[PATCH 5/8] net_reader: imap_opt => cfg_opt

2021-09-08 Thread Eric Wong
Since this our internal IMAP options are keyed by URI section, there's no need to have separate hashes for NNTP and IMAP options since they URI already distinguishes them. This will make future changes to support POP3 and JMAP and arg caching with lei/store easier. --- lib/PublicInbox/NetReader.p

[PATCH 2/8] net_reader: set IMAPClient Keepalive flag late

2021-09-08 Thread Eric Wong
Since we always enable SO_KEEPALIVE unconditionally, having it in {mic_arg} leads to unnecessary IPC overhead and memory use. --- lib/PublicInbox/NetReader.pm | 3 +-- lib/PublicInbox/Watch.pm | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/NetReader.pm b

[PATCH 0/8] net_reader: simplify + fix bugs

2021-09-08 Thread Eric Wong
What started off as a series of cleanups leads to some minor bug fixes for some uncommon corner-cases. These changes will hopefully simplify IPC for sharing auth with lei/store and IMAP IDLE watchers. Eric Wong (8): net_reader: do not set "SSL" fields for non-TLS net_reader: set IMAPClient Ke

[PATCH 3/8] net_reader: preserve memoized IMAPClient arg for SOCKS

2021-09-08 Thread Eric Wong
Multiple invocations of mic_new may happen in long-lived processes, so do not let mic_new make irreversible changes to the cached args when using a SOCKS proxy. --- lib/PublicInbox/NetReader.pm | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/PublicInbox/NetReader

[PATCH 1/8] net_reader: do not set "SSL" fields for non-TLS

2021-09-08 Thread Eric Wong
This will save a little bit of memory and IPC I/O for users connecting to localhost and the majority of Tor .onions. --- lib/PublicInbox/NetReader.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm index 08166415..b5

[PATCH] lei prune-mail-sync: ignore missing locations

2021-09-08 Thread Eric Wong
"lei prune-mail-sync --all" shouldn't abort if a location isn't available, and maybe it should prune harder... --- lib/PublicInbox/LeiPruneMailSync.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiPruneMailSync.pm b/lib/PublicInbox/LeiPruneMailSync.pm inde

[PATCH] lei_input: provide hint for bare "L:" and "kw:"

2021-09-08 Thread Eric Wong
I just made this mistake running "lei import" myself, so I figure giving a hint makes sense, here. --- lib/PublicInbox/LeiInput.pm | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiInput.pm b/lib/PublicInbox/LeiInput.pm index cb71e97c..8ce445c8 100644 --- a

[PATCH] lei-rm: add man page, support LeiInput args

2021-09-08 Thread Eric Wong
-F/--in-format and --lock=TYPE(S) are easily supported by all classes using LeiInput. --- Documentation/lei-rm.pod | 72 MANIFEST | 1 + Makefile.PL | 2 +- lib/PublicInbox/LEI.pm | 2 +- 4 files changed, 75 insertions(+),

Re: Showcasing lei at Linux Plumbers

2021-09-08 Thread Eric Wong
Konstantin Ryabitsev wrote: > On Wed, Sep 08, 2021 at 02:49:48PM +, Eric Wong wrote: > > I've been thinking of making lei storage accessible as Maildirs > > via FUSE, as well. > > That's a pretty cool idea, actually -- would that be readonly or with full > deletes/renames support? Renames fo

Re: Showcasing lei at Linux Plumbers

2021-09-08 Thread Konstantin Ryabitsev
On Wed, Sep 08, 2021 at 02:49:48PM +, Eric Wong wrote: > > On the other hand, a service that offers full search-based imap/pop3 folders > > is going to be an easy sell: > > > > - it works with any imap client as a simple extra account > > - it can be mirrored locally and synced two-ways via mb

[PATCH] git_http_backend: forward HTTP_GIT_PROTOCOL in request headers

2021-09-08 Thread Eric Wong
It looks like git-http-backend(1) will support HTTP_GIT_PROTOCOL, soon, and we won't have to add GIT_PROTOCOL support to support newer versions of the git protocol, either. Link: https://public-inbox.org/git/ytixeees36nce...@coredump.intra.peff.net/ --- lib/PublicInbox/GitHTTPBackend.pm | 1 + 1

Re: Showcasing lei at Linux Plumbers

2021-09-08 Thread Eric Wong
Konstantin Ryabitsev wrote: > On Tue, Sep 07, 2021 at 10:14:04PM +, Eric Wong wrote: > > > One of the > > > options I want to investigate is making IMAP/POP3 accessible individual > > > mailboxes fed by lei, such that a new subsystem maintainer could have a > > > ready-made mailbox available t

Re: Showcasing lei at Linux Plumbers

2021-09-08 Thread Konstantin Ryabitsev
On Tue, Sep 07, 2021 at 10:14:04PM +, Eric Wong wrote: > > One of the > > options I want to investigate is making IMAP/POP3 accessible individual > > mailboxes fed by lei, such that a new subsystem maintainer could have a > > ready-made mailbox available to them without needing to > > subscrib

Re: [PATCH] news_www: favor ->ALL URL when using ->ALL

2021-09-08 Thread Konstantin Ryabitsev
On Tue, Sep 07, 2021 at 10:02:03PM +, Eric Wong wrote: > This allows us to link to threads spread across multiple inboxes. > > Reported-by: Konstantin Ryabitsev > Link: > https://public-inbox.org/meta/20210907140954.4rlh6pn5fz4ljkxp@meerkat.local/ Works great, thanks! -K