summaryrefslogtreecommitdiffstats
path: root/opendkim.sh
diff options
context:
space:
mode:
authorLexi Winter <lexi@le-fay.org>2025-08-15 04:57:29 +0100
committerLexi Winter <lexi@le-fay.org>2025-08-15 04:57:29 +0100
commite85f4839cec17d20ae8ed38eecc91ed4561254e8 (patch)
tree10eb95c355769e05dbcc819a7b78b8ab818a0a57 /opendkim.sh
parent529a94419e99c8bc81303d6a423be87c5c87c2b5 (diff)
downloadlfldap-e85f4839cec17d20ae8ed38eecc91ed4561254e8.tar.gz
lfldap-e85f4839cec17d20ae8ed38eecc91ed4561254e8.tar.bz2
opendkim.sh: add localhost to opendkim internal tableHEADv1.6main
Diffstat (limited to 'opendkim.sh')
-rw-r--r--opendkim.sh5
1 files changed, 4 insertions, 1 deletions
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"