Mod:Postfix fixed PHP cfg Update & motd warn msgs
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user