9

I'm trying to access an Outlook.com IMAP server via the commandline using openSSL. Specifically, I want to access it using OAuth2, but am unable to do so. So far, I am able to access the server without oAuth by doing:

openssl s_client -crlf -connect imap-mail.outlook.com:993
tag login username password

However, when I do the following:

openssl s_client -crlf -connect imap-mail.outlook.com:993
tag AUTHENTICATE XOAUTH2
+
{base64 encoded string with username & access token}

the command line freezes, the connection is lost and the prompt is reset. I'm copying and pasting the base64 encoded string into the commandline. I'm also following the instructions for this process:http://blogs.office.com/2013/09/12/outlook-com-now-has-imap/

Can anyone tell me what I might be doing incorrectly?

jac300
  • 5,182
  • 14
  • 54
  • 89
  • 3
    Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. Also see [Where do I post questions about Dev Ops?](http://meta.stackexchange.com/q/134306). – jww May 19 '15 at 17:34
  • You might want to check your line endings. [RFC 9051](https://www.ietf.org/rfc/rfc9051.html) says it uses CRLF as a newline, but perhaps you are only sending LF? I have no idea how accurately any particular IMAP4 server implements the RFC, or if they are consistent about it. – ghoti Aug 21 '22 at 09:33

0 Answers0