diff options
| author | yyamashita <yyamashita@hetzner.yyamashita.com> | 2026-06-01 21:21:44 +0900 |
|---|---|---|
| committer | yyamashita <yyamashita@hetzner.yyamashita.com> | 2026-06-01 21:21:44 +0900 |
| commit | 647d10c68785bc53453d5054d324a7f69ff3ee2b (patch) | |
| tree | 62b3b94088ce9a6f27d14015a1adfc11376c6cd5 /mail/entrypoint.sh | |
| parent | ed78863260dedd56152976ebc630229461e2b0a2 (diff) | |
Fix entrypoint: remove chmod on read-only mount, run opendkim as root
/etc/opendkim が :ro マウントのため chmod/chown が失敗していた問題を修正。
opendkim.conf で UserID root に変更しコンテナ内でルートとして実行する。
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'mail/entrypoint.sh')
| -rwxr-xr-x | mail/entrypoint.sh | 7 |
1 files changed, 2 insertions, 5 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 |
