Added OpenDKIM to Postfix module

This commit is contained in:
2021-01-29 18:23:16 +01:00
parent 03ff10e36d
commit 8dfef7c493
7 changed files with 123 additions and 9 deletions

View File

@@ -0,0 +1,35 @@
if [ -n "$1" ]; then
if [[ "$1" = "--enable" ]]; then
echo "Enableing DKIM"
echo "*@DOMAINname vps._domainkey.DOMAINname >>/etc/opendkim/SigningTable\
systemctl reload opendkim
#Remove script
while true; do
read -p "Remove this script -> yes/no?" yn
case $yn in
[Nn]* )
break;;
[Yy]* )
rm -- "$0"
break;;
* )echo "Choose yes or no.";;
esac
done
exit
fi
fi
echo "Required to enable mailing for this system"
echo "Please add the folloing to your SPF Record in the DNS of DOMAINname"
echo ""
echo "Optional to enable dkim"
echo "ip4:$(curl -s -4 icanhazip.com) ip6:$(curl -s -6 icanhazip.com)"
echo "Please add the folloing TXT Record to the DNS of DOMAINname"
echo "WARNING the output is split, please combine key before inserting into DNS"
cat /etc/opendkim/keys/DOMAINname/vps.txt
echo ""
echo "If DNS is propegated then run \"bash $0 --enable\""
rm -f /etc/update-motd.d/51-opendkim-SITEName