DavMail POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange Gateway - Frequently asked questions Mickael Guessant

Frequently asked questions on DavMail forums, mailing list or direct email.

How do I create a WIRE debug log ?

In DavMail trackers and forums, I often ask for a WIRE debug log. To create this log file, you will need to change DavMail settings under the Logging tab. Set the WIRE logging category to DEBUG level.

You can then reproduce your issue and send the log file to mguessan@free.fr

The davmail.log file is available in DavMail working directory on Unix and Windows, ~/Library/Logs/DavMail/davmail.log on OSX. This default path can be customized with the Log File Path setting.

Authentication fails with invalid user or password message

Authentication fails with the following message: Authentication failed: invalid user or password, retry with domain\user

Exchange before 2007 expects domain qualified user name, you may not have to provide the domain name on the logon form if javascript is used to add it, but DavMail can not execute javascript. Thus you need to prefix your user name with the Active Directory domain followed by \

Authentication fails with error in parsing the status line

Authentication fails with the following message: error in parsing the status line from the response: unable to find line starting with "HTTP"

Your Exchange server expects HTTPS (secured) connections, use https instead of http in OWA url.

Where can I find DavMail settings file

The default location for DavMail settings is a file named .davmail.properties in user home folder. This file is hidden under Linux and OSX. On windows, the user home folder is under Document and Settings

What are the prerequisites on Exchange server side ?

With Exchange 2003, you only need to have access to OWA (Outlook Web Access), Webdav, Address Book and public folders are always available. Unfortunately, this is not the case with Exchange 2007. You must make sure Webdav support is enabled on your server. You can test this by accessing https://mail.company.com/exchange, which should redirect to /owa. Another important service is the galfind (address book) access at /public/?Cmd=galfind

Additional information for Exchange administrators to enable WebDav:

After running through the pre-requisite checker for each server (Front End CAS server and Back End Mailbox server) and adding the appropriate roles and features, add the following via the ServerManager:

  • Select the IIS role, then add Role Services
  • Add WebDav Publishing (both Cas server and Mailbox Server)
  • On the Mailbox server, add the ISAPI extensions Role Service to the IIS role
  • On the Default Web Site (each server), enable WebDav
  • Should not have to enable any additional WebDav rules
  • Install the server roles
  • Create a test mailbox (see Exchange Docs)

To Test:

  • Ensure that Outlook Web Access works by using the https://exchangeServer/owa URL
  • Try using the pass through legacy URL: https://exchangeServer/exchange, if you receive an error 500 “Internal Server Error”, then WebDav is not working.

Is Exchange 2010 supported ?

As Microsoft decided to drop WebDav support in Exchange 2010, I had to implement a new backend from scratch to support the new Exchange Web Services interface. This support is still experimental, but is working quite well. However, you still need to enable it manually in .davmail.properties with the following line:
davmail.enableEws=true

How do I make DavMail start automatically ?

Add DavMail.app to "Login Items", see Opening items automatically when you log in

Why do I get black on black notifications on Ubuntu ?

This is an SWT bug, upgrade to SWT 3.6, see On Ubuntu, notify text conflicts with default theme.

How do I secure DavMail connections ?

Communication between DavMail and your Exchange server is secured by default as long as you access OWA over HTTPS.

Communication between the messaging client and DavMail is not secured by default. This is not an issue in standalone mode as all communication is local, but you may want to improve this in server (shared) mode.

This is quite simple: you just need to get a server certificate in PKCS12 or JKS format and add it in the key store section in DavMail settings, see SSL Setup.

Are my credentials safe ?

DavMail does not store Exchange username or password, they are provided by the messaging client over IMAP, HTTP, POP, SMTP or LDAP

How do I detect errors in Thunderbird/Lightning calendar ?

Unfortunately, Lightning does not provide much feedback of what is going on. To detect errors at this level, you may activate calendar log settings under Tools/Options/Advanced:

Invalid notifications

Lightning 0.9 mail notifications are broken, activate Caldav notifications to outbox instead:

Check the following parameter in Thunderbird, it should be set to true

calendar.caldav.sched.enabled=true

Timout errors during IMAP sync (broken pipe)

If you Exchange server is too slow, you may get timeout errors during message fetch.

To fix the problem in OSX Mail, go to your account setup under preferences. On the IMAP account having difficulty, go to the advanced tab. Where it says "keep copies for offline viewing", change it to "only messages I've read" or don't keep copies at all.

Under Thunderbird, you can try to change IMAP timeout values (mail.server.serverindex.timeout and mailnews.tcptimeout) or avoid full mailbox sync: disable global search and indexer under advanced options and change Synchronization & Storage options under Account Settings.

Message deleted over IMAP still visible through OWA

Message move does not exist in IMAP, thus the move is a copy followed by a delete. And a delete is not immediate with IMAP: you need to EXPUNGE the folder to actually delete a message.

A workaround with Thunderbird is to set the property mail.imap.expunge_after_delete=true

New: a new setting is available in DavMail to delete messages immediately over IMAP: davmail.imapAutoExpunge=true

Sent messages encoding issue with Thunderbird

If special characters appear replaced with ? in sent messages, set mail.strictly_mime advanced option. Go to Tools/Options/Advanced/General/Config Editor and look for a preference with namemail.strictly_mime, set value to true to send messages as quoted-printable.

How to build DavMail ?

See Building DavMail from source