summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryyamashita <yyamashita@hetzner.yyamashita.com>2026-06-01 21:27:47 +0900
committeryyamashita <yyamashita@hetzner.yyamashita.com>2026-06-01 21:27:47 +0900
commit665f6a7d34643aee0b2aefe00fdd7ca1c5ff593d (patch)
treefcdc5cf5480313d5ac9f63e007e5482750b63e9e
parent1d860809974b246ffe9f1fd31b147487312c91d5 (diff)
entrypoint: replace Docker embedded DNS with external resolvers
127.0.0.11 は MX クエリを正しく処理できないため 8.8.8.8/1.1.1.1 に差し替える。 メールコンテナはコンテナ名解決が不要なため問題なし。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
-rwxr-xr-xmail/entrypoint.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/mail/entrypoint.sh b/mail/entrypoint.sh
index 267ea03..49d8d64 100755
--- a/mail/entrypoint.sh
+++ b/mail/entrypoint.sh
@@ -14,6 +14,11 @@ if [[ ! -f "$KEY_FILE" ]]; then
exit 1
fi
+# Docker の embedded DNS (127.0.0.11) は MX クエリを解決できないことがあるため
+# 外部 DNS に差し替える(コンテナ内の名前解決は不要なので問題なし)
+sed -i 's/nameserver 127.0.0.11/nameserver 8.8.8.8/' /etc/resolv.conf
+echo 'nameserver 1.1.1.1' >> /etc/resolv.conf
+
# Start rsyslog for Postfix logging
rsyslogd