added CMSHook for postfix module and updated conf
CMSHook wil be inplemented so CMS releated Module configuration, this wil be loaded when using appendCMS and the main intaller
This commit is contained in:
23
SubModules/postfix/CMSHook-conf.sh
Normal file
23
SubModules/postfix/CMSHook-conf.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#ADD DOMAIN
|
||||
sudo --user opendkim mkdir /etc/opendkim/keys/"$maildomain"
|
||||
sudo --user opendkim opendkim-genkey -r -D /etc/opendkim/keys/"$maildomain" -d "$maildomain" -s vps
|
||||
echo "$maildomain" >> /etc/opendkim/TrustedHosts
|
||||
echo "vps._domainkey."$maildomain" "$maildomain":vps:/etc/opendkim/keys/"$maildomain"/vps.private" >> /etc/opendkim/KeyTable
|
||||
|
||||
if [ $webserv != nginx_nonphp ]; then
|
||||
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/config/opendkim-init.sh -o ~/OpenDKIMInit-$sitename.sh
|
||||
sed -i -e 's/DOMAINname/'$domain'/' 's/SITEName/'$sitename'/' ~/OpenDKIMInit-$sitename.sh
|
||||
|
||||
cat << EOF > /etc/update-motd.d/51-opendkim-"$sitename"
|
||||
#!/bin/sh
|
||||
red='\e[1;31m%s\e[0m\n'
|
||||
printf "\n"
|
||||
printf \$red "To enable mail for $domain please run please run bash ~/OpenDKIMInit-$sitename.sh"
|
||||
printf "\n"
|
||||
EOF
|
||||
chmod +x /etc/update-motd.d/51-opendkim-"$sitename"
|
||||
systemctl reload opendkim $phpFPMService
|
||||
Reference in New Issue
Block a user