postfix/Dockerfile

41 lines
848 B
Docker

FROM alpine:3.9 as builder
RUN apk add --no-cache \
g++ \
make \
libmilter-dev \
spamassassin-client
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
FROM thallian/confd-env:latest
COPY --from=builder /tmp/spamass-milter/spamass-milter /bin/spamass-milter
RUN apk add --no-cache \
postfix \
postfix-ldap \
openssl \
spamassassin-client \
libstdc++ \
libmilter
RUN addgroup -g 2222 access
RUN addgroup postfix access
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 /