From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7FB911F4D7 for ; Sat, 30 Apr 2022 21:29:30 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei refresh-mail-sync: filter NNTP(S) from --all Date: Sat, 30 Apr 2022 21:29:30 +0000 Message-Id: <20220430212930.21237-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 }