summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rwxr-xr-xmail/entrypoint.sh7
-rw-r--r--mail/opendkim/opendkim.conf2
2 files changed, 3 insertions, 6 deletions
diff --git a/mail/entrypoint.sh b/mail/entrypoint.sh
index 2dc8f26..267ea03 100755
--- a/mail/entrypoint.sh
+++ b/mail/entrypoint.sh
@@ -3,7 +3,7 @@ set -e
KEY_FILE=/etc/opendkim/keys/mail.private
-# Wait for DKIM key (mounted from host)
+# Wait for DKIM key (mounted read-only from host)
for i in $(seq 1 30); do
[[ -f "$KEY_FILE" ]] && break
echo "Waiting for DKIM key at $KEY_FILE ... (run mail/install.sh on host)"
@@ -14,13 +14,10 @@ if [[ ! -f "$KEY_FILE" ]]; then
exit 1
fi
-chmod 600 "$KEY_FILE"
-chown opendkim:opendkim "$KEY_FILE"
-
# Start rsyslog for Postfix logging
rsyslogd
-# Start OpenDKIM (inet socket on localhost:8891)
+# Start OpenDKIM (runs as root per opendkim.conf UserID)
opendkim -x /etc/opendkim.conf
sleep 2
diff --git a/mail/opendkim/opendkim.conf b/mail/opendkim/opendkim.conf
index 81335f4..90bcb6b 100644
--- a/mail/opendkim/opendkim.conf
+++ b/mail/opendkim/opendkim.conf
@@ -6,7 +6,7 @@ Canonicalization relaxed/simple
Mode sv
OversignHeaders From
-UserID opendkim
+UserID root
UMask 022
Socket inet:8891@localhost
PidFile /var/run/opendkim/opendkim.pid