Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* gnus + imap gssapi authentication
@ 2012-06-03 16:32 Enrico Scholz
  2012-06-05 21:04 ` Enrico Scholz
  0 siblings, 1 reply; 3+ messages in thread
From: Enrico Scholz @ 2012-06-03 16:32 UTC (permalink / raw)
  To: info-gnus-english

Hello,

after switching to the gnus version bundled with emacs-24.0.97[1], my imap
setup does not work anymore.  I am using

| (setq gnus-secondary-select-methods
|       (list
|        (list 'nnimap ""
| 	     (list 'nnimap-directory (nnheader-concat (or (getenv "ENSC_SESSIONDIR")
| 							  gnus-directory)
| 						      "overview"))
| 
| 	     '(nnimap-authenticator gssapi)
| 	     '(nnimap-nov-is-evil nil)
| 	     '(nnimap-address "mailbox.bigo.ensc.de"))))

With old gnus (e.g. with this from emacs-23.1), my krb5 credentials were
used. Now, I am asked for username + password.

How is recent gnus to be configured for gssapi based imap?



Thanks
Enrico

Footnotes: 
[1]  'gnus-version' reports v5.13, but that's the same number as with
     emacs-23.1

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

* Re: gnus + imap gssapi authentication
  2012-06-03 16:32 gnus + imap gssapi authentication Enrico Scholz
@ 2012-06-05 21:04 ` Enrico Scholz
  0 siblings, 0 replies; 3+ messages in thread
From: Enrico Scholz @ 2012-06-05 21:04 UTC (permalink / raw)
  To: info-gnus-english

Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> writes:

> after switching to the gnus version bundled with emacs-24.0.97[1], my imap
> setup does not work anymore.  I am using
>
> | 	     '(nnimap-authenticator gssapi)

fwiw, with a slightly patched 'gsasl' program (I will post a patch soon
after thinking a little bit about the PREAUTH greeting), this is possible
with

   '(nnimap-stream shell)
   '(nnimap-shell-program "echo -e '* PREAUTH\r\n'; gsasl %s %p --quiet --mechanism GSSAPI --authentication-id=ensc --no-auth-output")


Enrico

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

* Re: gnus + imap gssapi authentication
       [not found] <mailman.2200.1338741437.855.info-gnus-english@gnu.org>
@ 2012-06-10 18:56 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-06-10 18:56 UTC (permalink / raw)
  To: Enrico Scholz; +Cc: info-gnus-english

Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> writes:

> With old gnus (e.g. with this from emacs-23.1), my krb5 credentials were
> used. Now, I am asked for username + password.

Sorry; gssapi (and some other authenticators) fell by the wayside during
the reimplementation of nnimap.el, since I didn't have any servers to
test with, or anybody who could test stuff for me.

Could you try applying the following patch and see whether that works?

diff --git a/lisp/nnimap.el b/lisp/nnimap.el
index 83100a5..70151a8 100644
--- a/lisp/nnimap.el
+++ b/lisp/nnimap.el
@@ -100,7 +100,8 @@ Uses the same syntax as `nnmail-split-methods'.")
 
 (defvoo nnimap-authenticator nil
   "How nnimap authenticate itself to the server.
-Possible choices are nil (use default methods) or `anonymous'.")
+Possible choices are nil (use default methods), `gssapi' or
+`anonymous'.")
 
 (defvoo nnimap-expunge t
   "If non-nil, expunge articles after deleting them.
@@ -391,19 +392,22 @@ textual parts.")
       (when nnimap-server-port
 	(push nnimap-server-port ports))
       (let* ((stream-list
-	      (open-protocol-stream
-	       "*nnimap*" (current-buffer) nnimap-address
-	       (nnimap-map-port (car ports))
-	       :type nnimap-stream
-	       :return-list t
-	       :shell-command nnimap-shell-program
-	       :capability-command "1 CAPABILITY\r\n"
-	       :end-of-command "\r\n"
-	       :success " OK "
-	       :starttls-function
-	       (lambda (capabilities)
-		 (when (gnus-string-match-p "STARTTLS" capabilities)
-		   "1 STARTTLS\r\n"))))
+	      (if (eq nnimap-authenticator 'gssapi)
+		  (open-protocol-stream
+		   "*nnimap*" (current-buffer) nnimap-address nnimap-user)
+		(open-protocol-stream
+		 "*nnimap*" (current-buffer) nnimap-address
+		 (nnimap-map-port (car ports))
+		 :type nnimap-stream
+		 :return-list t
+		 :shell-command nnimap-shell-program
+		 :capability-command "1 CAPABILITY\r\n"
+		 :end-of-command "\r\n"
+		 :success " OK "
+		 :starttls-function
+		 (lambda (capabilities)
+		   (when (gnus-string-match-p "STARTTLS" capabilities)
+		     "1 STARTTLS\r\n")))))
 	     (stream (car stream-list))
 	     (props (cdr stream-list))
 	     (greeting (plist-get props :greeting))


-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/

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

end of thread, other threads:[~2012-06-10 18:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-03 16:32 gnus + imap gssapi authentication Enrico Scholz
2012-06-05 21:04 ` Enrico Scholz
     [not found] <mailman.2200.1338741437.855.info-gnus-english@gnu.org>
2012-06-10 18:56 ` Lars Magne Ingebrigtsen

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