Files
VPS-scripts_Web-V2/SubModules/postfix/CMSHook-preconf.sh
Bram Prieshof 73bf0aa0f4 Mod:Postfix Made DKIM selector variable
This so multiple servers useing Web-V2 can send from the same domain
Now using odksec for host selector var
and odkdomsec for domain selector var
2021-03-12 14:44:40 +01:00

46 lines
1.6 KiB
Bash

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
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)
maildomain=$(sed -e 's/[^@]*@//' <<< "$mail")
fi
if (whiptail --title "Config" --yesno " Use default DKIM selector [vps]?" 11 78); then
odkdomsec=vps
else
odkdomsec=$(whiptail --nocancel --inputbox " Enter DKIM selector" 11 78 --title "Config" 3>&1 1>&2 2>&3)
fi
fi
if [ $IMODE = l ]; then
while true; do
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? '
read mailas
maildomain=$(sed -e 's/[^@]*@//' <<< "$mailas")
break;;
* )echo "Choose yes or no.";;
esac
done
while true; do
read -p "Use default DKIM selector [vps]? (y/n)" yn
case $yn in
[Yy]* )
odkdomsec=vps
break;;
[Nn]* )
echo 'Enter DKIM selector? '
read odkdomsec
break;;
* )echo "Choose yes or no.";;
esac
done
fi