From e85f4839cec17d20ae8ed38eecc91ed4561254e8 Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Fri, 15 Aug 2025 04:57:29 +0100 Subject: opendkim.sh: add localhost to opendkim internal table --- opendkim.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'opendkim.sh') diff --git a/opendkim.sh b/opendkim.sh index d4f0111..5bf3312 100644 --- a/opendkim.sh +++ b/opendkim.sh @@ -9,7 +9,10 @@ if [ ! -f "$OPENDKIM_FILE" ]; then exit 0 fi -awk <"$NETWORKS_FILE" >"$OPENDKIM_TEMP" '{ print $1 }' +# OpenDKIM needs localhost in the internal host list or it won't sign +# locally-originated messages. +printf >"$OPENDKIM_TEMP" '127.0.0.0/8\n::1/128\n' +awk >>"$OPENDKIM_TEMP" <"$NETWORKS_FILE" '{ print $1 }' if cmp -s "$OPENDKIM_TEMP" "$OPENDKIM_FILE"; then rm "$OPENDKIM_TEMP" -- cgit v1.2.3