| 
				
			 | 
			
			
				@@ -4783,14 +4783,11 @@ function configure_email { 
			 | 
		
	
		
			
			| 
				4783
			 | 
			
				4783
			 | 
			
			
				   chown root:Debian-exim /etc/exim4/exim.key /etc/exim4/exim.crt /etc/exim4/exim.dhparam 
			 | 
		
	
		
			
			| 
				4784
			 | 
			
				4784
			 | 
			
			
				   chmod 640 /etc/exim4/exim.key /etc/exim4/exim.crt /etc/exim4/exim.dhparam 
			 | 
		
	
		
			
			| 
				4785
			 | 
			
				4785
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				4786
			 | 
			
				
			 | 
			
			
				-  # create a configuration 
			 | 
		
	
		
			
			| 
				4787
			 | 
			
				
			 | 
			
			
				-  cp /etc/exim4/exim4.conf.template /etc/exim4/exim4.conf 
			 | 
		
	
		
			
			| 
				4788
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				4789
			 | 
			
				
			 | 
			
			
				-  sed -i '/login_saslauthd_server/,/.endif/ s/# *//' /etc/exim4/exim4.conf 
			 | 
		
	
		
			
			| 
				4790
			 | 
			
				
			 | 
			
			
				-  sed -i "/.ifdef MAIN_HARDCODE_PRIMARY_HOSTNAME/i\MAIN_HARDCODE_PRIMARY_HOSTNAME = $DEFAULT_DOMAIN_NAME\nMAIN_TLS_ENABLE = true" /etc/exim4/exim4.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4786
			 | 
			
			
				+  sed -i '/login_saslauthd_server/,/.endif/ s/# *//' /etc/exim4/exim4.conf.template 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4787
			 | 
			
			
				+  sed -i "/.ifdef MAIN_HARDCODE_PRIMARY_HOSTNAME/i\MAIN_HARDCODE_PRIMARY_HOSTNAME = $DEFAULT_DOMAIN_NAME\nMAIN_TLS_ENABLE = true" /etc/exim4/exim4.conf.template 
			 | 
		
	
		
			
			| 
				4791
			 | 
			
				4788
			 | 
			
			
				   sed -i "s|SMTPLISTENEROPTIONS=''|SMTPLISTENEROPTIONS='-oX 465:25:587 -oP /var/run/exim4/exim.pid'|g" /etc/default/exim4 
			 | 
		
	
		
			
			| 
				4792
			 | 
			
				
			 | 
			
			
				-  if ! grep -q "tls_on_connect_ports=465" /etc/exim4/exim4.conf; then 
			 | 
		
	
		
			
			| 
				4793
			 | 
			
				
			 | 
			
			
				-    sed -i '/SSL configuration for exim/i\tls_on_connect_ports=465' /etc/exim4/exim4.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4789
			 | 
			
			
				+  if ! grep -q "tls_on_connect_ports=465" /etc/exim4/exim4.conf.template; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4790
			 | 
			
			
				+    sed -i '/SSL configuration for exim/i\tls_on_connect_ports=465' /etc/exim4/exim4.conf.template 
			 | 
		
	
		
			
			| 
				4794
			 | 
			
				4791
			 | 
			
			
				   fi 
			 | 
		
	
		
			
			| 
				4795
			 | 
			
				4792
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				4796
			 | 
			
				4793
			 | 
			
			
				   adduser $MY_USERNAME sasl 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -4866,7 +4863,7 @@ function spam_filtering { 
			 | 
		
	
		
			
			| 
				4866
			 | 
			
				4863
			 | 
			
			
				   apt-get -y install spamassassin 
			 | 
		
	
		
			
			| 
				4867
			 | 
			
				4864
			 | 
			
			
				   sa-update -v 
			 | 
		
	
		
			
			| 
				4868
			 | 
			
				4865
			 | 
			
			
				   sed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/spamassassin 
			 | 
		
	
		
			
			| 
				4869
			 | 
			
				
			 | 
			
			
				-  sed -i 's/# spamd_address = 127.0.0.1 783/spamd_address = 127.0.0.1 783/g' /etc/exim4/exim4.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4866
			 | 
			
			
				+  sed -i 's/# spamd_address = 127.0.0.1 783/spamd_address = 127.0.0.1 783/g' /etc/exim4/exim4.conf.template 
			 | 
		
	
		
			
			| 
				4870
			 | 
			
				4867
			 | 
			
			
				   # This configuration is based on https://wiki.debian.org/DebianSpamAssassin 
			 | 
		
	
		
			
			| 
				4871
			 | 
			
				4868
			 | 
			
			
				   sed -i 's/local_parts = postmaster/local_parts = postmaster:abuse/g' /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt 
			 | 
		
	
		
			
			| 
				4872
			 | 
			
				4869
			 | 
			
			
				   sed -i '/domains = +local_domains : +relay_to_domains/a\    set acl_m0 = rfcnames' /etc/exim4/conf.d/acl/30_exim4-config_check_rcpt 
			 |