From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68948 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus imap vs exchange 2007 Date: Wed, 02 Sep 2009 20:15:46 +0200 Message-ID: <874orli565.fsf@fh-trier.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251916178 24194 80.91.229.12 (2 Sep 2009 18:29:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Sep 2009 18:29:38 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M17366@lists.math.uh.edu Wed Sep 02 20:29:31 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1MiuaJ-0000sS-96 for ding-account@gmane.org; Wed, 02 Sep 2009 20:29:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1MiuZ8-0007om-Hf; Wed, 02 Sep 2009 13:28:18 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1MiuNp-0007kr-4Y for ding@lists.math.uh.edu; Wed, 02 Sep 2009 13:16:37 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1MiuNb-0004kA-2A for ding@lists.math.uh.edu; Wed, 02 Sep 2009 13:16:36 -0500 Original-Received: from gateway-b.fh-trier.de ([143.93.54.182]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1MiuOC-0003Kw-00 for ; Wed, 02 Sep 2009 20:17:00 +0200 Original-Received: from raven (dslb-084-059-196-075.pools.arcor-ip.net [84.59.196.75]) (Authenticated sender: politza) by gateway-b.fh-trier.de (Postfix) with ESMTP id 51AE517B48F for ; Wed, 2 Sep 2009 20:15:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=fh-trier.de; s=default; t=1251915347; bh=L1e5WWTPpqmVHF3otRFEUYnxyKg=; h=From:To:Subject: References:Date:Message-ID:MIME-Version:Content-Type; b=rCSFMOIqxt mL8ojz0Kuex/OBDZuuoHGoyOUYqVxTkW6s74t8PLUjnrkAq20P9v38Jc8BSATwnkfNq WLzkSz10OaOywRGNWCxIoVGIGsRMhnnlyv+Q+Pl5SxpYqZycS/wAvQUAxWxj/SbR/ay LRjPDR4fiuIkyzcrMWdD6eP10rg= Cancel-Lock: sha1:IfbgkE8IK+4ekixzq0ELomqDFdg= X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum FH-Trier (r/ft)] X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68948 Archived-At: Lynbech Christian writes: > I use gnus to read my mail over imap. It works well to connect, > authenticate and read mail but when the connection has been sitting idle > for a while, something goes wrong when I try to reconnect, whether it is > to read mail or just to enter a folder. I had a similar problem. Every once in while, when trying to update my imap group, gnus tells me that the connection is down and asks, if I want to go offline. After some digging, I wrote the following in my .emacs. It sends a NOOP command every 3 minutes to every imap server, as specified by gnus select methods. If the server is down, it attempts to reconnect. The assumption here is, that the server enforces some kind of idle timeout. Though I couldn't figure it out exactly. (add-hook 'gnus-started-hook #'(lambda nil (gnus-demon-add-handler 'nnimap-assert-connected 3 t))) (defun nnimap-assert-connected () (interactive) (let ((imap-ping-server t)) ;default is t anyway (dolist (server (cons gnus-select-method gnus-secondary-select-methods)) (when (and (eq 'nnimap (car server)) (not (gnus-server-opened server))) (gnus-remove-denial server) (gnus-close-server server) (and (gnus-open-server server) (message "Reconnected server %s" (gnus-method-to-server server))))))) -ap