From unknown Thu Sep 11 23:31:43 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#19623 <19623@debbugs.gnu.org> To: bug#19623 <19623@debbugs.gnu.org> Subject: Status: Bug of nnimap-find-expired-articles Reply-To: bug#19623 <19623@debbugs.gnu.org> Date: Fri, 12 Sep 2025 06:31:43 +0000 retitle 19623 Bug of nnimap-find-expired-articles reassign 19623 emacs,gnus submitter 19623 OGAWA Hirofumi severity 19623 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 18 16:50:03 2015 Received: (at submit) by debbugs.gnu.org; 18 Jan 2015 21:50:03 +0000 Received: from localhost ([127.0.0.1]:60838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YCxjN-0003sd-Po for submit@debbugs.gnu.org; Sun, 18 Jan 2015 16:50:03 -0500 Received: from mail.parknet.co.jp ([210.171.160.6]:51219) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YCnFY-00026b-Pa for submit@debbugs.gnu.org; Sun, 18 Jan 2015 05:38:34 -0500 Received: from ibmpc.myhome.or.jp (unknown [210.171.168.39]) by mail.parknet.co.jp (Postfix) with ESMTP id 396DD1E003C for ; Sun, 18 Jan 2015 19:38:30 +0900 (JST) Received: from devron.myhome.or.jp (root@devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (8.14.4/8.14.4/Debian-8) with ESMTP id t0IAcSOY007328 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 18 Jan 2015 19:38:29 +0900 Received: from devron.myhome.or.jp (hirofumi@localhost [127.0.0.1]) by devron.myhome.or.jp (8.14.4/8.14.4/Debian-8) with ESMTP id t0IAcSpV007614 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 18 Jan 2015 19:38:28 +0900 Received: (from hirofumi@localhost) by devron.myhome.or.jp (8.14.4/8.14.4/Submit) id t0IAcRKS007613; Sun, 18 Jan 2015 19:38:27 +0900 From: OGAWA Hirofumi To: submit@debbugs.gnu.org (The Gnus Bugfixing Girls + Boys) Subject: Bug of nnimap-find-expired-articles X-Debbugs-Version: 5.13 X-Debbugs-Package: gnus Date: Sun, 18 Jan 2015 19:38:27 +0900 Message-ID: <87r3usxtjw.fsf@mail.parknet.co.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 18 Jan 2015 16:49:58 -0500 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.9 (/) Hi, nnimap-find-expired-articles expires wrong articles. When I am using 'never in expire config, emails in the group should not be expired. But nnmail-expired-article-p which is used by nnimap-find-expired-articles returns nil for 'never, and nnimap-find-expired-articles pass returned nil to decode-time to find articles. By using returned nil for decode-time, nnimap-find-expired-articles returns articles before current time, and expires all emails wrongly. The following patch is to fix this bug. Thanks. Gnus v5.13 GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.25) of 2015-01-13 on devron `nnmail-expired-article-p' can return nil. But `nnimap-find-expired-articles' doesn't handle nil properly. --- lisp/gnus/nnimap.el | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff -puN lisp/gnus/nnimap.el~nnimap-find-expired-articles-fix lisp/gnus/nnimap.el --- emacs/lisp/gnus/nnimap.el~nnimap-find-expired-articles-fix 2014-12-12 22:04:41.587303247 +0900 +++ emacs-hirofumi/lisp/gnus/nnimap.el 2014-12-12 22:04:41.591303236 +0900 @@ -996,19 +996,20 @@ textual parts.") (defun nnimap-find-expired-articles (group) (let ((cutoff (nnmail-expired-article-p group nil nil))) - (with-current-buffer (nnimap-buffer) - (let ((result - (nnimap-command - "UID SEARCH SENTBEFORE %s" - (format-time-string - (format "%%d-%s-%%Y" - (upcase - (car (rassoc (nth 4 (decode-time cutoff)) - parse-time-months)))) - cutoff)))) - (and (car result) - (delete 0 (mapcar #'string-to-number - (cdr (assoc "SEARCH" (cdr result)))))))))) + (when cutoff + (with-current-buffer (nnimap-buffer) + (let ((result + (nnimap-command + "UID SEARCH SENTBEFORE %s" + (format-time-string + (format "%%d-%s-%%Y" + (upcase + (car (rassoc (nth 4 (decode-time cutoff)) + parse-time-months)))) + cutoff)))) + (and (car result) + (delete 0 (mapcar #'string-to-number + (cdr (assoc "SEARCH" (cdr result))))))))))) (defun nnimap-find-article-by-message-id (group server message-id _ -- OGAWA Hirofumi From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 16:18:01 2017 Received: (at 19623) by debbugs.gnu.org; 25 Jan 2017 21:18:01 +0000 Received: from localhost ([127.0.0.1]:43703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWUx7-0002a3-7H for submit@debbugs.gnu.org; Wed, 25 Jan 2017 16:18:01 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:46526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWUx5-0002Zv-No for 19623@debbugs.gnu.org; Wed, 25 Jan 2017 16:18:00 -0500 Received: from 2.150.50.220.tmi.telenormobil.no ([2.150.50.220] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cWUx0-0005Af-A3; Wed, 25 Jan 2017 22:17:58 +0100 From: Lars Ingebrigtsen To: OGAWA Hirofumi Subject: Re: bug#19623: Bug of nnimap-find-expired-articles In-Reply-To: <87r3usxtjw.fsf@mail.parknet.co.jp> (OGAWA Hirofumi's message of "Sun, 18 Jan 2015 19:38:27 +0900") Date: Wed, 25 Jan 2017 22:17:34 +0100 Message-ID: <871svqdekx.fsf@gnus.org> References: <87r3usxtjw.fsf@mail.parknet.co.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19623 Cc: 19623@debbugs.gnu.org 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.0 (/) Sorry for the late response; the bug report has been sitting in a part of the bug tracker that nobody has looked at due to a misunderstanding. OGAWA Hirofumi writes: > nnimap-find-expired-articles expires wrong articles. > > When I am using 'never in expire config, emails in the group should not > be expired. But nnmail-expired-article-p which is used by > nnimap-find-expired-articles returns nil for 'never, and > nnimap-find-expired-articles pass returned nil to decode-time to find > articles. > > By using returned nil for decode-time, nnimap-find-expired-articles > returns articles before current time, and expires all emails wrongly. > > The following patch is to fix this bug. Thanks for the patch. It seems like somebody else has applied the same fix in the meantime, though. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 16:17:50 2017 Received: (at control) by debbugs.gnu.org; 25 Jan 2017 21:17:50 +0000 Received: from localhost ([127.0.0.1]:43700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWUww-0002Za-0k for submit@debbugs.gnu.org; Wed, 25 Jan 2017 16:17:50 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:46520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWUwu-0002ZT-Nn for control@debbugs.gnu.org; Wed, 25 Jan 2017 16:17:49 -0500 Received: from 2.150.50.220.tmi.telenormobil.no ([2.150.50.220] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cWUws-0004gH-8T for control@debbugs.gnu.org; Wed, 25 Jan 2017 22:17:48 +0100 From: Lars Ingebrigtsen To: control@debbugs.gnu.org Subject: control message for bug #19623 Message-ID: <8760l2deol.fsf@totally-fudged-out-message-id> Date: Wed, 25 Jan 2017 22:17:40 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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.0 (/) reassign 19623 emacs,gnus From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 16:18:08 2017 Received: (at control) by debbugs.gnu.org; 25 Jan 2017 21:18:08 +0000 Received: from localhost ([127.0.0.1]:43709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWUxE-0002b4-Gr for submit@debbugs.gnu.org; Wed, 25 Jan 2017 16:18:08 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:46538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWUxC-0002av-L1 for control@debbugs.gnu.org; Wed, 25 Jan 2017 16:18:06 -0500 Received: from 2.150.50.220.tmi.telenormobil.no ([2.150.50.220] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cWUxA-0005o7-Fq for control@debbugs.gnu.org; Wed, 25 Jan 2017 22:18:06 +0100 From: Lars Ingebrigtsen To: control@debbugs.gnu.org Subject: control message for bug #19623 Message-ID: <87ziiec00f.fsf@totally-fudged-out-message-id> Date: Wed, 25 Jan 2017 22:17:58 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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.0 (/) close 19623 From unknown Thu Sep 11 23:31:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 23 Feb 2017 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator