Mod:Postfix Fixed ODK Sock for deb & Clean CMSHOOK
This commit is contained in:
@@ -10,7 +10,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/opendkim-init.sh -o ~/OpenDKIMInit-$sitename.sh
|
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'/' '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
|
#!/bin/sh
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
if [ -z "${sitename}" ]; then sitename=${domain//./_};fi
|
if [ -z "${sitename}" ]; then sitename=${domain//./_};fi
|
||||||
if [ $IMODE = n ]; then
|
if [ $IMODE = n ]; then
|
||||||
if (whiptail --title "Config" --yesno " Send mail as info@$domain for $domain" 11 78); then
|
if (whiptail --title "Config" --yesno " Send mail as info@$domain for $domain?" 11 78); then
|
||||||
mailas=info@$domain
|
mailas=info@$domain
|
||||||
maildomain=$domain
|
maildomain=$domain
|
||||||
else
|
else
|
||||||
mailas=$(whiptail --nocancel --inputbox " Enter mail addres for sending mail" 11 78 --title "Config" 3>&1 1>&2 2>&3)
|
mailas=$(whiptail --nocancel --inputbox " Enter mail addres for sending mail?" 11 78 --title "Config" 3>&1 1>&2 2>&3)
|
||||||
maildomain=$(sed -e 's/[^@]*@//' <<< "$mail")
|
maildomain=$(sed -e 's/[^@]*@//' <<< "$mail")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
|
||||||
if [ $IMODE = l ]; then
|
if [ $IMODE = l ]; then
|
||||||
while true; do
|
while true; do
|
||||||
read -p "Send mail as info@$domain for $domain" yn
|
read -p "Send mail as info@$domain for $domain? (y/n)" yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]* )
|
[Yy]* )
|
||||||
mailas=info@$domain
|
mailas=info@$domain
|
||||||
maildomain=$domain
|
maildomain=$domain
|
||||||
break;;
|
break;;
|
||||||
[Nn]* )
|
[Nn]* )
|
||||||
echo 'Enter mail addres for sending mail'
|
echo 'Enter mail addres for sending mail? '
|
||||||
read mail
|
read mail
|
||||||
maildomain=$(sed -e 's/[^@]*@//' <<< "$mail")
|
maildomain=$(sed -e 's/[^@]*@//' <<< "$mail")
|
||||||
break;;
|
break;;
|
||||||
* )echo "Choose yes or no.";;
|
* )echo "Choose yes or no.";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -52,8 +52,8 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then
|
if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then
|
||||||
mkdir /var/spool/postfix/opendkim
|
mkdir -p /var/spool/postfix/var/run/opendkim
|
||||||
sudo chown opendkim:postfix /var/spool/postfix/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
|
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.d/conf
|
||||||
bash /lib/opendkim/opendkim.service.generate
|
bash /lib/opendkim/opendkim.service.generate
|
||||||
|
|||||||
Reference in New Issue
Block a user