Chris Darnell edited this page Aug 10, 2014 · 9 revisions

Configure K-9 Mail to work with Exchange

K-9 uses WebDAV to communicate with Exchange. As of Exchange 2010, WebDAV is no longer supported. For this reason, K-9 is unable to work with Exchange 2010 at this time. It will be a major effort to correct this issue.

K-9 version 3.401 and later

These instructions apply to K-9 version 3.401 and later. Please see below for the original instructions that apply to versions prior to 3.400. Versions prior to 3.401 are known to have issues with Exchange.

The parts of K-9 that connect and authenticate with Exchange were rewritten in version 3.400. These changes were tested with Exchange 2007 using form-based authentication. The following is a basic description of these options. For a more in depth discussion of how K-9 communicates with Exchange, see the following blog post.

Configuring K-9 Mail

  1. When creating a new account, enter your email address and password in the corresponding fields and press Next.
  2. On the next screen, press the 'Exchange (WebDAV)' button.
  3. Enter your Exchange server configuration as follows:
    • Username: domain\username
    • Exchange server: mail.company.com
    • Security type: select your security type, hopefully 'SSL (always)'
    • Port: populated automatically
    • Mailbox alias: I have found that you should typically set this to your email address. Leaving it blank will use your username, which also works for some Exchange installations.

The following options are "advanced" options, and users should not need to change them from the defaults.

  • OWA path: leave this field blank - defaults to /Exchange
  • Authentication path: leave this field blank - defaults to /exchweb/bin/auth/owaauth.dll

NOTE: Setting your 'OWA path' to "owa" is incorrect! If you enter values into either 'OWA path' or 'Authentication path' and then open an issue, the first thing I will tell you is to leave them blank. Please, save me the trouble.

If you receive a 501 error in your logcat output after K-9 authenticates successfully, try setting your 'Mailbox alias' to your email address. Note that WebDAV is not enabled by default on Exchange server 2007, and must be enabled for K-9 to work. If you receive a 403 error in your logcat output, chances are WebDAV has not been enabled.

Versions prior to 3.400

K-9 Mail is only known to work with Microsoft Exchange 2003 with "basic authentication". If you have configuration advice that you can provide for other environments, we'd appreciate the contribution.

Regular login

Let's say this is how you login to the Exchange webmail interface / Outlook Web Access:

  • URL is https://mail.dracofox.com
  • username is dragon@dracofox.com

You can tell if it is basic authentication if a dialog box appears for the username and password. If the login is just on a web page, without a dialog box, then your site uses form-based authentication. (It is currently unknown if the guidelines given here work with form-based authentication.)

Once you login, you will see the browser show a URL like: https://mail.dracofox.com/exchange//

K-9 Mail configuration

OK, here's how to configure K-9 Mail:

  • Username: dragon@dracofox.com
  • Password: whatever your password is
  • WebDAV (Exchange) server: mail.dracofox.com
  • Security type: SSL (if available)
  • Port: 443
  • WebDAV (Exchange) path: exchange/dragon

The word "exchange" in the "WebDAV (Exchange) path" is copied from the last part of the URL shown in the browser when you login to Outlook Web Access the normal way.


These alternate instructions were submitted in issue 1631 by Der.Harry.Karl.

  1. Enter your usual username and pass
  2. Enter your Exchange server domain name, eg. exchange.domain.com
  3. Activate SSL if necessary
  4. Leave WebDAV Path empty
  5. Enter the right auth path as well as the auth handler (in my case it was: owa/auth/logon.aspx where owa/auth/ is the path and logon.aspx is the handler.
  6. Leave Mailbox path empty.
  7. Maybe you have other setups where 4.) and 6.) have to be different, but it is most important that 5.) is correct.

Testing this with some other Exchange setups I could find out that especially failing to enter the right auth path leads to errors. Another vaild entry I found was: owa/auth/owaauth.dll

Hosted Exchange

These alternate instructions were submitted in issue 1990 by Docsmooth2486.

If you have hosted Exchange, and after setting up no custom settings for WebDAV or "Mailbox" path, you receive a "HTTP 501 Not Implemented" error, your WebDAV path is likely wrong. To check this:

  1. take your email address user@domain.com and remove the "@": userdomain.com
  2. In a normal browser, log into your OWA server.
  3. Now edit your Address bar by adding /userdomain.com/Inbox (entering your modified email address after the /exchange part) to the end, so the full path reads something like: http://mail.mse1.exchange.ms/exchange/userdomain.com/Inbox
  4. If your inbox loads up properly, go back to K9Mail and change your WebDAV (Exchange) Path to: /exchange/userdomain.com (using your modified email address)