unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 8/8] net_reader: support Mail::IMAPClient Ignoresizeerrors
Date: Thu,  9 Sep 2021 05:25:05 +0000	[thread overview]
Message-ID: <20210909052505.7174-9-e@80x24.org> (raw)
In-Reply-To: <20210909052505.7174-1-e@80x24.org>

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/lib/PublicInbox/NetReader.pm
index 181741f6..a0e52fc5 100644
--- a/lib/PublicInbox/NetReader.pm
+++ b/lib/PublicInbox/NetReader.pm
@@ -285,12 +285,16 @@ sub imap_common_init ($;$) {
 	my $mic_common = {}; # scheme://authority => Mail:IMAPClient arg
 	for my $uri (@{$self->{imap_order}}) {
 		my $sec = uri_section($uri);
-		for my $k (qw(Starttls Debug Compress)) {
+
+		# knobs directly for Mail::IMAPClient->new
+		for my $k (qw(Starttls Debug Compress Ignoresizeerrors)) {
 			my $bool = cfg_bool($cfg, "imap.$k", $$uri) // next;
 			$mic_common->{$sec}->{$k} = $bool;
 		}
 		my $to = cfg_intvl($cfg, 'imap.timeout', $$uri);
 		$mic_common->{$sec}->{Timeout} = $to if $to;
+
+		# knobs we use ourselves:
 		my $sa = socks_args($cfg->urlmatch('imap.Proxy', $$uri));
 		$self->{cfg_opt}->{$sec}->{-proxy_cfg} = $sa if $sa;
 		for my $k (qw(pollInterval idleInterval)) {

      parent reply	other threads:[~2021-09-09  5:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09  5:24 [PATCH 0/8] net_reader: simplify + fix bugs Eric Wong
2021-09-09  5:24 ` [PATCH 1/8] net_reader: do not set "SSL" fields for non-TLS Eric Wong
2021-09-09  5:24 ` [PATCH 2/8] net_reader: set IMAPClient Keepalive flag late Eric Wong
2021-09-09  5:25 ` [PATCH 3/8] net_reader: preserve memoized IMAPClient arg for SOCKS Eric Wong
2021-09-09  5:25 ` [PATCH 4/8] net_reader: nntp_opt => cfg_opt Eric Wong
2021-09-09  5:25 ` [PATCH 5/8] net_reader: imap_opt " Eric Wong
2021-09-09  5:25 ` [PATCH 6/8] net_reader: combine Net::NNTP and IMAPClient args Eric Wong
2021-09-09  5:25 ` [PATCH 7/8] net_reader: improve naming of common args Eric Wong
2021-09-09  5:25 ` Eric Wong [this message]

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

  List information: https://public-inbox.org/README

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

  git send-email \
    --in-reply-to=20210909052505.7174-9-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.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 read-only IMAP folder(s) and NNTP newsgroup(s).