diff --git a/davmail/README.md b/davmail/README.md new file mode 100644 index 0000000..db9ed5e --- /dev/null +++ b/davmail/README.md @@ -0,0 +1,16 @@ +# DavMail + +POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange and Office 365 Gateway + +## Important steps when deploying +DavMail needs a certificate in PKCS12 format to be able to handle TLS connections. +To convert certificate and key created by certbot, use these commands (source: https://felix.nlogn.org/projects/davmail/) + +```bash +sudo openssl rsa -aes256 -in hostname.key -out key.encrypted -passout pass:password + +sudo openssl pkcs12 -export -in hostname.crt -inkey key.encrypted -certfile hostname.crt -out davmail.p12 -passin pass:password --passout pass:password +``` + +Adapt paths when necessary. +The password also needs to be set in the environment variables `DAVMAIL_SSL_KEYSTOREPASS` and `DAVMAIL_SSL_KEYPASS`. diff --git a/davmail/davmail.p12 b/davmail/davmail.p12 new file mode 100644 index 0000000..a93214d Binary files /dev/null and b/davmail/davmail.p12 differ diff --git a/davmail/docker-compose.yaml b/davmail/docker-compose.yaml new file mode 100644 index 0000000..ec22ab9 --- /dev/null +++ b/davmail/docker-compose.yaml @@ -0,0 +1,32 @@ +version: '3' + +services: + davmail: + image: kran0/davmail-docker:${DAVMAIL_VERSION:-latest} + restart: always + ports: + - 1080:1080 + - 1143:1143 + - 1389:1389 + - 1025:1025 + volumes: + - certs:/certs + environment: + - DAVMAIL_MODE=${DAVMAIL_MODE} + - DAVMAIL_URL=${DAVMAIL_URL} + - DAVMAIL_SERVER=true + - DAVMAIL_CALDAVPORT=1080 + - DAVMAIL_IMAPPORT=1143 + - DAVMAIL_LDAPPORT=1389 + - DAVMAIL_SMTPPORT=1025 + - DAVMAIL_ALLOWREMOTE=true + - DAVMAIL_DISABLEUPDATECHECK=true + - DAVMAIL_LOGFILEPATH=/dev/stdout + - DAVMAIL_SSL_KEYSTORETYPE=PKCS12 + - DAVMAIL_SSL_KEYSTOREFILE=${KEYSTOREFILE} + - DAVMAIL_SSL_KEYSTOREPASS=${KEYPASS} + - DAVMAIL_SSL_KEYPASS=${KEYPASS} + + +volumes: + certs: