Skip to content
Snippets Groups Projects
Commit a6a91187 authored by Bob Mottram's avatar Bob Mottram
Browse files

Displaying email hostnames

parent 010757a1
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment