title: Trying to use cURL to access local Exchange server
body: <p>I'm working on a project that involves a Microsoft Exchange 2013 mail server on my Windows Server 2012 machine. For the project, I need to send, read, and delete emails using cURL, preferably from the command line. </p>
  
  <p>The problem is, I'm having trouble connecting to the Exchange server with the IMAP protocol. When I run the command:</p>
  
  <pre><code>curl --url "imap://&lt;exchange-server-domain&gt;" -u "&lt;user&gt;:&lt;password&gt; -v"
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>&lt; * OK The Microsoft Exchange IMAP4 service is ready.
  &gt; A001 CAPABILITY
  &lt; * CAPABILITY IMAP4 IMAP4rev1 LOGINDISABLED STARTTLS UIDPLUS MOVE ID     CHILDREN I
  DLE NAMESPACE LITERAL+
  &lt; A001 OK CAPABILITY completed.
  * No known authentication mechanisms supported!
  * Closing connection 0
  curl: (67) Login denied
  </code></pre>
  
  <p>I tried throwing <code>--insecure</code> on. Nothing. I tried getting a CA certificate from the server. I got one; my host machine now has a certificate to <em>and</em> from itself, but it didn't change anything. I tried googling "No known authentication mechanisms supported" and only got a couple of answers. They were all for libcurl users and I don't know how to translate them into command line commands. I <em>have</em> sent emails to the same Exchange mailbox with SMTP through curl, so I know it can connect, but IMAP won't budge. What am I missing?</p>