Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Debugging an imap connection in gnus
@ 2010-03-24 23:48 Paul Bibbings
  2010-03-25  1:44 ` Paul Bibbings
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Bibbings @ 2010-03-24 23:48 UTC (permalink / raw)
  To: info-gnus-english

I've been reading my gmail in gnus for some while now, and without
issue.  I'm running gnus v0.11, emacs 23.1.1 (i386-mingw-nt6.0.6002) on
Windows Vista.  To connect to my gmail I've been using imap with an ssl
connection that uses a version of openssl bundled with the Cygwin
environment.  Today there was a major upgrade of Cygwin to 1.7.2-1
coupled with a release upgrade of openssl to 0.9.8m-1.  After the
upgrades, I can no longer connect to the imap server from gnus.

Clearly this is an issue that I will need to take to the Cygwin mailing
lists, but before I can I need to get some information out of my
Emacs/Gnus package about just what is failing, but I am failing myself
to get even that.

With an unchanged .emacs (the details of which I can provide, if
necessary) I'm merely getting the following message in the minibuffer:

   Mail source (imap :server imap.gmail.com :port 993 :user
   paul.bibbings@gmail.com :password ******** :authentication (quote
   login) :stream ssl :fetchflag \Seen) error (IMAP error: nil).
   Continue? (yes or no) 

This is very Gnus/Emacs-specific and not enough to take to Cygwin, but I
can't get any more than this.

These are the things that I have tried so far:

1. With (setq imap-debug t) I do indeed get some debug output, but it
   doesn't add anything other than what Gnus and Emacs are doing
2. With (setq imap-log t) I get nothing, despite the fact that the docs
   suggest that this should only be enabled when necessary because the
   logging output is verbose.

What I need is some output from the openssl connection itself, and
perhaps the weird thing here is that I can, in fact, get a successful
connection and login from a bash prompt to gmail's server using the
commands that gnus is trying to issue.  For instance, in the *Messages*
buffer I get:

   imap: Connecting to imap.gmail.com...
   imap: Opening SSL connection with `openssl s_client -quiet -ssl3
   -connect %s:%p'...
   imap: Connecting to imap.gmail.com...failed

where the equivalent at the bash prompt gets me:

   23:29:20 Paul Bibbings@JIJOU
   /cygdrive/d/emacs-23.1/bin $openssl s_client -quiet -ssl3 -connect
   imap.gmail.com:993
   depth=1 /C=US/O=Google Inc/CN=Google Internet Authority
   verify error:num=20:unable to get local issuer certificate
   verify return:0
   * OK Gimap ready for requests from 86.15.147.8 10if799592bkw.36

So, I'm not even sure that this /is/ an issue with Cygwin directly.

Perhaps as a starting point someone could help me to understand, in the
first error message from the minibuffer (given above), what the 

   (IMAP error: nil)

is actually saying.  What does Gnus actually see as failing?

Any help will be greatly appreciated.

Regards

Paul Bibbings

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Debugging an imap connection in gnus
  2010-03-24 23:48 Debugging an imap connection in gnus Paul Bibbings
@ 2010-03-25  1:44 ` Paul Bibbings
  2010-03-25 14:15   ` Ted Zlatanov
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Bibbings @ 2010-03-25  1:44 UTC (permalink / raw)
  To: info-gnus-english

Paul Bibbings <paul.bibbings@gmail.com> writes:

> I've been reading my gmail in gnus for some while now, and without
> issue.  I'm running gnus v0.11, emacs 23.1.1 (i386-mingw-nt6.0.6002) on
> Windows Vista.  To connect to my gmail I've been using imap with an ssl
> connection that uses a version of openssl bundled with the Cygwin
> environment.  Today there was a major upgrade of Cygwin to 1.7.2-1
> coupled with a release upgrade of openssl to 0.9.8m-1.  After the
> upgrades, I can no longer connect to the imap server from gnus.

<snip />

Responding to myself, I have managed to solve this without having to try
and decipher the error messages I was getting from Gnus.  It turned out
to be something very remote from either Gnus, or Cygwin for that
matter.  In my environment variables on my Windows installation I had
(for whatever reason)

   SHELL=C:\cygwin\bin\bash.exe

That's odd, in itself, since Windows doesn't need bash as a shell, and
Cygwin would need this to be /usr/bin/bash.exe.  Having upgraded Cygwin
today I found that this EV confused both mintty and xterm and so I
changed it to SHELL=/usr/bin/bash.exe and they both started working
again.  But it was /this/ change that broke openssl when it was called
from Emacs, while it still worked from bash.  The truth is, all three -
mintty, xterm and Emacs (Gnus) /would/ read this EV if it was there, but
none needed it.  So, it was simply a matter of removing it and
everything works fine again.

I notice that other people who have upgraded Cygwin today are having
similar problems, so this is just to post something in case anyone else
is scratching their heads over similar problems.

Aside from that, apologies for the noise.

Regards

Paul Bibbings

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Debugging an imap connection in gnus
  2010-03-25  1:44 ` Paul Bibbings
@ 2010-03-25 14:15   ` Ted Zlatanov
  0 siblings, 0 replies; 3+ messages in thread
From: Ted Zlatanov @ 2010-03-25 14:15 UTC (permalink / raw)
  To: info-gnus-english

On Thu, 25 Mar 2010 01:44:51 +0000 Paul Bibbings <paul.bibbings@gmail.com> wrote: 

PB> I notice that other people who have upgraded Cygwin today are having
PB> similar problems, so this is just to post something in case anyone else
PB> is scratching their heads over similar problems.

I'm glad you figured it out.  Maybe for the next major Emacs version
we'll have native SSL/TLS support (there's a patch that no one on
emacs-devel has had time to review yet).  That would make life much
easier for Windows users in particular, I think we've seen 6-10 bugs
with the Windows starttls binary and other related issues.

Ted

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-25 14:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-24 23:48 Debugging an imap connection in gnus Paul Bibbings
2010-03-25  1:44 ` Paul Bibbings
2010-03-25 14:15   ` Ted Zlatanov

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).