Gnus development mailing list
 help / color / mirror / Atom feed
From: Chris Shenton <chris@shenton.org>
Subject: Re: nnimap:$server unavailable... Go offline?
Date: Sat, 10 Jan 2004 15:20:35 -0500	[thread overview]
Message-ID: <86ptdr8sj0.fsf@PECTOPAH.shenton.org> (raw)
In-Reply-To: <iluptexx6eh.fsf@latte.josefsson.org> (Simon Josefsson's message of "Tue, 09 Dec 2003 18:11:50 +0100")

Chris Shenton <chris@shenton.org> 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 <jas@extundo.com> 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.



      reply	other threads:[~2004-01-10 20:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-09 17:01 Chris Shenton
2003-12-09 17:11 ` Simon Josefsson
2004-01-10 20:20   ` Chris Shenton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ptdr8sj0.fsf@PECTOPAH.shenton.org \
    --to=chris@shenton.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).