Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Connecting to imap on a Microsoft Exchange server with gsasl
@ 2012-09-08 17:00 Adam Sjøgren
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Sjøgren @ 2012-09-08 17:00 UTC (permalink / raw)
  To: info-gnus-english; +Cc: help-gsasl

I am using Gnus to pull down my emails via imap from a Microsoft
Exchange server to my Ubuntu desktop (i.e. just using imap as a
mail-source, like pop). This works fine typing my password into Gnus.

However, we use Kerberos to authenticate on our Linux machines (login,
sudo, www, the works) - against the company Active Directory - so I have
a Kerberos ticket, and should be able to fetch email without having to
type my password again, I think.

I tried configuring Gnus to do this, but using :stream gssapi and
:authenticate gssapi didn't work.

Digging a little revealed that Gnus tries to use gsasl to connect and
authenticate, so I tried running gsasl by hand to see if that would make
me any wiser. The result is:

    $ gsasl --client --imap --authentication-id=my.initials --starttls --verbose server.name.elided
    Trying `server.name.elided...
    * OK Microsoft Exchange Server 2007 IMAP4 service ready
    . STARTTLS
    . OK Begin TLS negotiation now.
    . CAPABILITY
    * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN IDLE NAMESPACE LITERAL+
    . OK CAPABILITY completed.
    . AUTHENTICATE GSSAPI
    +
    error: Server did not return expected SASL data (it must begin with '+ '):
    +

    $ 

Hm. Does the server really return "+" while "+ " was expected? Let me
check, using gnutls-cli, just to be sure:

    $ gnutls-cli --insecure --starttls --crlf -p imap server.name.elided
    Resolving 'server.name.elided'...
    Connecting to 'ip.address.elided:143'...

    - Simple Client Mode:

    * OK Microsoft Exchange Server 2007 IMAP4 service ready
    1 STARTTLS
    1 OK Begin TLS negotiation now.
    ^D
    *** Starting TLS handshake
    - Certificate type: X.509 [...cert info elided...]
    - Compression: NULL
    2 AUTHENTICATE GSSAPI
    +
    ^C
    $ 

Indeed it does, no space!

Does a work around for this exist, I am being foolhardy in attempting to
get this working at all, am I overlooking something obvious, or?

Any good ideas, war stories about AD and Exchange, or anything else is
much appreciated :-)

This is on Ubuntu 10.04, gsasl 1.4.4, GNU Emacs snapshot from Julien
Danjous repository, Ma Gnus from git.

(I just tried on an Ubuntu 12.04 which has gsasl 1.6.1; on that machine
the gsasl command ends with "error: server did not return a token" after
the plus is received.)

I tried using gssapi in Thunderbird as well, just to test - it fails
with a vague message about the server not accepting the ticket, but the
message looks rather generic, so I don't know that this necessarily is
valuable information.


  Best regards,

    Adam


P.S. I have taken the liberty of crossposting this to both the gsasl
     mailing list and the Gnus user list - feel free to peel any one off.

-- 
 "Hur långt man än har kommit                                 Adam Sjøgren
  är det alltid längre kvar"                             asjo@koldfront.dk

^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <mailman.8398.1347123662.855.info-gnus-english@gnu.org>]

end of thread, other threads:[~2012-12-25 12:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-08 17:00 Connecting to imap on a Microsoft Exchange server with gsasl Adam Sjøgren
     [not found] <mailman.8398.1347123662.855.info-gnus-english@gnu.org>
2012-12-24 17:30 ` Lars Ingebrigtsen
2012-12-24 23:45   ` Adam Sjøgren
     [not found]   ` <mailman.16078.1356392757.855.info-gnus-english@gnu.org>
2012-12-25 12:47     ` Lars 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).