~mapperr/dockerfiles

27d03522dd49a5025d6583c4b613bae711c845ab — mapperr 3 years ago 7d0e91b
Add davmail
2 files changed, 32 insertions(+), 0 deletions(-)

A davmail/Dockerfile
A davmail/entrypoint.sh
A davmail/Dockerfile => davmail/Dockerfile +8 -0
@@ 0,0 1,8 @@
FROM openjdk:14
RUN yum update && \
    yum install -y unzip && \
    curl -L -o /davmail-5.5.1-3299.zip https://sourceforge.net/projects/davmail/files/davmail/5.5.1/davmail-5.5.1-3299.zip && \
    unzip -d /davmail /davmail-5.5.1-3299.zip && \
    rm -f /davmail-5.5.1-3299.zip
COPY ./entrypoint.sh /entrypoint.sh
ENTRYPOINT /entrypoint.sh

A davmail/entrypoint.sh => davmail/entrypoint.sh +24 -0
@@ 0,0 1,24 @@
#! /bin/sh

PASS=`head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16 ; echo ''`

keytool -genkey -keyalg rsa \
    -keysize 4096 \
    -storepass $PASS \
    -keystore /davmail.p12 \
    -storetype pkcs12 \
    -validity 36000 \
    -dname cn=davmail

test -r /davmail.properties && cp /davmail.properties dm.properties

cat <<EOF >> /dm.properties

davmail.ssl.keystoreType=PKCS12
davmail.ssl.keyPass=$PASS
davmail.ssl.keystoreFile=/davmail.p12
davmail.ssl.keystorePass=$PASS
EOF

/davmail/davmail /dm.properties