From 210cdc36b5af69f29c51e16870ae64747a907b93 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Wed, 16 Aug 2023 00:39:16 +0200 Subject: [PATCH] Add davmail --- davmail/README.md | 16 ++++++++++++++++ davmail/davmail.p12 | Bin 0 -> 11429 bytes davmail/docker-compose.yaml | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 davmail/README.md create mode 100644 davmail/davmail.p12 create mode 100644 davmail/docker-compose.yaml 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 0000000000000000000000000000000000000000..a93214d02ad6bdb29ef515e0916c953d3498cb43 GIT binary patch literal 11429 zcmY+qQ*b71(6t-ewryK8v2EM7lP8(jwryjQC$?>SVjKVa)xT?hdmr4@RclrE(S5M0 z`(gnw6oP?*vj7+@pH ziv9mOpezJXaR1K)1W+gzBnTKJ&1Vq?E(kp^Fc^>^0GS9t7Tz?jsan3DHza2~|B|zr zuIKchna;eQ**VGUn^Vo1>!d;#d50eyUlgS2m9!2IJ8`c8JB7?=)pv@}`9RcSOvpzX z_qz*5AmD~YdfLXHm{v`f!q$2s0FIxH57Lqz&e29cV|Y9@g+Zkl2rsC?NmH09`YrnUY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zXb;@J6oE<%ET z5(U{;uIA1C>ImYujOD#Y9|T0}%g+EGGuepe`w6ZvKJf@n)Ff35NVh#GWf`)^xw!u= zeq=|i(2+&YPzE0<@1=Y?Y$c#;Z2wXK`Q7=;f{+m&v9BSa0=<%})jabk7VPOzQqWZ* z^EpD3vP^N(CiNH5O#l5DlYuo8!q9U`a;rzV4VQ&(Jl$Y%rZ$h4kYbL${`_+UaR>W`X718W>3uJX7SL&qsMlD$Q*QnC$E<#4U=Bd6bUxIi3d z_TnKlloZuv4D!p*R2zI@J6Qi+ofAI*i3Xq zBY4%N;CtIPs>fu31oqvjlPO;Lww9(7s)cS0VOi^zqTqeC;d2XAA+-HQ)e(}RfR?&< z421T7Hyi=1C*BK?rbrHH2|}qFoV@tJ+!}j4V1PCZBQyQqv81ZnaJyNkF53!K9jg6z zESo8{1($)_v+=W>vIsrq;1E@As7=N|LX8ZBzk_7fU!puo!)xY-#^dDVbY~#CIZhF6 zTn=Hu<5yN0+Lz=sOM13G^>7)G+wmg(=KGSdDFY^YFP8mt zhPsMue$EiS3f?N$i^erKkNYM0buTX7dy!#0n$LGYMUY0>^;Jnr5;ZX&1(A$C5tJ1# z>yja6Lk5>Udi>4|6}f?7n@2=*y@FNyIkeeXObGq8h`lW*-T7dDtapIvFTlMfjprOdSXs;6SjD>GRP7e zZS($NUsJy69`_JD-!NV0mbP!X65?OdZ^#B}ywRDIA!x?gGbV_$fFn@HOMKxE1t)@} zCyYM06%>n)ybAnnyAW@!n4|V_%VLs0c62m(SEAX>9yf+e z+vG|m(&;}`Tn|_&S;+t2bOwvbiUomziSSoo%obvjf}BxxQ@vq1#!Tpkg_VVr1r`dD v9tj)_4-y0dV@*K4oKf@C=kx}trc$@~4EhzV0|Mqai)--ABtZUuQriCknRy}T literal 0 HcmV?d00001 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: