(c) 2018-2020 Óscar García Amor
Redistribution, modifications and pull requests are welcomed under the terms of GPLv3 license.
DavMail is a POP/IMAP/SMTP/Caldav/Carddav/LDAP exchange gateway allowing users to use any mail/calendar client with an Exchange server, even from the internet or behind a firewall through Outlook Web Access.
This docker packages DavMail under Alpine Linux, a lightweight Linux distribution.
Visit Docker Hub or Quay to see all available tags.
To run this container, simply exec.
docker run -d \
--name=davmail \
-p 1025:1025 \
-p 1389:1389 \
-p 1110:1110 \
-p 1143:1143 \
-p 1080:1080 \
connectical/davmail
Default config points to Office 365 EWS.
If you want reconfigure DavMail with your own davmail.properties
you can
mount it as a volume.
docker run -d \
--name=davmail \
-v /my/own/davmail.properties:/etc/davmail/davmail.properties \
connectical/davmail
In the same way you can configure a volume to persistent store the logs.
docker run -d \
--name=davmail \
-v /my/own/davmail/logdir:/var/log/davmail
connectical/davmail
Take note that DavMail is running by davmail
user (UID 100) inside
Docker. You must set proper permissions in your external volume to allow to
this user to write on it.
If you can run a shell instead DavMail, simply do.
docker run -t -i --rm \
--name=davmail \
--user=root \
--entrypoint=/bin/sh \
connectical/davmail
Please note that the --rm
modifier destroy the docker after shell exit.
The headless version of davmail does not yet support a shell based authentication process to log in with a second factor.
A workaround is to install the GUI enabled davmail on a desktop and authenticate with
the O365Interactive
method. After successful authentication, it is possible to extract the
davmail.oauth.<user@email.tld>.refreshToken={AES}...
from the .davmail.properties
file.
Copy this key to your server configuration and set the connection mode to
davmail.enableEws=EWS
davmail.authenticator=davmail.exchange.auth.O365Authenticator
davmail.oauth.<user@email.tld>.refreshToken={AES}...
When a client connects to the davmail bridge, the password is used to decrypt the authentication token.