| 
				
			 | 
			
			
				@@ -431,7 +431,39 @@ function select_user { 
			 | 
		
	
		
			
			| 
				431
			 | 
			
				431
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				432
			 | 
			
				432
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				433
			 | 
			
				433
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				434
			 | 
			
				
			 | 
			
			
				-function smtp_proxy { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				434
			 | 
			
			
				+function email_extra_domains { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				435
			 | 
			
			
				+    email_hostnames=$(cat /etc/exim4/update-exim4.conf.conf | grep "dc_other_hostnames" | awk -F "'" '{print $2}') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				436
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				437
			 | 
			
			
				+    data=$(tempfile 2>/dev/null) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				438
			 | 
			
			
				+    trap "rm -f $data" 0 1 2 5 15 
			 | 
		
	
		
			
			| 
				
			 | 
			
				439
			 | 
			
			
				+    dialog --title $"Email Domains" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				440
			 | 
			
			
				+           --backtitle $"Freedombone Control Panel" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				441
			 | 
			
			
				+           --inputbox $"Enter the list of email domains to use, separated by semicolons" 8 60 2>$data 
			 | 
		
	
		
			
			| 
				
			 | 
			
				442
			 | 
			
			
				+    sel=$? 
			 | 
		
	
		
			
			| 
				
			 | 
			
				443
			 | 
			
			
				+    case $sel in 
			 | 
		
	
		
			
			| 
				
			 | 
			
				444
			 | 
			
			
				+        0) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				445
			 | 
			
			
				+            emailhostnames=$(<$data) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				446
			 | 
			
			
				+            if [ ${#emailhostnames} -gt 2 ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				447
			 | 
			
			
				+                if [[ "$emailhostnames" == *"."* ]]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				448
			 | 
			
			
				+                    if [[ "$emailhostnames" != *" "* ]]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				449
			 | 
			
			
				+                        sed -i "s|dc_other_hostnames=.*|dc_other_hostnames='$emailhostnames'|g" /etc/exim4/update-exim4.conf.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				450
			 | 
			
			
				+                        update-exim4.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				451
			 | 
			
			
				+                        systemctl restart saslauthd 
			 | 
		
	
		
			
			| 
				
			 | 
			
				452
			 | 
			
			
				+                        dialog --title $"Email Domains" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				453
			 | 
			
			
				+                               --backtitle $"Freedombone Control Panel" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				454
			 | 
			
			
				+                               --msgbox $"Email domains were changed" 6 50 
			 | 
		
	
		
			
			| 
				
			 | 
			
				455
			 | 
			
			
				+                    else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				456
			 | 
			
			
				+                        dialog --title $"Email Domains not set" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				457
			 | 
			
			
				+                               --backtitle $"Freedombone Control Panel" \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				458
			 | 
			
			
				+                               --msgbox $"There should be no spaces in the list" 6 50 
			 | 
		
	
		
			
			| 
				
			 | 
			
				459
			 | 
			
			
				+                    fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				460
			 | 
			
			
				+                fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				461
			 | 
			
			
				+            fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				462
			 | 
			
			
				+            ;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				463
			 | 
			
			
				+    esac 
			 | 
		
	
		
			
			| 
				
			 | 
			
				464
			 | 
			
			
				+} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				465
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				466
			 | 
			
			
				+function email_smtp_proxy { 
			 | 
		
	
		
			
			| 
				435
			 | 
			
				467
			 | 
			
			
				     MUTTRC_FILE=/home/$ADMIN_USER/.muttrc 
			 | 
		
	
		
			
			| 
				436
			 | 
			
				468
			 | 
			
			
				     if [ ! -f $MUTTRC_FILE ]; then 
			 | 
		
	
		
			
			| 
				437
			 | 
			
				469
			 | 
			
			
				         return 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -1780,15 +1812,16 @@ function menu_top_level { 
			 | 
		
	
		
			
			| 
				1780
			 | 
			
				1812
			 | 
			
			
				                9 $"Manage Users" off \ 
			 | 
		
	
		
			
			| 
				1781
			 | 
			
				1813
			 | 
			
			
				                10 $"Email Filtering Rules" off \ 
			 | 
		
	
		
			
			| 
				1782
			 | 
			
				1814
			 | 
			
			
				                11 $"Outgoing Email Proxy" off \ 
			 | 
		
	
		
			
			| 
				1783
			 | 
			
				
			 | 
			
			
				-               12 $"Security Settings" off \ 
			 | 
		
	
		
			
			| 
				1784
			 | 
			
				
			 | 
			
			
				-               13 $"Set the main repository (repo mirrors)" off \ 
			 | 
		
	
		
			
			| 
				1785
			 | 
			
				
			 | 
			
			
				-               14 $"Change the name of this system" off \ 
			 | 
		
	
		
			
			| 
				1786
			 | 
			
				
			 | 
			
			
				-               15 $"Set a static local IP address" off \ 
			 | 
		
	
		
			
			| 
				1787
			 | 
			
				
			 | 
			
			
				-               16 $"Wifi menu" off \ 
			 | 
		
	
		
			
			| 
				1788
			 | 
			
				
			 | 
			
			
				-               17 $"Check for updates" off \ 
			 | 
		
	
		
			
			| 
				1789
			 | 
			
				
			 | 
			
			
				-               18 $"Power off the system" off \ 
			 | 
		
	
		
			
			| 
				1790
			 | 
			
				
			 | 
			
			
				-               19 $"Restart the system" off \ 
			 | 
		
	
		
			
			| 
				1791
			 | 
			
				
			 | 
			
			
				-               20 $"Exit" on 2> $data 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1815
			 | 
			
			
				+               12 $"Extra email domains" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1816
			 | 
			
			
				+               13 $"Security Settings" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1817
			 | 
			
			
				+               14 $"Set the main repository (repo mirrors)" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1818
			 | 
			
			
				+               15 $"Change the name of this system" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1819
			 | 
			
			
				+               16 $"Set a static local IP address" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1820
			 | 
			
			
				+               17 $"Wifi menu" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1821
			 | 
			
			
				+               18 $"Check for updates" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1822
			 | 
			
			
				+               19 $"Power off the system" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1823
			 | 
			
			
				+               20 $"Restart the system" off \ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1824
			 | 
			
			
				+               21 $"Exit" on 2> $data 
			 | 
		
	
		
			
			| 
				1792
			 | 
			
				1825
			 | 
			
			
				         sel=$? 
			 | 
		
	
		
			
			| 
				1793
			 | 
			
				1826
			 | 
			
			
				         case $sel in 
			 | 
		
	
		
			
			| 
				1794
			 | 
			
				1827
			 | 
			
			
				             1) exit 1;; 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -1805,16 +1838,17 @@ function menu_top_level { 
			 | 
		
	
		
			
			| 
				1805
			 | 
			
				1838
			 | 
			
			
				             8) ping_enable_disable;; 
			 | 
		
	
		
			
			| 
				1806
			 | 
			
				1839
			 | 
			
			
				             9) menu_users;; 
			 | 
		
	
		
			
			| 
				1807
			 | 
			
				1840
			 | 
			
			
				             10) menu_email;; 
			 | 
		
	
		
			
			| 
				1808
			 | 
			
				
			 | 
			
			
				-            11) smtp_proxy;; 
			 | 
		
	
		
			
			| 
				1809
			 | 
			
				
			 | 
			
			
				-            12) security_settings;; 
			 | 
		
	
		
			
			| 
				1810
			 | 
			
				
			 | 
			
			
				-            13) set_main_repo;; 
			 | 
		
	
		
			
			| 
				1811
			 | 
			
				
			 | 
			
			
				-            14) change_system_name;; 
			 | 
		
	
		
			
			| 
				1812
			 | 
			
				
			 | 
			
			
				-            15) set_static_IP;; 
			 | 
		
	
		
			
			| 
				1813
			 | 
			
				
			 | 
			
			
				-            16) menu_wifi;; 
			 | 
		
	
		
			
			| 
				1814
			 | 
			
				
			 | 
			
			
				-            17) check_for_updates;; 
			 | 
		
	
		
			
			| 
				1815
			 | 
			
				
			 | 
			
			
				-            18) shut_down_system;; 
			 | 
		
	
		
			
			| 
				1816
			 | 
			
				
			 | 
			
			
				-            19) restart_system;; 
			 | 
		
	
		
			
			| 
				1817
			 | 
			
				
			 | 
			
			
				-            20) break;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1841
			 | 
			
			
				+            11) email_smtp_proxy;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1842
			 | 
			
			
				+            12) email_extra_domains;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1843
			 | 
			
			
				+            13) security_settings;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1844
			 | 
			
			
				+            14) set_main_repo;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1845
			 | 
			
			
				+            15) change_system_name;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1846
			 | 
			
			
				+            16) set_static_IP;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1847
			 | 
			
			
				+            17) menu_wifi;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1848
			 | 
			
			
				+            18) check_for_updates;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1849
			 | 
			
			
				+            19) shut_down_system;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1850
			 | 
			
			
				+            20) restart_system;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				1851
			 | 
			
			
				+            21) break;; 
			 | 
		
	
		
			
			| 
				1818
			 | 
			
				1852
			 | 
			
			
				         esac 
			 | 
		
	
		
			
			| 
				1819
			 | 
			
				1853
			 | 
			
			
				     done 
			 | 
		
	
		
			
			| 
				1820
			 | 
			
				1854
			 | 
			
			
				 } 
			 |