postfix/Dockerfile

26 lines
718 B
Docker

FROM registry.gitlab.com/thallian/docker-confd-env:master
RUN apk add --no-cache postfix postfix-ldap libressl spamassassin-client libstdc++ g++ make tar libmilter-dev
RUN addgroup -g 2222 access
RUN addgroup postfix access
RUN mkdir /tmp/spamass-milter
RUN wget -qO- https://download.savannah.gnu.org/releases/spamass-milt/spamass-milter-0.4.0.tar.gz | tar -xz -C /tmp/spamass-milter --strip 1
WORKDIR /tmp/spamass-milter
RUN ./configure && make && make install
RUN rm -rf /tmp/spamass-milter
WORKDIR /
RUN mkdir /var/run/spamass-milter
RUN chown postfix:postfix /var/run/spamass-milter
RUN chown root /var/spool/postfix/
RUN chown root /var/spool/postfix/pid
EXPOSE 25 587
VOLUME /etc/ssl/mail
ADD /rootfs /