Ensemble des services de KAZ
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
2.4 KiB

FROM docker.io/mailserver/docker-mailserver
########################################
# APT local cache
# work around because COPY failed if no source file
COPY .dummy .apt-mirror-confi[g] .proxy-confi[g] /
RUN cp /.proxy-config /etc/profile.d/proxy.sh 2> /dev/null || true
RUN if [ -f /.apt-mirror-config ] ; then . /.apt-mirror-config && sed -i \
-e "s/deb.debian.org/${APT_MIRROR_DEBIAN}/g" \
-e "s/security.debian.org/${APT_MIRROR_DEBIAN_SECURITY}/g" \
-e "s/archive.ubuntu.com/${APT_MIRROR_UBUNTU}/g" \
-e "s/security.ubuntu.com/${APT_MIRROR_UBUNTU_SECURITY}/g" \
/etc/apt/sources.list; fi
########################################
RUN apt-get update
RUN apt-get -y autoremove
RUN apt-get install -y locales locales-all
RUN sed -i '/fr_FR.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LC_ALL fr_FR.UTF-8
ENV LANG fr_FR.UTF-8
ENV LANGUAGE fr_FR:fr
RUN update-locale LANG=fr_FR.UTF-8
RUN apt-get -y install rsyslog apt-utils apg gawk altermime
RUN apt-get -y install libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libcurl4-gnutls-dev
#RUN apt-get -y install emacs elpa-php-mode
RUN apt-get -y install vim nano mailutils bsd-mailx procps
# creation du user filter,son repertoire home, copie des fichiers
RUN mkdir /home/filter ; useradd -d /home/filter filter ; chown filter /home/filter
COPY dockers/postfix/filter/* /home/filter/
RUN chown filter /home/filter/*; chmod 755 /home/filter/*
# creation du repertoire filter et application des bons droits pour le filtre
RUN touch /var/log/mail/filter.log ; chown filter /var/log/mail/filter.log ; chmod 777 /var/log/mail/filter.log
RUN mkdir -p /var/spool/filter ; chmod 775 /var/spool/filter ; chown filter /var/spool/filter
# modif des fichiers de postfix
RUN cat /home/filter/master.cf.update >>/etc/postfix/master.cf
RUN sed -i -e 's/reject_rbl_client bl.spamcop.net$//g' /etc/postfix/main.cf
RUN awk -i inplace 'BEGIN {cp=0} /127.0.0.1:10025/ {cp=1} /content_filter=/ {if (cp) gsub("content_filter=.*", "content_filter=filter:dummy"); print $0; cp=0; next} {print}' /etc/postfix/master.cf
# pour le confort : modif du .bashrc de root
RUN sed -i 's/# alias/alias/g' /root/.bashrc
RUN /etc/init.d/postfix restart
RUN echo "#!/bin/bash" > /entrypoint.sh
RUN echo "/usr/bin/supervisord -c /etc/supervisor/supervisord.conf" >> /entrypoint.sh
RUN chmod u+x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]