From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68949 Path: news.gmane.org!not-for-mail From: Dave Goldberg Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus imap vs exchange 2007 Date: Wed, 02 Sep 2009 19:06:38 -0400 Message-ID: <84my5daqv5.fsf@incoming.verizon.net> References: <874orli565.fsf@fh-trier.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251932877 12454 80.91.229.12 (2 Sep 2009 23:07:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Sep 2009 23:07:57 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M17367@lists.math.uh.edu Thu Sep 03 01:07:50 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 1Miyvd-0007eS-Ax for ding-account@gmane.org; Thu, 03 Sep 2009 01:07:49 +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 1Miyuu-0000fH-T1; Wed, 02 Sep 2009 18:07:04 -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 1Miyup-0000ev-B2 for ding@lists.math.uh.edu; Wed, 02 Sep 2009 18:06:59 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1Miyuo-0005vD-0K for ding@lists.math.uh.edu; Wed, 02 Sep 2009 18:06:59 -0500 Original-Received: from vms173013pub.verizon.net ([206.46.173.13]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1MiyvP-0007ak-00 for ; Thu, 03 Sep 2009 01:07:35 +0200 Original-Received: from dsg-laptop.verizon.net ([173.48.212.5]) by vms173013.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KPD00L439I9WEO1@vms173013.mailsrvcs.net> for ding@gnus.org; Wed, 02 Sep 2009 18:06:10 -0500 (CDT) X-Face: W!bie|rYVd43O:2CkHTb*~s5}Yzx30X<@6Tq_bnP56Hp!xX4sVl4tgYRirjRcke\wfY!JJ9 i?]VIUJicJzq2\!3%7$5R%wi!R[.]Va97q In-reply-to: <874orli565.fsf@fh-trier.de> (Andreas Politz's message of "Wed, 02 Sep 2009 20:15:46 +0200") User-Agent: Gnus/5.110011 (No Gnus v0.11) XEmacs/21.4.22 (linux) X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68949 Archived-At: > 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. My situation is similar. Two of my three nnimap servers at work, which both happen to be exchange 2007, seem to time out, but in an unclean way and gnus doesn't realize the server is closed until it's trying to do something, resulting in an error. This is a pain particularly for gcc as the message would get sent and then be stuck there on the error. I would always have to go into the server buffer, manually close and reopen the server, then go back to the message, M-x undo (or equivalent) to get the Gcc line back, and rerun message-send, answering no to the resend question and allowing Gcc to go. I put together the following hook to deal with that, and then extended the concept to a hook for gnus-group-get-new-news. The functions used were determined by trial and error. I am not certain they are the right ones to use (they're really designed for interactive use) since reading your code so I will be revisiting this at work sometime soon. Thank you for that. (defun dsg-gnus-reopen-server (SERVER) (interactive (list (completing-read "Server: " (mapcar 'list (mapcar 'gnus-method-to-server gnus-secondary-select-methods))))) (save-window-excursion (gnus-enter-server-buffer) (cond ((gnus-server-deny-server SERVER) (gnus-server-open-server SERVER) (gnus-server-close-server SERVER) (gnus-server-open-server SERVER))))) (add-hook 'message-send-hook (lambda () (let ((GCC (message-fetch-field "Gcc"))) (cond (GCC (mapcar (lambda (SERVER) (gnus-check-server (gnus-server-to-method SERVER)) (if (not (gnus-check-server (gnus-server-to-method SERVER))) (dsg-gnus-reopen-server SERVER))) (mapcar '(lambda (FOO) (gnus-group-server FOO)) (split-string GCC ", *" t)))))))) (add-hook 'gnus-get-new-news-hook (lambda () (mapcar (lambda (METHOD) (gnus-check-server METHOD) (if (not (gnus-check-server METHOD)) (dsg-gnus-reopen-server (gnus-method-to-server METHOD)))) gnus-secondary-select-methods))) -- Dave Goldberg david.goldberg6@verizon.net