2015-07-12 22:54:35 +00:00
|
|
|
FROM ubuntu:14.10
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
RUN locale-gen en_GB en_GB.UTF-8 && dpkg-reconfigure locales
|
|
|
|
|
|
|
|
# Prerequisites
|
2015-07-25 01:24:55 +00:00
|
|
|
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
|
|
|
apt-get update && apt-get install -y \
|
2015-07-12 22:54:35 +00:00
|
|
|
amavisd-new \
|
|
|
|
spamassassin \
|
|
|
|
libnet-dns-perl \
|
|
|
|
libmail-spf-perl \
|
|
|
|
pyzor \
|
|
|
|
razor && \
|
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
|
|
|
|
# Set up razor and pyzor
|
|
|
|
RUN su - amavis -s /bin/bash && razor-admin -create && razor-admin -register && pyzor discover
|
|
|
|
|
2015-07-25 01:24:55 +00:00
|
|
|
COPY ./config/05-node_id /etc/amavis/conf.d/05-node_id
|
2015-07-14 22:37:13 +00:00
|
|
|
COPY ./config/15-content_filter_mode /etc/amavis/conf.d/15-content_filter_mode
|
|
|
|
COPY ./config/50-user /etc/amavis/conf.d/50-user
|
2015-07-12 22:54:35 +00:00
|
|
|
|
|
|
|
# Nice place for your settings
|
|
|
|
VOLUME ["/mail_settings"]
|
|
|
|
|
|
|
|
# Configure boot script
|
|
|
|
COPY boot /
|
|
|
|
RUN chmod 755 /boot
|
|
|
|
|
|
|
|
ENV AMAVIS=true
|
|
|
|
|
2015-07-14 22:37:13 +00:00
|
|
|
EXPOSE 10024
|
|
|
|
|
2015-07-14 23:01:41 +00:00
|
|
|
ENTRYPOINT ./boot; service rsyslog start; amavisd-new foreground
|