Skip to content

Commit 09acca4

Browse files
committed
opendkim: stderr by rsyslog
1 parent aef0d58 commit 09acca4

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

opendkim/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ ARG POSTFIX_GID=4005
44
ARG OPENDKIM_UID=4008
55
ARG OPENDKIM_GID=4008
66

7-
RUN apt-get update && apt-get install -y opendkim openssl rsyslogd
7+
RUN apt-get update && apt-get install -y opendkim openssl rsyslog wget
88
RUN groupmod -g ${OPENDKIM_GID} opendkim && \
99
usermod -u ${OPENDKIM_UID} -g ${OPENDKIM_GID} opendkim
1010
RUN groupadd -g ${POSTFIX_GID} postfix && gpasswd -a opendkim postfix
1111

12-
ENTRYPOINT ["/usr/sbin/opendkim"]
13-
CMD ["-f", "-x", "/etc/opendkim/opendkim.conf"]
12+
RUN wget https://github.com/namachan10777/whaleinit/releases/download/v0.0.4/whaleinit-$(uname -m)-linux-musl -O /whaleinit && \
13+
chmod 755 /whaleinit
14+
COPY whaleinit.toml /etc/whaleinit.toml
15+
COPY rsyslog.conf /etc/rsyslog.conf
16+
RUN mkdir -p /var/spool/postfix/opendkim && chown opendkim:postfix -R /var/spool/postfix/opendkim
17+
18+
ENTRYPOINT [ "/whaleinit" ]

opendkim/rsyslog.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module(load="imuxsock")
2+
input(type="imuxsock" Socket="/dev/log" CreatePath="on")
3+
4+
*.* action(type="omfile" file="/proc/self/fd/2")

opendkim/whaleinit.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[[services]]
2+
title = "opendkim"
3+
exec = "/usr/sbin/opendkim"
4+
args = ["-f", "-x", "/etc/opendkim/opendkim.conf", "-d", "all"]
5+
essential = true
6+
7+
[[services]]
8+
title = "rsyslogd"
9+
exec = "/usr/sbin/rsyslogd"
10+
args = ["-n"]

0 commit comments

Comments
 (0)