Accessing an IMAP Server from the Command Line Using OpenSSL and OAuth2

I am trying to access the Outlook.com IMAP server through the command line using openSSL. In particular, I want to access it using OAuth2, but I cannot do this. So far, I can 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 hangs, the connection is lost, and the reset prompt. I copy and paste the base64 encoded string into the command line. I also follow the instructions for this process: http://blogs.office.com/2013/09/12/outlook-com-now-has-imap/

Can someone tell me what I can do wrong?

+4
1

, , . fetchmail?

, , , python perl.

0

Source: https://habr.com/ru/post/1531025/


All Articles