For years I have had problems getting IMAP access to exchange servers. Many organizations don’t enable IMAP on their Exchange servers, and others don’t do it right. I recently came across a solution that works with the Microsoft WebMail interface to provide an IMAP and/or POP3 access to the mail servers. This allows use of IMAP mail clients like Thunderbird or Microsoft Live Mail.
This article describes the solution as I have implemented it. It uses the open source DavMail Gateway written in Java. It accesses a WebMail server and provides access via standard protocols like IMAP, SMTP, and CalDav. This program can be configured for personal use on a desktop, or group use on a server. When configuring a server, it is recommended that you provide SSL keys so that secure protocols can be used.
Use your favorite browser to visit the DavMail site. The main page has a link. Select the appropriate download for your system. There are downloads for Windows, Max OS, Linux, and Others. You can also download standalone and Webapp servers versions. I found the installation went smoothly on Windows 7.
If you don’t already have Java 6 installed you will need to install it. Install the Davmail Gateway software using the native installer. You can then begin your setup. The sidebar on the DavMail site has specific documentation for various operating systems and clients.
Desktop Gateway Configuration
By default the DavMail Gateway is configured to listen on ports 1000 greater than the default. This is required so that the gateway can run under an unprivileged user id on Max OS and Linux. On Windows you can use the standard ports if you wish.
- Specify the address of the Exchange OWA (Mail Server).
- Disable services you don’t intend to use. Likely POP3, and possibly LDAP. Don’t disable both IMAP and POP3. Unless you have multiple users you likely want either IMAP or POP3 not both.
- Adjust ports if required. On Linux or Mac OS use ports over 1024. I moved the SMTP (Submisson) port to 1587 and added 1000 to the others.
- Review the settings on other configuration tabs.
- Leave the network bind address blank to bind to all addresses, or set it to 127.0.0.1 for more secure use from the system it is installed on.
- Save your configuration.
- Start the program if it isn’t already running. If the program is already running as a different user, you will need to stop that copy.
- On Windows 7, I used
msconfigon my Admin account to disable the
DavMailstartup during login. Then I added
All Programsfor my user id. This ensures it only run on my account, and is always run when I login.
If you change the configuration of a running server, you may need to shut it down and restart it. This is less likely if you shut down your clients before changing settings. On the previous version I had issues with binding ports if I didn’t stop the running server before saving my changes.
The latest release seems to have resolved the problem, although it did seem to loose my old configuration. Record your settings before updating.
Your DavMail Gateway will allow you to read your email using IMAP (recommended) or POP (not suggested). Use the protocol you configured. Configure a new server and use manual configuration to configure it:
- Specify the email address you will be using.
- Specify no security (encryption). If you are connecting to a server you enable encryption. This will require configuration of an SSL certificate on the Gateway.
- Specify password transmitted insecurely for both IMAP and SMTP settings.
localhostfor both IMAP and SMTP settings. If you are connection to a server specify its FQDN (Fully Qualified Domain Name). This is the long format;
- Specify the ports configured in the DavMail Gateway.
- Specify your WebMail id (
example/John.Doe) and password when you need to login.
The first time you connect, your client should detect your folders and download some of your email. How much of your email is downloaded is controlled by your client’s settings. Message threads are also handled by your client.
I manage my contacts and lists locally. Microsoft Live Email doesn’t appear to offer any suitable synchronization options. There is documentation on using LDAP to access you contacts, but I haven’t got it working in Thunderbird. The server also support CardDav, but there are no up to date add-ons for Thunderbird. Access for CardDav is the same as for CalDav which is specified below.
The DavMail Gateway provides access to your calendar using CalDav. It works well with the Lightning plugin to Thunderbird. To add a your calendar for Thunderbird:
On the Networkand click
- Select the
- Enter the specification for your calendar in the form
http://localhost:1080/users/John.Doe@example.com/calendar, using your host, port, and email address. Then click
- Enter a name for your calendar, select a color for the calendar, and click
- Your calendar has been created, click
- Calendar updates can take a few seconds.
- Calendar entries do not appear when disconnected from the server. This can be expected as the calendar is stored on the server. I will try the experimental caching option.
- The DavMail Gateway reports occasional login timeouts. This may be related to the dropouts I experience using the WebMail interface to read email.
- The DavMail Gateway behaves well when I am disconnected from the corporate network and can’t reach the Exchange server.
- As noted above, I haven’t tested access to contacts.