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
|
||||
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"
|
||||
#!/bin/sh
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
if [ -z "${sitename}" ]; then sitename=${domain//./_};fi
|
||||
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
|
||||
maildomain=$domain
|
||||
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")
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [ $IMODE = l ]; then
|
||||
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
|
||||
[Yy]* )
|
||||
mailas=info@$domain
|
||||
maildomain=$domain
|
||||
break;;
|
||||
[Nn]* )
|
||||
echo 'Enter mail addres for sending mail'
|
||||
echo 'Enter mail addres for sending mail? '
|
||||
read mail
|
||||
maildomain=$(sed -e 's/[^@]*@//' <<< "$mail")
|
||||
break;;
|
||||
|
||||
@@ -52,8 +52,8 @@ EOF
|
||||
|
||||
|
||||
if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then
|
||||
mkdir /var/spool/postfix/opendkim
|
||||
sudo chown opendkim:postfix /var/spool/postfix/opendkim
|
||||
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
|
||||
bash /lib/opendkim/opendkim.service.generate
|
||||
|
||||
Reference in New Issue
Block a user