Mod:Postfix updated CMSHook and fixed sed (again)
This commit is contained in:
@@ -1,25 +1,26 @@
|
|||||||
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 of $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)
|
||||||
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 "Hostname with nxdi.nl -> yes/no?" yn
|
read -p "Send mail as info@$domain for $domain" 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 full hostname:'
|
echo 'Enter mail addres for sending mail'
|
||||||
read hostname
|
read mail
|
||||||
|
maildomain=$(sed -e 's/[^@]*@//' <<< "$mail")
|
||||||
break;;
|
break;;
|
||||||
* )echo "Choose yes or no.";;
|
* )echo "Choose yes or no.";;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ EOF
|
|||||||
##--------------##
|
##--------------##
|
||||||
|
|
||||||
adduser postfix opendkim
|
adduser postfix opendkim
|
||||||
rm -rm /etc/opendkim.d
|
rm -rf /etc/opendkim.d
|
||||||
mkdir -p /etc/opendkim.d/keys
|
mkdir -p /etc/opendkim.d/keys
|
||||||
chown opendkim:opendkim /etc/opendkim.d/keys -R
|
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.d.conf
|
||||||
@@ -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
|
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
|
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
|
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
|
sed -i -e 's/DOMAINname/'$hostname'/' -e 's/SITEName/'host'/' -e 's/vps/'$odksec'/' ~/OpenDKIMInit-host.sh
|
||||||
unset odksec
|
unset odksec
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user