docker-mailserver (15.0.2)

Published 2025-04-10 22:49:02 +00:00 by Kabooshki

Installation

docker pull gitea.henriserverack.com/archive-team/docker-mailserver:15.0.2
sha256:dfef30dfa276010d1a1f312035b0eff3c112c4053d5b89ac5833f279eee4eaf4

About this package

A fullstack but simple mail server (SMTP, IMAP, LDAP, Anti-spam, Anti-virus, etc.). Only configuration files, no SQL database.

Image Layers

# debian.sh --arch 'amd64' out/ 'bookworm' '@1742169600'
ARG DEBIAN_FRONTEND=noninteractive
ARG DOVECOT_COMMUNITY_REPO=0
ARG LOG_LEVEL=trace
SHELL [/bin/bash -e -o pipefail -c]
COPY target/bin/sedfile /usr/local/bin/sedfile # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c chmod +x /usr/local/bin/sedfile adduser --quiet --system --group --disabled-password --home /var/lib/clamav --no-create-home --uid 200 clamav # buildkit
COPY target/scripts/build/packages.sh /build/ # buildkit
COPY target/scripts/helpers/log.sh /usr/local/bin/helpers/log.sh # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c /bin/bash /build/packages.sh && rm -r /build # buildkit
ARG DEBIAN_FRONTEND=noninteractive
ARG LOG_LEVEL=trace
SHELL [/bin/bash -e -o pipefail -c]
COPY --chown=200 /var/lib/clamav /var/lib/clamav # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c # `COPY --link --chown=200` has a bug when built by the buildx docker-container driver. # Restore ownership of parent dirs (Bug: https://github.com/moby/buildkit/issues/3912) chown root:root /var /var/lib echo '0 */6 * * * clamav /usr/bin/freshclam --quiet' >/etc/cron.d/clamav-freshclam chmod 644 /etc/clamav/freshclam.conf sedfile -i 's/Foreground false/Foreground true/g' /etc/clamav/clamd.conf mkdir /var/run/clamav chown -R clamav:root /var/run/clamav rm -rf /var/log/clamav/ # buildkit
COPY dovecot-fts-xapian-*.deb / # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c dpkg -i /dovecot-fts-xapian-*.deb && rm /dovecot-fts-xapian-*.deb # buildkit
COPY target/dovecot/*.inc target/dovecot/*.conf /etc/dovecot/conf.d/ # buildkit
COPY target/dovecot/dovecot-purge.cron /etc/cron.d/dovecot-purge.disabled # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c chmod 0 /etc/cron.d/dovecot-purge.disabled # buildkit
COPY target/rspamd/local.d/ /etc/rspamd/local.d/ # buildkit
COPY target/dovecot/dovecot-oauth2.conf.ext /etc/dovecot # buildkit
COPY target/dovecot/auth-oauth2.conf.ext /etc/dovecot/conf.d # buildkit
COPY target/dovecot/dovecot-ldap.conf.ext /etc/dovecot # buildkit
COPY target/dovecot/auth-ldap.conf.ext /etc/dovecot/conf.d # buildkit
COPY target/postfix/ldap-users.cf target/postfix/ldap-groups.cf target/postfix/ldap-aliases.cf target/postfix/ldap-domains.cf target/postfix/ldap-senders.cf /etc/postfix/ # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c # ref: https://github.com/docker-mailserver/docker-mailserver/pull/3403#discussion_r1306282387 echo 'CRON=1' >/etc/default/spamassassin sedfile -i -r 's/^\$INIT restart/supervisorctl restart amavis/g' /etc/spamassassin/sa-update-hooks.d/amavisd-new mkdir /etc/spamassassin/kam/ curl -sSfLo /etc/spamassassin/kam/kam.sa-channels.mcgrail.com.key https://mcgrail.com/downloads/kam.sa-channels.mcgrail.com.key # buildkit
COPY target/postsrsd/postsrsd /etc/default/postsrsd # buildkit
COPY target/postgrey/postgrey /etc/default/postgrey # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c mkdir /var/run/postgrey chown postgrey:postgrey /var/run/postgrey curl -Lsfo /etc/postgrey/whitelist_clients https://raw.githubusercontent.com/schweikert/postgrey/master/postgrey_whitelist_clients # buildkit
COPY target/amavis/conf.d/* /etc/amavis/conf.d/ # buildkit
COPY target/amavis/postfix-amavis.cf /etc/dms/postfix/master.d/ # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c sedfile -i -r 's/#(@| \\%)bypass/\1bypass/g' /etc/amavis/conf.d/15-content_filter_mode # add users clamav and amavis to each others group adduser clamav amavis adduser amavis clamav # no syslog user in Debian compared to Ubuntu adduser --system syslog useradd -u 5000 -d /home/docker -s /bin/bash -p "$(echo docker | openssl passwd -1 -stdin)" docker echo "0 4 * * * /usr/local/bin/virus-wiper" | crontab - chmod 644 /etc/amavis/conf.d/* # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c for _ in {1..10}; do su - amavis -c "razor-admin -create" sleep 3 if su - amavis -c "razor-admin -register"; then EC=0 break else EC=${?} fi done exit ${EC} # buildkit
COPY target/fail2ban/jail.local /etc/fail2ban/jail.local # buildkit
COPY target/fail2ban/fail2ban.d/fixes.local /etc/fail2ban/fail2ban.d/fixes.local # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c ln -s /var/log/mail/mail.log /var/log/mail.log ln -sf /var/log/mail/fail2ban.log /var/log/fail2ban.log # buildkit
COPY target/opendkim/opendkim.conf /etc/opendkim.conf # buildkit
COPY target/opendkim/default-opendkim /etc/default/opendkim # buildkit
COPY target/opendmarc/opendmarc.conf /etc/opendmarc.conf # buildkit
COPY target/opendmarc/default-opendmarc /etc/default/opendmarc # buildkit
COPY target/opendmarc/ignore.hosts /etc/opendmarc/ignore.hosts # buildkit
COPY target/mta-sts-daemon/mta-sts-daemon.yml /etc/mta-sts-daemon.yml # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c mkdir /var/run/mta-sts chown -R _mta-sts:root /var/run/mta-sts # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c echo 'Reason_Message = Message {rejectdefer} due to: {spf}.' >>/etc/postfix-policyd-spf-python/policyd-spf.conf # buildkit
COPY target/fetchmail/fetchmailrc /etc/fetchmailrc_general # buildkit
COPY target/getmail/getmailrc_general /etc/getmailrc_general # buildkit
COPY target/getmail/getmail-service.sh /usr/local/bin/ # buildkit
COPY target/postfix/main.cf target/postfix/master.cf /etc/postfix/ # buildkit
COPY target/shared/ffdhe4096.pem /etc/postfix/dhparams.pem # buildkit
COPY target/shared/ffdhe4096.pem /etc/dovecot/dh.pem # buildkit
COPY target/postfix/header_checks.pcre target/postfix/sender_header_filter.pcre target/postfix/sender_login_maps.pcre /etc/postfix/maps/ # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c : >/etc/aliases sedfile -i 's/START_DAEMON=no/START_DAEMON=yes/g' /etc/default/fetchmail mkdir /var/run/fetchmail && chown fetchmail /var/run/fetchmail # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c sedfile -i -r "/^#?compress/c\compress\ncopytruncate" /etc/logrotate.conf mkdir /var/log/mail chown syslog:root /var/log/mail touch /var/log/mail/clamav.log chown -R clamav:root /var/log/mail/clamav.log touch /var/log/mail/freshclam.log chown -R clamav:root /var/log/mail/freshclam.log sedfile -i -r 's|/var/log/mail|/var/log/mail/mail|g' /etc/rsyslog.conf sedfile -i -r 's|;auth,authpriv.none|;mail.none;mail.error;auth,authpriv.none|g' /etc/rsyslog.conf sedfile -i -r 's|LogFile /var/log/clamav/|LogFile /var/log/mail/|g' /etc/clamav/clamd.conf sedfile -i -r 's|UpdateLogFile /var/log/clamav/|UpdateLogFile /var/log/mail/|g' /etc/clamav/freshclam.conf sedfile -i -r 's|/var/log/clamav|/var/log/mail|g' /etc/logrotate.d/clamav-daemon sedfile -i -r 's|invoke-rc.d.*|/usr/bin/supervisorctl signal hup clamav >/dev/null \|\| true|g' /etc/logrotate.d/clamav-daemon sedfile -i -r 's|/var/log/clamav|/var/log/mail|g' /etc/logrotate.d/clamav-freshclam sedfile -i -r '/postrotate/,/endscript/d' /etc/logrotate.d/clamav-freshclam sedfile -i -r 's|/var/log/mail|/var/log/mail/mail|g' /etc/logrotate.d/rsyslog sedfile -i -r '/\/var\/log\/mail\/mail.log/d' /etc/logrotate.d/rsyslog sedfile -i 's|^/var/log/fail2ban.log {$|/var/log/mail/fail2ban.log {|' /etc/logrotate.d/fail2ban # prevent syslog logrotate warnings sedfile -i -e 's/\(printerror "could not determine current runlevel"\)/#\1/' /usr/sbin/invoke-rc.d sedfile -i -e 's/^\(POLICYHELPER=\).*/\1/' /usr/sbin/invoke-rc.d # prevent syslog warning about imklog permissions sedfile -i -e 's/^module(load=\"imklog\")/#module(load=\"imklog\")/' /etc/rsyslog.conf # this change is for our alternative process manager rather than part of # a fix related to the change preceding it. echo -e '\n/usr/bin/supervisorctl signal hup rsyslog >/dev/null' >>/usr/lib/rsyslog/rsyslog-rotate # buildkit
COPY target/logwatch/maillog.conf /etc/logwatch/conf/logfiles/maillog.conf # buildkit
COPY target/logwatch/ignore.conf /etc/logwatch/conf/ignore.conf # buildkit
COPY target/supervisor/supervisord.conf /etc/supervisor/supervisord.conf # buildkit
COPY target/supervisor/conf.d/* /etc/supervisor/conf.d/ # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c rm -rf /usr/share/locale/* rm -rf /usr/share/man/* rm -rf /usr/share/doc/* update-locale # buildkit
COPY target/bin/* target/scripts/*.sh target/scripts/startup/*.sh /usr/local/bin/ # buildkit
RUN |3 DEBIAN_FRONTEND=noninteractive DOVECOT_COMMUNITY_REPO=0 LOG_LEVEL=trace /bin/bash -e -o pipefail -c chmod +x /usr/local/bin/* # buildkit
COPY target/scripts/helpers /usr/local/bin/helpers # buildkit
COPY target/scripts/startup/setup.d /usr/local/bin/setup.d # buildkit
ARG DMS_RELEASE=v15.0.2
ARG VCS_REVISION=5027f4f5b6fed075a2892825ab350bb8154959bd
WORKDIR /
EXPOSE map[110/tcp:{} 143/tcp:{} 25/tcp:{} 4190/tcp:{} 465/tcp:{} 587/tcp:{} 993/tcp:{} 995/tcp:{}]
ENTRYPOINT ["/usr/bin/dumb-init" "--"]
CMD ["supervisord" "-c" "/etc/supervisor/supervisord.conf"]
ENV FETCHMAIL_POLL=300
ENV POSTGREY_AUTO_WHITELIST_CLIENTS=5
ENV POSTGREY_DELAY=300
ENV POSTGREY_MAX_AGE=35
ENV POSTGREY_TEXT=Delayed by Postgrey
ENV SASLAUTHD_MECH_OPTIONS=
LABEL org.opencontainers.image.title=docker-mailserver
LABEL org.opencontainers.image.vendor=The Docker Mailserver Organization
LABEL org.opencontainers.image.authors=The Docker Mailserver Organization on GitHub
LABEL org.opencontainers.image.licenses=MIT
LABEL org.opencontainers.image.description=A fullstack but simple mail server (SMTP, IMAP, LDAP, Anti-spam, Anti-virus, etc.). Only configuration files, no SQL database.
LABEL org.opencontainers.image.url=https://github.com/docker-mailserver
LABEL org.opencontainers.image.documentation=https://github.com/docker-mailserver/docker-mailserver/blob/master/README.md
LABEL org.opencontainers.image.source=https://github.com/docker-mailserver/docker-mailserver
LABEL org.opencontainers.image.revision=5027f4f5b6fed075a2892825ab350bb8154959bd
LABEL org.opencontainers.image.version=v15.0.2
ENV DMS_RELEASE=v15.0.2

Labels

Key Value
org.opencontainers.image.authors The Docker Mailserver Organization on GitHub
org.opencontainers.image.description A fullstack but simple mail server (SMTP, IMAP, LDAP, Anti-spam, Anti-virus, etc.). Only configuration files, no SQL database.
org.opencontainers.image.documentation https://github.com/docker-mailserver/docker-mailserver/blob/master/README.md
org.opencontainers.image.licenses MIT
org.opencontainers.image.revision 5027f4f5b6fed075a2892825ab350bb8154959bd
org.opencontainers.image.source https://github.com/docker-mailserver/docker-mailserver
org.opencontainers.image.title docker-mailserver
org.opencontainers.image.url https://github.com/docker-mailserver
org.opencontainers.image.vendor The Docker Mailserver Organization
org.opencontainers.image.version v15.0.2
Details
Container
2025-04-10 22:49:02 +00:00
0
OCI / Docker
linux/amd64
The Docker Mailserver Organization on GitHub
MIT
396 MiB
Versions (3) View all
15.0.2 2025-04-10
15.0.0 2025-04-10
14.0.0 2025-04-10