FROM debian:jessie MAINTAINER Robin Thoni RUN apt-get update &&\ apt-get install -y opendkim opendkim-tools openssl libopendbx1-pgsql rsyslog &&\ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* RUN rm /etc/opendkim.conf &&\ ln -s /etc/opendkim/opendkim.conf /etc/opendkim.conf RUN rm -rf /var/log/* &&\ mkfifo /var/log/syslog &&\ ln -s /dev/null /var/log/mail.log &&\ ln -s /dev/null /var/log/mail.err &&\ ln -s /dev/null /var/log/main.info &&\ ln -s /dev/null /var/log/messages RUN sed -e 's/\(\$ModLoad imklog.*\)/#\1/' -i /etc/rsyslog.conf COPY ./config /etc/opendkim/ RUN chown -R opendkim:opendkim /etc/opendkim COPY ./vars-vars /etc/vars-vars COPY ./vars-files /etc/vars-files COPY ./run.sh /run.sh VOLUME ["/etc/opendkim/keys"] CMD ["/run.sh"]