From 48d35e65472e29d808a4bf604b7f99270496b810 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 22 Feb 2021 17:54:33 +0100 Subject: Improve message for unknown untagged UIDNEXT response. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per RFC3501 §6.3.1 and §6.3.2 ‘UIDNEXT’ must be returned in an OK untagged response. See also Appendix B#34. However §6.3.1 suggests that it's in fact optional: “If this is missing, the client can not make any assumptions about the next unique identifier value.” A correction was proposed in Errata ID 3445 https://www.rfc-editor.org/errata/eid3445 , and rejected on the ground that clients SHOULD support the implement default behavior for missing data. We heavily rely on the ‘UIDNEXT’ presence and won't implement a workaround for its absence; instead we panic() with a more informative message. --- lib/Net/IMAP/InterIMAP.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Net/IMAP/InterIMAP.pm b/lib/Net/IMAP/InterIMAP.pm index a171554..56164cf 100644 --- a/lib/Net/IMAP/InterIMAP.pm +++ b/lib/Net/IMAP/InterIMAP.pm @@ -1312,7 +1312,8 @@ sub pull_new_messages($$&@) { # 2^32-1: don't use '*' since the highest UID can be known already $range .= "$since:4294967295"; - $UIDNEXT = $cache->{UIDNEXT} // $self->panic(); # sanity check + $UIDNEXT = $cache->{UIDNEXT} // + $self->panic("Unknown UIDNEXT value - non-compliant server?"); $self->fetch($range, "($attrs)", sub($) { my $mail = shift; $UIDNEXT = $mail->{UID} + 1 if $UIDNEXT <= $mail->{UID}; -- cgit v1.2.3 From 6b0010d82fe47b5f1f27084732431fb5b4ca0697 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Fri, 25 Feb 2022 01:04:32 +0100 Subject: Update copyright years. --- lib/Net/IMAP/InterIMAP.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Net/IMAP/InterIMAP.pm b/lib/Net/IMAP/InterIMAP.pm index 56164cf..5d1748b 100644 --- a/lib/Net/IMAP/InterIMAP.pm +++ b/lib/Net/IMAP/InterIMAP.pm @@ -1,6 +1,6 @@ #---------------------------------------------------------------------- # A minimal IMAP4 client for QRESYNC-capable servers -# Copyright © 2015-2020 Guilhem Moulin +# Copyright © 2015-2022 Guilhem Moulin # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -- cgit v1.2.3 From 8ad5e5a218253a76eabf36bfd83f9e1a2a708377 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 27 Feb 2022 16:24:31 +0100 Subject: Prepare new release v0.5.7. --- lib/Net/IMAP/InterIMAP.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Net/IMAP/InterIMAP.pm b/lib/Net/IMAP/InterIMAP.pm index 5d1748b..55a18a0 100644 --- a/lib/Net/IMAP/InterIMAP.pm +++ b/lib/Net/IMAP/InterIMAP.pm @@ -16,7 +16,7 @@ # along with this program. If not, see . #---------------------------------------------------------------------- -package Net::IMAP::InterIMAP v0.5.6; +package Net::IMAP::InterIMAP v0.5.7; use v5.20.0; use warnings; use strict; -- cgit v1.2.3