FROM debian:jessie MAINTAINER Robin Thoni RUN groupadd -r email --gid=7788 && useradd -r -g email --uid=7788 email RUN apt-get update &&\ apt-get install -y dovecot-imapd dovecot-pop3d dovecot-sieve dovecot-managesieved dovecot-pgsql dovecot-ldap dovecot-lmtpd exim4 &&\ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN rm -rf /etc/dovecot/* COPY ./config/ /etc/dovecot/ COPY ./exim4/ /etc/exim4/ RUN chown root:Debian-exim /etc/exim4/passwd.client &&\ update-exim4.conf RUN rm -rf /var/log/* &&\ mkdir -p /var/log/exim4/ &&\ ln -s /dev/stdout /var/log/exim4/mainlog &&\ ln -s /dev/stderr /var/log/exim4/paniclog COPY ./sieve/ /etc/dovecot/sieve/ COPY ./vars-vars /etc/vars-vars COPY ./vars-files /etc/vars-files COPY ./run.sh /run.sh VOLUME ["/var/email"] EXPOSE 110 143 993 995 4190 CMD ["/run.sh"] COPY ./certs/ /etc/ssl/private/