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.
Note: on OSX Lion the Library folder is hidden, a simple way to access it is to launch Console (Finder, Go to Utilities), right click on davmail.log and choose Reveal in Finder.
Office 365
Office 365 EWS endpoint is now standard for all customers:
https://outlook.office365.com/EWS/Exchange.asmxAlso make sure you set mode to EWS in settings
Is Office 365 modern authentication / MFA supported ?
Office 365 modern authentication is available with the following modes:
Additional notes:
davmail.oauth.clientId=yourappid davmail.oauth.redirectUri=https://login.microsoftonline.com/common/oauth2/nativeclient
davmail.oauth.tenantId=yourtenantid
The required scopes are:
"requiredResourceAccess": [ { "resourceAppId": "00000002-0000-0ff1-ce00-000000000000", "resourceAccess": [ { "id": "3b5f3d61-589b-4a3c-a359-5dd4b5ee5bd5", "type": "Scope" } ] }, { "resourceAppId": "00000002-0000-0000-c000-000000000000", "resourceAccess": [ { "id": "311a71cc-e848-46a1-bdf8-97ff7156d8e6", "type": "Scope" } ] } ]
In both cases (O365Interactive and O365Modern), once initial authentication succeeds DavMail keeps the refresh token and should automatically renew access token on expiration.
EWS endpoint not available
Unfortunately, this may mean your Exchange administrators blocked EWS access.
To check this, try to connect to https://mail.company.com/ews/exchange.asmx in your favorite web browser: you should get an authentication popup. On authentication success, you should get the EWS wsdl definition. If you don't, please contact the Exchange administrators to let them fix the broken Exchange server setup.
Another way to get EWS endpoint is to use Microsoft provided test page at:
https://testconnectivity.microsoft.comChoose Outlook discover section, on test success expand details until you find POST response with EwsUrl value (internal and external).
Once you have this url, set it as OWA address in DavMail and force EWS mode
Note: Microsoft Outlook 2011 on OSX and native OSX applications also rely on EWS to connect to Exchange. Mobile devices (Android phones, iPhones, Windows mobile) use ActiveSync on a different endpoint.
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 \
Note to Mac users: OSX applications do not like username with backslash, you have to set windows domain name in DavMail advanced settings and use the simple username in client application.
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.
Exchange RSA two factor authentication form
Exchange now supports two factor authentication for RSA tokens. This requires two potentially different user names in fields userid and username. Use a pipe in client to provide both values: userid|username. In some cases you will need to also provide domain name: userid|domain\username, do not set default windows domain name.
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
How to run multiple instances of DavMail ?
Just create multiple configuration files and provide them as a command line option, see previous question:
davmail server1.properties davmail server2.properties
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:
To Test:
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.mode=EWS
Is DavMail based on Outlook protocol ?
Outlook anywhere uses MAPI RPC over HTTPS to access company LAN through the firewall. DavMail does not use MAPI at all but relies on WebDav (Exchange 2003/2007) or EWS (Exchange 2007/2010) to access Exchange. This means you need direct access over HTTPS to either the OWA WebDav url (/exchange/mail@company.com) or EWS (/ews/exchange.asmx) to access Exchange with DavMail.
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. http://users.ox.ac.uk/~richardc/guides/LinuxNexus.html
DavMail hangs on 64-bit Linux
Disable use system proxies option in DavMail settings
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:
calendar.debug.log=true calendar.debug.log.verbose=true
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
Public calendars
To access public folders in Lightning, the URL scheme is:
http://localhost:1080/public/path/to/calendar
To access public folders in iCal, the URL scheme is:
http://localhost:1080/principals/public/path/to/calendar
Note: iCal does not support folder names with spaces or special characters
Shared calendars
To access a shared calendar in Lightning, the URL scheme is:
http://localhost:1080/users/user@company.com
To access a shared calendar in iCal, the URL scheme is:
http://localhost:1080/principals/users/user@company.com
Note that you need to have access to parent calendar if the target calendar is a child calendar.
Timeout errors during IMAP sync (broken pipe)
If you Exchange server is too slow or you don't have enough network bandwidth or too many messages in a single folder, you may get timeout errors during message fetch.
A workaround on DavMail side is to limit folder message count retrieval by setting davmail.folderSizeLimit. Use this for shared servers with mobile clients to get fast sync and limit bandwidth usage.
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 setting mailnews.tcptimeout) or avoid full mailbox sync: disable global search and indexer under advanced options and change Synchronization & Storage options under Account Settings.
Client disconnects from DavMail server after a few minutes
The server sets a timeout on the socket which listens for client connections, controlled by the property davmail.clientSoTimeout. If there is no activity before the timeout period elapses, the connection will be closed. Setting this to 0 will disable the socket timeout.
If you have enabled the IDLE extension in DavMail, check your client is checking for new mail more frequently than the timeout you have set.
Message deleted over IMAP still visible through OWA
Delete action is not immediate with IMAP: you need to EXPUNGE the folder to actually delete a message.
A workaround is to set davmail.imapAutoExpunge=true in DavMail to force immediate message expunge. Note that this makes DavMail non compliant to IMAP RFC.
A workaround with Thunderbird is to set the property mail.imap.expunge_after_delete=true
Note that you will also encounter this issue with clients missing IMAP MOVE extension support. As message move does not exist in basic IMAP, a move is a copy followed by a delete.
Duplicate messages in Sent folder
Messages sent through DavMail appear twice in Sent folder when the IMAP client is setup to store sent messages on the server as Exchange already saves sent messages in this folder. Change IMAP client settings or change Save in Sent option in DavMail settings to avoid this issue.
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.
Access another user mailbox
Either set base IMAP path in client settings to /users/otheruser@company.com or use the following username: domain\user\otheruser@company.com where otheruser@company.com it target mailbox name.