From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/88004 Path: news.gmane.org!.POSTED!not-for-mail From: Kalle Olavi Niemitalo Newsgroups: gmane.emacs.gnus.general Subject: workaround for IMAP server-side timeout during mail splitting Date: Tue, 01 May 2018 18:50:25 +0300 Organization: Gnus News User Services Message-ID: <87a7tj4bpa.fsf@Niukka.kon.iki.fi> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1525192381 11183 195.159.176.226 (1 May 2018 16:33:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 1 May 2018 16:33:01 +0000 (UTC) User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.51 (gnu/linux) To: ding@gnus.org Original-X-From: ding-owner+m36218@lists.math.uh.edu Tue May 01 18:32:57 2018 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from mxfilter-048034.atla03.us.yomura.com ([107.189.48.34]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fDYD2-0002lQ-UL for ding-account@gmane.org; Tue, 01 May 2018 18:32:57 +0200 X-Yomura-MXScrub: 1.0 Original-Received: from lists1.math.uh.edu (unknown [129.7.128.208]) by mxfilter-048034.atla03.us.yomura.com (Halon) with ESMTPS id 8e764426-4d5d-11e8-950a-b499baa2b07a; Tue, 01 May 2018 16:34:45 +0000 (UTC) Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.90_1) (envelope-from ) id 1fDYDr-0000gz-2i; Tue, 01 May 2018 11:33:47 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fDXW3-0000Kf-1l for ding@lists.math.uh.edu; Tue, 01 May 2018 10:48:31 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.90_1) (envelope-from ) id 1fDXW0-0004mz-W1 for ding@lists.math.uh.edu; Tue, 01 May 2018 10:48:30 -0500 Original-Received: from news by quimby.gnus.org with local (Exim 4.80) (envelope-from ) id 1fDXVz-0001jU-Nt for ding@gnus.org; Tue, 01 May 2018 17:48:27 +0200 Original-Newsgroups: gnus.ding Original-Lines: 32 Original-NNTP-Posting-Host: 37-33-93-16.bb.dnainternet.fi Original-X-Trace: quimby.gnus.org 1525189707 6662 37.33.93.16 (1 May 2018 15:48:27 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Tue, 1 May 2018 15:48:27 +0000 (UTC) X-Accept-Language: fi;q=1.0, en;q=0.9, sv;q=0.5, de;q=0.1 Cancel-Lock: sha1:H/ztYmUZRBbNzsFyPPEp5WvKBJM= X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin (3.4.1 2015-04-28) analysis follows Bayesian score: 0.4996 Ham tokens: 0.000-161--6114h-0s--0d--H*M:fsf, 0.000-155--5892h-0s--0d--H*MI:fsf, 0.000-67--2519h-0s--0d--workaround, 0.000-63--2362h-0s--0d--timeout, 0.000-40--1521h-0s--0d--folders Spam tokens: 0.999-7626--38h-6077s--0d--H*r:sk:junkmas, 0.998-3858--38h-3089s--0d--H*r:sk:ding@li, 0.998-16583--207h-13313s--0d--H*r:ip*80.91.231.51, 0.998-16583--207h-13313s--0d--H*r:80.91.231, 0.997-31775--583h-25658s--0d--H*r:quimby.gnus.org Autolearn status: no autolearn_force=no -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4996] List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:88004 Archived-At: I had a problem where my email provider's IMAP server closed the connection while Gnus was splitting received mail to nnml folders, and Gnus was then unable to expunge those messages from the server. I worked around it by customizing the mail-sources variable and adding various date limits to the predicate. I hope this information will help someone else. Background: I use Gnus to download my email over IMAP and then read it on my computer. I don't normally keep any email on my email provider's server. Recently though, I neglected my computer for several weeks, and the email accumulated on the server. When I resumed using the computer, Gnus first downloaded the email, then split it to folders, and finally tried to expunge it from the server; but the server had apparently timed out and closed the connection because the splitting took so long. I retried fetching the mail but got the same error again. I monitored the IMAP responses using strace and saw that retrying the operation made Gnus fetch the UID numbers from the IMAP server again. Workaround: I customized the mail-sources variable and added a date limit to the predicate, like this: UNSEEN UNDELETED BEFORE 22-Mar-2018 That let Gnus download a smaller number of messages at a time, and finish splitting them before the server timed out. I then kept incrementing the date in the predicate until I got all the messages and could remove the date limit.