From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/2234 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.user Subject: Re: failure using starttls with Oort gnus/imap Date: Sat, 22 Mar 2003 18:25:51 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138668741 14416 80.91.229.2 (31 Jan 2006 00:52:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:52:21 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:30:23 2006 Original-Path: quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: fnatte.nada.kth.se Original-X-Trace: quimby.gnus.org 1048354084 27837 130.237.226.103 (22 Mar 2003 17:28:04 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 22 Mar 2003 17:28:04 GMT User-Agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:BuGYQmsZU+UtzrfkBt4HhoiG5lI= Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:2374 Original-Lines: 32 X-Gnus-Article-Number: 2374 Tue Jan 17 17:30:23 2006 Xref: news.gmane.org gmane.emacs.gnus.user:2234 Archived-At: Lars Magne Ingebrigtsen writes: > William F Hammond writes: > >> After moving to GNU Emacs 21.3. and using the overnight tarball >> dated 20030320, I get a somewhat different debug message, which matches >> byte-for-byte the debug message from ognus-0.16: > > The problem seems to be more fundamental. `imap-open' may kill the > buffer it's been fed, for some reason or other, which makes > `mail-source-fetch-imap' very unhappy, since it created the buffer. > > Perhaps Simon knows what the right fix for this should be? (I think > it's probably a mistake for `imap-open' to kill the buffer...) imap.el connects to the server initially, and then looks at what authentication/stream mechanisms are available ("starttls", "imtest", etc), and then tries each one of them in order until someone succeeds. These subsequent connections are made in a temporary buffer. If one of them succeeds, the first buffer is closed and the new one renamed to the old one. This works fine in Gnus which usually uses name of buffers, but I guess mail-sources use the elisp buffer type instead. The reason the initial buffer isn't teared down and the other streams are invoked in the same buffer, is that imap.el can (and frequently does) decide to use that connection if no stronger stream/authentication succeeded. So if it is teared down, it would have to reopen it. I'll see if I can think of a way to fix it...