Mod:Postfix Fixed incorrect links & dkim conf dir
Updated location of OpenDKIM config files to default /etc/opendkim.d from /etc/opendkim Updated config file to reflect filename hanges in repo
This commit is contained in:
@@ -37,10 +37,11 @@ EOF
|
||||
##--------------##
|
||||
|
||||
adduser postfix opendkim
|
||||
mkdir -p /etc/opendkim/keys
|
||||
chown opendkim:opendkim /etc/opendkim/keys -R
|
||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/config/opendkim.conf -o /etc/opendkim.conf
|
||||
cat <<EOF > /etc/opendkim/TrustedHosts
|
||||
rm -rm /etc/opendkim.d
|
||||
mkdir -p /etc/opendkim.d/keys
|
||||
chown opendkim:opendkim /etc/opendkim.d/keys -R
|
||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/config/opendkim.conf -o /etc/opendkim.d.conf
|
||||
cat <<EOF > /etc/opendkim.d/TrustedHosts
|
||||
127.0.0.1
|
||||
::1
|
||||
localhost
|
||||
@@ -54,17 +55,17 @@ if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist
|
||||
mkdir /var/spool/postfix/opendkim
|
||||
sudo chown opendkim:postfix /var/spool/postfix/opendkim
|
||||
sed -i "/^RUNDIR=/c\RUNDIR=/var/spool/postfix/var/run/opendkim" /etc/default/opendkim
|
||||
echo "TrustAnchorFile /usr/share/dns/root.key" >> /etc/opendkim/conf
|
||||
echo "TrustAnchorFile /usr/share/dns/root.key" >> /etc/opendkim.d/conf
|
||||
bash /lib/opendkim/opendkim.service.generate
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
odksec=$(sed 's/\..*$//' <<< $hostname)
|
||||
sudo --user opendkim mkdir /etc/opendkim/keys/"$hostname"
|
||||
sudo --user opendkim opendkim-genkey -r -D /etc/opendkim/keys/"$hostname" -d "$hostname" -s $odksec
|
||||
echo ""$odksec"._domainkey."$hostname" "$hostname":"$odksec":/etc/opendkim/keys/"$hostname"/"$odksec".private" >> /etc/opendkim/KeyTable
|
||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/config/opendkim-init.sh -o ~/OpenDKIMInit-host.sh
|
||||
sed -i -e 's/DOMAINname/'$hostname'/' 's/SITEName/'host'/' 's/vps/'$odksec'/' ~/OpenDKIMInit-host.sh
|
||||
sudo --user opendkim mkdir /etc/opendkim.d/keys/"$hostname"
|
||||
sudo --user opendkim opendkim-genkey -r -D /etc/opendkim.d/keys/"$hostname" -d "$hostname" -s $odksec
|
||||
echo ""$odksec"._domainkey."$hostname" "$hostname":"$odksec":/etc/opendkim.d/keys/"$hostname"/"$odksec".private" >> /etc/opendkim.d/KeyTable
|
||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/opendkim-init.sh -o ~/OpenDKIMInit-host.sh
|
||||
sed -i -e 's/DOMAINname/'$hostname'/' -e 's/SITEName/'host'/' 's/vps/'$odksec'/' ~/OpenDKIMInit-host.sh
|
||||
unset odksec
|
||||
|
||||
|
||||
@@ -87,7 +88,7 @@ if [ ! -z "${postfixappended}" ]; then
|
||||
for file in /etc/ICTM/sites/*; do
|
||||
sitename="${file##*/}"
|
||||
domain=${sitename//_/.}
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/appendCMS-preconf.sh)
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/appendCMS-conf.sh)
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/CMSHook-preconf.sh)
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/CMSHook-conf.sh)
|
||||
done
|
||||
fi
|
||||
Reference in New Issue
Block a user