From 45944ade39d13a07389ffa2b37e7a4d4bd4a3bb4 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Mon, 11 Jul 2016 13:21:44 +0200 Subject: [PATCH] add spamass-milter --- Dockerfile | 3 +++ rootfs/etc/confd/templates/main.cf.tmpl | 2 +- rootfs/etc/services.d/spamass-milter/run | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9751460..b3d3417 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,9 @@ 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 diff --git a/rootfs/etc/confd/templates/main.cf.tmpl b/rootfs/etc/confd/templates/main.cf.tmpl index a5f670f..f076cc7 100644 --- a/rootfs/etc/confd/templates/main.cf.tmpl +++ b/rootfs/etc/confd/templates/main.cf.tmpl @@ -48,7 +48,7 @@ smtpd_sasl_auth_enable = yes smtpd_relay_restrictions = permit_mynetworks,permit_sasl_authenticated,defer_unauth_destination smtpd_milters = - unix:/var/run/spamass.sock + unix:/var/run/spamass-milter/spamass.sock non_smtpd_milters = $smtpd_milters milter_default_action = accept milter_macro_daemon_name = ORIGINATING diff --git a/rootfs/etc/services.d/spamass-milter/run b/rootfs/etc/services.d/spamass-milter/run index 4658ed5..35a4329 100644 --- a/rootfs/etc/services.d/spamass-milter/run +++ b/rootfs/etc/services.d/spamass-milter/run @@ -1,3 +1,3 @@ #!/usr/bin/with-contenv sh -spamass-milter -p /var/run/spamass.sock -- -d spamassassin +s6-setuidgid postfix spamass-milter -p /var/run/spamass-milter/spamass.sock -- -d spamassassin