unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] lei refresh-mail-sync: filter NNTP(S) from --all
@ 2022-04-30 21:29 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2022-04-30 21:29 UTC (permalink / raw)
  To: meta

We currently do not support refresh from NNTP since deletes are
rare with public-inbox NNTP servers; but traditional Usenet
servers do delete/expire messages and we should probably support
that at some point.
---
 lib/PublicInbox/LeiRefreshMailSync.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/PublicInbox/LeiRefreshMailSync.pm b/lib/PublicInbox/LeiRefreshMailSync.pm
index 7821008f..a60a9a5e 100644
--- a/lib/PublicInbox/LeiRefreshMailSync.pm
+++ b/lib/PublicInbox/LeiRefreshMailSync.pm
@@ -73,6 +73,8 @@ lei mail_sync.sqlite3 uninitialized, see lei-import(1)
 EOM
 	if (defined(my $all = $lei->{opt}->{all})) {
 		$lms->group2folders($lei, $all, \@folders) or return;
+		# TODO: handle NNTP servers which delete messages
+		@folders = grep(!m!\Anntps?://!, @folders);
 	} else {
 		$lms->arg2folder($lei, \@folders); # may die
 	}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-30 21:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-30 21:29 [PATCH] lei refresh-mail-sync: filter NNTP(S) from --all Eric Wong

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).