Displaying email hostnames
This commit is contained in:
parent
010757a1d2
commit
a6a911871b
|
@ -1529,25 +1529,27 @@ function email_extra_domains {
|
|||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --title $"Email Domains" \
|
||||
--backtitle $"Freedombone Control Panel" \
|
||||
--inputbox $"Enter the list of email domains to use, separated by semicolons" 8 60 2>$data
|
||||
--inputbox $"Enter the list of email domains to use, separated by semicolons" 8 60 $email_hostnames 2>$data
|
||||
sel=$?
|
||||
case $sel in
|
||||
0)
|
||||
emailhostnames=$(<$data)
|
||||
if [ ${#emailhostnames} -gt 2 ]; then
|
||||
if [[ "$emailhostnames" == *"."* ]]; then
|
||||
if [[ "$emailhostnames" != *" "* ]]; then
|
||||
sed -i "s|dc_other_hostnames=.*|dc_other_hostnames='$emailhostnames'|g" /etc/exim4/update-exim4.conf.conf
|
||||
update-exim4.conf
|
||||
dpkg-reconfigure --frontend noninteractive exim4-config
|
||||
systemctl restart saslauthd
|
||||
dialog --title $"Email Domains" \
|
||||
--backtitle $"Freedombone Control Panel" \
|
||||
--msgbox $"Email domains were changed" 6 50
|
||||
else
|
||||
dialog --title $"Email Domains not set" \
|
||||
--backtitle $"Freedombone Control Panel" \
|
||||
--msgbox $"There should be no spaces in the list" 6 50
|
||||
if [[ "$email_hostnames" != "$emailhostnames" ]]; then
|
||||
if [[ "$emailhostnames" == *"."* ]]; then
|
||||
if [[ "$emailhostnames" != *" "* ]]; then
|
||||
sed -i "s|dc_other_hostnames=.*|dc_other_hostnames='$emailhostnames'|g" /etc/exim4/update-exim4.conf.conf
|
||||
update-exim4.conf
|
||||
dpkg-reconfigure --frontend noninteractive exim4-config
|
||||
systemctl restart saslauthd
|
||||
dialog --title $"Email Domains" \
|
||||
--backtitle $"Freedombone Control Panel" \
|
||||
--msgbox $"Email domains were changed" 6 50
|
||||
else
|
||||
dialog --title $"Email Domains not set" \
|
||||
--backtitle $"Freedombone Control Panel" \
|
||||
--msgbox $"There should be no spaces in the list" 6 50
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue