]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/NetReader.pm
net_reader: drop support for IgnoreSizeErrors option
[public-inbox.git] / lib / PublicInbox / NetReader.pm
index e305523e300b16c2b32b59442ecadf44be683c02..2b74af4142155a76a632369ebfed81b240c50f4b 100644 (file)
@@ -328,7 +328,7 @@ sub imap_common_init ($;$) {
                my $sec = uri_section($uri);
 
                # knobs directly for Mail::IMAPClient->new
-               for my $k (qw(Starttls Debug Compress Ignoresizeerrors)) {
+               for my $k (qw(Starttls Debug Compress)) {
                        my $bool = cfg_bool($cfg, "imap.$k", $$uri) // next;
                        $mic_common->{$sec}->{$k} = $bool;
                }
@@ -344,10 +344,10 @@ sub imap_common_init ($;$) {
                }
                my $k = 'imap.fetchBatchSize';
                my $bs = $cfg->urlmatch($k, $$uri) // next;
-               if ($bs =~ /\A([0-9]+)\z/) {
+               if ($bs =~ /\A([0-9]+)\z/ && $bs > 0) {
                        $self->{cfg_opt}->{$sec}->{batch_size} = $bs;
                } else {
-                       warn "$k=$bs is not an integer\n";
+                       warn "$k=$bs is not a positive integer\n";
                }
        }
        # make sure we can connect and cache the credentials in memory
@@ -729,7 +729,10 @@ sub _nntp_fetch_all ($$$) {
        }
        (defined($num_a) && defined($num_b) && $num_a > $num_b) and
                return "E: $uri: backwards range: $num_a > $num_b";
-
+       if (defined($num_a)) { # no article numbers in mail_sync.sqlite3
+               $uri = $uri->clone;
+               $uri->group($group);
+       }
        # IMAPTracker is also used for tracking NNTP, UID == article number
        # LIST.ACTIVE can get the equivalent of UIDVALIDITY, but that's
        # expensive.  So we assume newsgroups don't change: