Mod:Postfix updated CMSHook and fixed sed (again)

This commit is contained in:
2021-02-05 17:33:26 +01:00
parent c60b57d41b
commit 10838eb815
2 changed files with 8 additions and 7 deletions

View File

@@ -1,25 +1,26 @@
if [ -z "${sitename}" ]; then sitename=${domain//./_};fi
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
maildomain=$domain
else
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
if [ $IMODE = l ]; then
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
[Yy]* )
mailas=info@$domain
maildomain=$domain
break;;
[Nn]* )
echo 'Enter full hostname:'
read hostname
echo 'Enter mail addres for sending mail'
read mail
maildomain=$(sed -e 's/[^@]*@//' <<< "$mail")
break;;
* )echo "Choose yes or no.";;
esac