From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/55894 Path: main.gmane.org!not-for-mail From: Chris Shenton Newsgroups: gmane.emacs.gnus.general Subject: Re: nnimap:$server unavailable... Go offline? Date: Sat, 10 Jan 2004 15:20:35 -0500 Sender: ding-owner@lists.math.uh.edu Message-ID: <86ptdr8sj0.fsf@PECTOPAH.shenton.org> References: <867k16x6v5.fsf@PECTOPAH.shenton.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1073766077 1463 80.91.224.253 (10 Jan 2004 20:21:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 10 Jan 2004 20:21:17 +0000 (UTC) Original-X-From: ding-owner+M4434@lists.math.uh.edu Sat Jan 10 21:21:13 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AfPbc-00070a-00 for ; Sat, 10 Jan 2004 21:21:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1AfPbD-00018G-00; Sat, 10 Jan 2004 14:20:47 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1AfPb4-000188-00 for ding@lists.math.uh.edu; Sat, 10 Jan 2004 14:20:38 -0600 Original-Received: from Shenton.org (23.ebbed1.client.atlantech.net [209.190.235.35]) by justine.libertine.org (Postfix) with SMTP id A24E03A0048 for ; Sat, 10 Jan 2004 14:20:37 -0600 (CST) Original-Received: (qmail 80083 invoked by uid 1001); 10 Jan 2004 20:20:35 -0000 Original-To: ding@gnus.org In-Reply-To: (Simon Josefsson's message of "Tue, 09 Dec 2003 18:11:50 +0100") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:55894 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:55894 Chris Shenton writes: >> I have an nnimap server, connect to it (with starttls), read mail for >> a while, then ignore it a while. When I return, and do a "g" to check >> mail (or go into a group to check headers, or...) Gnus reports >> >> Unable to open nnimap:myservername, go offline? Simon Josefsson writes: > Gnus do try to re-open the connection, but apparently it failed to do > so, and asked that question. Look in the *Message* buffer for any > earlier errors that may suggest why it was unable to reopen the > connection. I don't see anything interesting in *Message* but did turn on imap-debug, imap-log, and nnimap-debug; I only see an *imap-log* buffer, however. It's a little helpful but I'm still not able to reconnect -- at least not with STARTTLS. Details below. I've pulled Gnus "No Gnus v0.2" from CVS a few days ago but I'm still getting disconnected and Gnus doesn't reconnect. The disconnect happens when the IMAP daemon times out and says BYE, from *imap-log*: * BYE Disconnected for inactivity. When I type "G" in groups, it fails to connect (as I reported earlier) and I have to answer Yes to take it offline. Nothing is said on port 143 when I sniff the connection while trying to do this "G" after the disconnect -- it's not really trying to login to IMAP! If I quit gnus then restart, it reconnects ok. That's odd. I've done some testing and believe it's an interaction problem between nnimap and starttls. My select methods are like: (setq gnus-secondary-select-methods '( (nnimap "pectopah" (nnimap-address "pectopah.shenton.org") ) ))) The server offers STARTTLS but doesn't require it from my LAN. Gnus finds the "starttls" binary I got from ftp://ftp.opaopa.org/pub/elisp/ and does the STARTTLS ok. If I hide the "starttls" binary or tell it to use plaintext in the server definition with the attribute: (nnimap "pectopah" ;use ~/.authinfo for user/passwd (nnimap-address "pectopah.shenton.org") (nnimap-stream "network") ) then it *is* able to reconnect after a BYE disconnect. So there appears to be an interaction problem with nnimap and starttls. If I use "^" in *Group* to go into the *Server* buffer I see my IMAP server is offline after the BYE timeout above: {nnimap:pectopah} (offline) (agent) I can say "O" to take it online: {nnimap:pectopah} (opened) (agent) Then I can read as normal, from the *imap-log*; note the first command below is the same as Gnus sent after the timeout above but that one failed; this one succeeds: 4887 STARTTLS * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE AUTH=PLAIN STARTTLS LOGINDISABLED] Courier-IMAP ready. Copyright 1998-2003 Double Precision, Inc. See COPYING for distribution information. 4887 OK Begin SSL/TLS negotiation now. 4888 LOGIN "chris" "yeahright" So what's the difference? I can't see anything more detailed in various logs. * Why does nnimap reconnect when there's no "starttls" binary involved? * Why does nnimap reconnect using "starttls" binary if I "Open" the Server? * Why doesn't it reconnect with "starttls" when I do "G" in *Group* or let it time out and try to retrieve the next message in *Summary*? Any suggestions how to debug, diagnose, and fix? Thanks.