From 46042d3ca92d0ba7f7e64b280e71a0afd84cf884 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Fri, 5 Feb 2021 18:39:35 +0100 Subject: [PATCH] Mod:Postfix fixed PHP cfg Update & motd warn msgs --- SubModules/postfix/CMSHook-conf.sh | 5 +++-- SubModules/postfix/conf.sh | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/SubModules/postfix/CMSHook-conf.sh b/SubModules/postfix/CMSHook-conf.sh index 2fa4488..f5f1956 100644 --- a/SubModules/postfix/CMSHook-conf.sh +++ b/SubModules/postfix/CMSHook-conf.sh @@ -5,14 +5,15 @@ echo "$maildomain" >> /etc/opendkim.d/TrustedHosts echo "vps._domainkey."$maildomain" "$maildomain":vps:/etc/opendkim.d/keys/"$maildomain"/vps.private" >> /etc/opendkim.d/KeyTable if [ $webserv != nginx_nonphp ]; then + echo "" >> "$phpPoolDir"/"$sitename".conf echo "php_admin_value[mail.force_extra_parameters] = \"-f$mailas -F'$maildomain'\"" >> "$phpPoolDir"/"$sitename".conf fi curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/opendkim-init.sh -o ~/OpenDKIMInit-$sitename.sh -sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEName/'$sitename'/' ~/OpenDKIMInit-$sitename.sh +sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEName/'${sitename//_}'/' ~/OpenDKIMInit-$sitename.sh -cat << EOF > /etc/update-motd.d/51-opendkim-"$sitename" +cat << EOF > /etc/update-motd.d/51-opendkim-"${sitename//_}" #!/bin/sh red='\e[1;31m%s\e[0m\n' printf "\n" diff --git a/SubModules/postfix/conf.sh b/SubModules/postfix/conf.sh index 27e04d5..91c6d8a 100644 --- a/SubModules/postfix/conf.sh +++ b/SubModules/postfix/conf.sh @@ -69,16 +69,16 @@ sed -i -e 's/DOMAINname/'$hostname'/' -e 's/SITEName/'host'/' -e 's/vps/'$odksec unset odksec -cat << EOF > /etc/update-motd.d/51-generalSPF +cat << EOF > /etc/update-motd.d/51-generalspf #!/bin/sh red='\e[1;31m%s\e[0m\n' printf "\n" printf \$red "To enable mail for this server add \"ip4:\$(curl -s -4 icanhazip.com) ip6:\$(curl -s -6 icanhazip.com)\" to $hostname SPF" printf \$red "to enable DKKIM for the hostname run bash ~/OpenDKIMInit-host.sh" -printf \$red "remove notice this by running \"rm /etc/update-motd.d/51-generalSPF\"" +printf \$red "remove notice this by running \"rm /etc/update-motd.d/51-generalspf\"" printf "\n" EOF -chmod +x /etc/update-motd.d/51-generalSPF +chmod +x /etc/update-motd.d/51-generalspf systemctl start postfix opendkim systemctl enable postfix opendkim