Mod:Postfix add global option to Seds & fixed cfg
This commit is contained in:
@@ -40,7 +40,7 @@ adduser postfix opendkim
|
||||
rm -rf /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
|
||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/config/opendkim.conf -o /etc/opendkim
|
||||
cat <<EOF > /etc/opendkim.d/TrustedHosts
|
||||
127.0.0.1
|
||||
::1
|
||||
@@ -55,7 +55,7 @@ if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist
|
||||
mkdir -p /var/spool/postfix/var/run/opendkim
|
||||
sudo chown opendkim:postfix /var/spool/postfix/var/run/opendkim
|
||||
sed -i "/^RUNDIR=/c\RUNDIR=/var/spool/postfix/var/run/opendkim" /etc/default/opendkim
|
||||
echo "TrustAnchorFile /usr/share/dns/root.key" >> /etc/opendkim.d/conf
|
||||
echo "TrustAnchorFile /usr/share/dns/root.key" >> /etc/opendkim.conf
|
||||
bash /lib/opendkim/opendkim.service.generate
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
@@ -65,7 +65,7 @@ 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'/' -e 's/vps/'$odksec'/' ~/OpenDKIMInit-host.sh
|
||||
sed -i -e 's/DOMAINname/'$hostname'/g' -e 's/SITEName/'host'/g' -e 's/vps/'$odksec'/g' ~/OpenDKIMInit-host.sh
|
||||
unset odksec
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user