From unknown Mon Jun 23 22:06:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20956: [PATCH] Fix imap message size parsing Resent-From: Nikolaus Rath Original-Sender: "Debbugs-submit" Resent-CC: ding@gnus.org, bugs@gnus.org Resent-Date: Thu, 02 Jul 2015 02:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20956 X-GNU-PR-Package: gnus X-GNU-PR-Keywords: patch To: 20956@debbugs.gnu.org Cc: ding@gnus.org X-Debbugs-Original-To: submit@debbugs.gnu.org X-Debbugs-Original-Xcc: ding@gnus.org Received: via spool by submit@debbugs.gnu.org id=B.143580510913113 (code B ref -1); Thu, 02 Jul 2015 02:46:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 Jul 2015 02:45:09 +0000 Received: from localhost ([127.0.0.1]:36631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAUUv-0003PR-3M for submit@debbugs.gnu.org; Wed, 01 Jul 2015 22:45:09 -0400 Received: from ebox.rath.org ([23.92.25.96]:36597) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAUUt-0003PJ-16 for submit@debbugs.gnu.org; Wed, 01 Jul 2015 22:45:07 -0400 Received: from vostro ([192.168.12.4] helo=vostro.rath.org) by ebox.rath.org with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.80) (envelope-from ) id 1ZAUUr-0001h7-VR for submit@debbugs.gnu.org; Thu, 02 Jul 2015 02:45:06 +0000 Received: by vostro.rath.org (Postfix, from userid 1000) id 96A63EC4220; Wed, 1 Jul 2015 19:45:05 -0700 (PDT) From: Nikolaus Rath Date: Wed, 01 Jul 2015 19:45:05 -0700 Message-ID: <87zj3fb7m6.fsf@vostro.rath.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.1 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Package: gnus Tags: patch IMAP servers may sent the data items in a FETCH response in arbitrary order. However, currently Gnus assumes that the UID item is sent before the RFC822.SIZE item. If this assumption is wrong, Gnus is unable to determine the message size. The attached patch fixes this issue. Best, -Nikolaus --=20 GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=transform_headers.patch --- nnimap.el.bak1 2015-05-26 19:26:56.646513004 -0700 +++ nnimap.el.bak2 2015-07-01 19:39:26.057089923 -0700 @@ -230,6 +230,7 @@ t) (match-string 1))) (setq lines nil) + (beginning-of-line) (setq size (and (re-search-forward "RFC822.SIZE \\([0-9]+\\)" (line-end-position) --=-=-=-- From unknown Mon Jun 23 22:06:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20956: [PATCH] Fix imap message size parsing Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bugs@gnus.org Resent-Date: Tue, 07 Jul 2015 02:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20956 X-GNU-PR-Package: gnus X-GNU-PR-Keywords: patch To: Nikolaus Rath Cc: 20956@debbugs.gnu.org, ding@gnus.org Received: via spool by 20956-submit@debbugs.gnu.org id=B20956.143623759728549 (code B ref 20956); Tue, 07 Jul 2015 02:54:01 +0000 Received: (at 20956) by debbugs.gnu.org; 7 Jul 2015 02:53:17 +0000 Received: from localhost ([127.0.0.1]:42646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCJ0W-0007QP-N8 for submit@debbugs.gnu.org; Mon, 06 Jul 2015 22:53:16 -0400 Received: from mail-la0-f43.google.com ([209.85.215.43]:36101) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZCJ0V-0007QA-4X for 20956@debbugs.gnu.org; Mon, 06 Jul 2015 22:53:15 -0400 Received: by lagc2 with SMTP id c2so177078811lag.3 for <20956@debbugs.gnu.org>; Mon, 06 Jul 2015 19:53:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=+iCOYKVimDNPjhV/OePIjBg6h6pAI5pb5zje0lvSJOI=; b=krZAYlReLZzUxzppMcfaB77dsr3L+xOQ+BfxuxzmiK/oOd4kbt9ylIyqQkHZBirNVY DmZbkiVtOXe7f2TsfirQZ8AX/QbydG4SEduJ1YUzpQ0DBiDfFt6QCoTKEiTW6KyLvuGm KRYIpfsa5ONtdJGE2UsdKIXAYSm4SUrnXC1khq3mUG8L8YWLRi+puZGPcOjoJ3sCNSZX f6i4isFSU7NYDzQKo7bMo/21kUgIr7zpijRP5OtX/rnYzVt62yjxrvFIJzMp8m8SQ44g PjgBt58b+Vr9YPKo7ufq+wbM9d8xRYwEtTLTLDem4mDFSIuDlVsNq/MwhPXoGTj3shRW NaWw== X-Gm-Message-State: ALoCoQlBWzoJhXsSDpL7QP6IdjCT15TGKfkHpcc8Krn9gH2b6dUU0IreUjfsFojRwg4ZctvPmfGQ X-Received: by 10.152.21.132 with SMTP id v4mr1852438lae.18.1436237588764; Mon, 06 Jul 2015 19:53:08 -0700 (PDT) Received: from localhost ([111.199.149.245]) by mx.google.com with ESMTPSA id n4sm5216961laj.44.2015.07.06.19.53.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 19:53:07 -0700 (PDT) From: Eric Abrahamsen References: <87zj3fb7m6.fsf@vostro.rath.org> Date: Tue, 07 Jul 2015 10:53:02 +0800 In-Reply-To: <87zj3fb7m6.fsf@vostro.rath.org> (Nikolaus Rath's message of "Wed, 01 Jul 2015 19:45:05 -0700") Message-ID: <874mlgptkh.fsf@ericabrahamsen.net> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Nikolaus Rath writes: > Package: gnus > Tags: patch > > IMAP servers may sent the data items in a FETCH response in arbitrary > order. However, currently Gnus assumes that the UID item is sent before > the RFC822.SIZE item. If this assumption is wrong, Gnus is unable to > determine the message size. > > The attached patch fixes this issue. > > Best, > -Nikolaus Hi Nikolaus, Would you please resend the patch using git format-patch, and I'll apply it? With just this patch file, I'd have to manually re-create the commit, which would lose your metadata as author. Same for your other two patches, if you don't mind. Thanks! Eric From unknown Mon Jun 23 22:06:31 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Nikolaus Rath Subject: bug#20956: closed (Fixed) Message-ID: References: <87h95ieh7g.fsf@vostro.rath.org> <87zj3fb7m6.fsf@vostro.rath.org> X-Gnu-PR-Message: they-closed 20956 X-Gnu-PR-Package: gnus X-Gnu-PR-Keywords: patch Reply-To: 20956@debbugs.gnu.org Date: Sun, 01 Jan 2017 19:04:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1483297441-24371-1" This is a multi-part message in MIME format... ------------=_1483297441-24371-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #20956: [PATCH] Fix imap message size parsing which was filed against the gnus package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 20956@debbugs.gnu.org. --=20 20956: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D20956 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1483297441-24371-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 20956-done) by debbugs.gnu.org; 1 Jan 2017 19:03:02 +0000 Received: from localhost ([127.0.0.1]:38807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNlPJ-0006JV-Tv for submit@debbugs.gnu.org; Sun, 01 Jan 2017 14:03:02 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:60832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNlPI-0006JK-B0 for 20956-done@debbugs.gnu.org; Sun, 01 Jan 2017 14:03:00 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2C422208E1 for <20956-done@debbugs.gnu.org>; Sun, 1 Jan 2017 14:03:00 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sun, 01 Jan 2017 14:03:00 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=CBWUUm+8QUHOnN NchsUKvVg6/TE=; b=hoscJMEfP4SlOVQxNvAt3psqSpTg7plns9goIc8BDDNkw/ kBUKcW0HylTTg4C9JzNYhvZwoOx8UlyNXLDrjxNmI0sP0OqE1vOPMuIPxOTjLDcU vgn3ZGqrrVgRdj1teAiqwJhdspzBmFCoODPLZuxGLkhvih6rzbO/Xc9EMikzo= X-ME-Sender: X-Sasl-enc: m98W/Oq/4Igl5fSZQSkqwDaIdVgZ+uk6fIFsxlDvZY0f 1483297379 Received: from ebox.rath.org (ebox.rath.org [45.79.69.51]) by mail.messagingengine.com (Postfix) with ESMTPA id E58E67E643 for <20956-done@debbugs.gnu.org>; Sun, 1 Jan 2017 14:02:59 -0500 (EST) Received: from vostro.rath.org (vostro [192.168.12.4]) by ebox.rath.org (Postfix) with ESMTPS id 402A03EE for <20956-done@debbugs.gnu.org>; Sun, 1 Jan 2017 19:02:59 +0000 (UTC) Received: by vostro.rath.org (Postfix, from userid 1000) id 07725102471; Sun, 1 Jan 2017 11:02:59 -0800 (PST) From: Nikolaus Rath To: 20956-done@debbugs.gnu.org Subject: Fixed Date: Sun, 01 Jan 2017 11:02:59 -0800 Message-ID: <87h95ieh7g.fsf@vostro.rath.org> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20956-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Fixed in commit 1f1d39c3bcaed9870ab7f13c3c0369f17a16cee2. --=20 GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB ------------=_1483297441-24371-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 2 Jul 2015 02:45:09 +0000 Received: from localhost ([127.0.0.1]:36631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAUUv-0003PR-3M for submit@debbugs.gnu.org; Wed, 01 Jul 2015 22:45:09 -0400 Received: from ebox.rath.org ([23.92.25.96]:36597) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZAUUt-0003PJ-16 for submit@debbugs.gnu.org; Wed, 01 Jul 2015 22:45:07 -0400 Received: from vostro ([192.168.12.4] helo=vostro.rath.org) by ebox.rath.org with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.80) (envelope-from ) id 1ZAUUr-0001h7-VR for submit@debbugs.gnu.org; Thu, 02 Jul 2015 02:45:06 +0000 Received: by vostro.rath.org (Postfix, from userid 1000) id 96A63EC4220; Wed, 1 Jul 2015 19:45:05 -0700 (PDT) From: Nikolaus Rath To: submit@debbugs.gnu.org Subject: [PATCH] Fix imap message size parsing X-Debbugs-CC: ding@gnus.org Date: Wed, 01 Jul 2015 19:45:05 -0700 Message-ID: <87zj3fb7m6.fsf@vostro.rath.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Package: gnus Tags: patch IMAP servers may sent the data items in a FETCH response in arbitrary order. However, currently Gnus assumes that the UID item is sent before the RFC822.SIZE item. If this assumption is wrong, Gnus is unable to determine the message size. The attached patch fixes this issue. Best, -Nikolaus --=20 GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=transform_headers.patch --- nnimap.el.bak1 2015-05-26 19:26:56.646513004 -0700 +++ nnimap.el.bak2 2015-07-01 19:39:26.057089923 -0700 @@ -230,6 +230,7 @@ t) (match-string 1))) (setq lines nil) + (beginning-of-line) (setq size (and (re-search-forward "RFC822.SIZE \\([0-9]+\\)" (line-end-position) --=-=-=-- ------------=_1483297441-24371-1--