MailCore / mailcore2

MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. The API has been redesigned from ground up.
Other
2.6k stars 625 forks source link

Support for kerberos authentication on linux #1720

Open arthurzenika opened 6 years ago

arthurzenika commented 6 years ago

This is a follow up ticket of https://github.com/Foundry376/Mailspring/issues/103

Apparently for mailspring to have working kerberos auth, the functionnality need to be working in mailcore

dinhvh commented 6 years ago

@bengotow could you file a more specific issue on mailcore?

arthurzenika commented 5 years ago

Sorry for not being more precise.

IMAP can be authenticated using kerberos . An example configuration can be found https://twiki.cern.ch/twiki/bin/view/AFSService/ConfigureYourEmailClientForKerberosAuthentication

While using Mailspring which in turns uses this project, I get a login failure eventhough the IMAP clearly offers a AUTH=GSSAPI and my kerberos tokens are valid.

----------IMAP----------
* OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE STARTTLS AUTH=GSSAPI AUTH=PLAIN SASL-IR] imap.example.org Cyrus IMAP git2.4.17+0-Debian-2.4.17+nocaldav-0~deb8u1 server ready
1 STARTTLS
1 OK Begin TLS negotiation now
2 LOGIN arthur *********
2 NO Login failed: authentication failure

Maybe some inspiration can be take from https://github.com/PADL/GSSKit and https://github.com/PADL/CredUI (sorry if this is not relevant, I haven't done any Objectif-C)

Is there any way to test out this auth directly with mailcore2 ? I'm taking a look at https://github.com/MailCore/mailcore2/wiki/IMAP-Examples and trying to figure out how to test it out outside of Mailspring.

Thanks in advance.

bengotow commented 5 years ago

Hey! @dinhviethoa thanks for taking a look, I'll investigate this a bit further on the Mailspring side and see if we need to file a ticket against mailcore.

dinhvh commented 5 years ago

There's also https://github.com/MailCore/mailcore2/tree/master/example/ios/iOS%20UI%20Test that you can use as a start to build a minimal test.

arthurzenika commented 5 years ago

@dinhviethoa @bengotow thanks for reopening and taking a look at this.

I'm looking at the "iOS UI Tests" but I don't know how to launch them, can you point me in the right direction ?