Merge branch 'master' into antifascista

This commit is contained in:
f 2022-03-07 18:12:52 -03:00
commit edf8984271
4 changed files with 27 additions and 0 deletions

View file

@ -2,3 +2,12 @@ ARG ALPINE_VERSION=3.13.6
ARG BASE_IMAGE=sutty/monit ARG BASE_IMAGE=sutty/monit
FROM ${BASE_IMAGE}:${ALPINE_VERSION} FROM ${BASE_IMAGE}:${ALPINE_VERSION}
MAINTAINER "f <f@sutty.nl>" MAINTAINER "f <f@sutty.nl>"
RUN apk add --no-cache opendkim mini-sendmail
COPY ./monit.conf /etc/monit.d/opendkim.conf
COPY ./opendkimd.sh /usr/local/bin/opendkimd
COPY ./sendmail.sh /usr/bin/sendmail
RUN install -dm 2750 -o opendkim -g opendkim /run/opendkim
EXPOSE 8891
VOLUME /etc/opendkim

3
monit.conf Normal file
View file

@ -0,0 +1,3 @@
check process opendkim with pidfile /tmp/opendkim.pid
start program = "/usr/local/bin/opendkimd start"
stop program = "/usr/local/bin/opendkimd stop"

10
opendkimd.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
pid=/tmp/opendkim.pid
case $1 in
stop) cat ${pid} | xargs kill ;;
*)
chown -R opendkim:opendkim /etc/opendkim
/usr/sbin/opendkim ;;
esac

5
sendmail.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
/var/lib/mini-sendmail/mini_sendmail -s postfix $@
exit $?