| 
				
			 | 
			
			
				@@ -4004,25 +4004,19 @@ function encrypt_outgoing_email { 
			 | 
		
	
		
			
			| 
				4004
			 | 
			
				4004
			 | 
			
			
				       return 
			 | 
		
	
		
			
			| 
				4005
			 | 
			
				4005
			 | 
			
			
				   fi 
			 | 
		
	
		
			
			| 
				4006
			 | 
			
				4006
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				4007
			 | 
			
				
			 | 
			
			
				-  echo 'sent_items_router:' > /etc/exim4/conf.d/router/170_exim4-config_encryptsent 
			 | 
		
	
		
			
			| 
				4008
			 | 
			
				
			 | 
			
			
				-  echo '   driver    = accept' >> /etc/exim4/conf.d/router/170_exim4-config_encryptsent 
			 | 
		
	
		
			
			| 
				4009
			 | 
			
				
			 | 
			
			
				-  echo '   transport = sent_items_transport' >> /etc/exim4/conf.d/router/170_exim4-config_encryptsent 
			 | 
		
	
		
			
			| 
				4010
			 | 
			
				
			 | 
			
			
				-  echo '   condition = ${if !eq{$authenticated_id}{}}' >> /etc/exim4/conf.d/router/170_exim4-config_encryptsent 
			 | 
		
	
		
			
			| 
				4011
			 | 
			
				
			 | 
			
			
				-  echo '   unseen' >> /etc/exim4/conf.d/router/170_exim4-config_encryptsent 
			 | 
		
	
		
			
			| 
				4012
			 | 
			
				
			 | 
			
			
				-  echo '   no_verify' >> /etc/exim4/conf.d/router/170_exim4-config_encryptsent 
			 | 
		
	
		
			
			| 
				4013
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				4014
			 | 
			
				
			 | 
			
			
				-  # TODO 
			 | 
		
	
		
			
			| 
				4015
			 | 
			
				
			 | 
			
			
				-  echo 'sent_items_transport:' 
			 | 
		
	
		
			
			| 
				4016
			 | 
			
				
			 | 
			
			
				-  echo '   driver           = pipe' 
			 | 
		
	
		
			
			| 
				4017
			 | 
			
				
			 | 
			
			
				-  echo '   user             = $authenticated_id' 
			 | 
		
	
		
			
			| 
				4018
			 | 
			
				
			 | 
			
			
				-  echo '   group            = Debian-exim' 
			 | 
		
	
		
			
			| 
				4019
			 | 
			
				
			 | 
			
			
				-  echo '   temp_errors      = *' 
			 | 
		
	
		
			
			| 
				4020
			 | 
			
				
			 | 
			
			
				-  echo '   transport_filter = /usr/bin/gpgit.pl $sender_address' 
			 | 
		
	
		
			
			| 
				4021
			 | 
			
				
			 | 
			
			
				-  echo '   command          = /usr/bin/pipe2imap.pl --ssl --user master --authas $authenticated_id --passfile /etc/exim4/master_imap_password.txt --folder "Sent Items" --flags "\\seen"' 
			 | 
		
	
		
			
			| 
				4022
			 | 
			
				
			 | 
			
			
				-  echo '   log_defer_output = true' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4007
			 | 
			
			
				+  if [ ! -d /home/$MY_USERNAME/.gnupg ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4008
			 | 
			
			
				+	  return 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4009
			 | 
			
			
				+  fi 
			 | 
		
	
		
			
			| 
				4023
			 | 
			
				4010
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				4024
			 | 
			
				
			 | 
			
			
				-  service exim4 restart 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4011
			 | 
			
			
				+  if [ ! $MY_GPG_PUBLIC_KEY_ID ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4012
			 | 
			
			
				+      MY_GPG_PUBLIC_KEY_ID=$(su -c "gpg --list-keys $MY_EMAIL_ADDRESS | grep 'pub '" - $MY_USERNAME | awk -F ' ' '{print $2}' | awk -F '/' '{print $2}') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4013
			 | 
			
			
				+      if [ ! $MY_GPG_PUBLIC_KEY_ID ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4014
			 | 
			
			
				+	      return 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4015
			 | 
			
			
				+      fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4016
			 | 
			
			
				+  fi 
			 | 
		
	
		
			
			| 
				4025
			 | 
			
				4017
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				4018
			 | 
			
			
				+  sed -i "s|#encrypt-to .*|hidden-encrypt-to $MY_GPG_PUBLIC_KEY_ID|g" /home/$MY_USERNAME/.gnupg/gpg.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4019
			 | 
			
			
				+   
			 | 
		
	
		
			
			| 
				4026
			 | 
			
				4020
			 | 
			
			
				   echo 'encrypt_outgoing_email' >> $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				4027
			 | 
			
				4021
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				4028
			 | 
			
				4022
			 | 
			
			
				  
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -7046,7 +7040,7 @@ create_procmail 
			 | 
		
	
		
			
			| 
				7046
			 | 
			
				7040
			 | 
			
			
				 configure_imap 
			 | 
		
	
		
			
			| 
				7047
			 | 
			
				7041
			 | 
			
			
				 configure_gpg 
			 | 
		
	
		
			
			| 
				7048
			 | 
			
				7042
			 | 
			
			
				 encrypt_incoming_email 
			 | 
		
	
		
			
			| 
				7049
			 | 
			
				
			 | 
			
			
				-#encrypt_outgoing_email 
			 | 
		
	
		
			
			| 
				
			 | 
			
				7043
			 | 
			
			
				+encrypt_outgoing_email 
			 | 
		
	
		
			
			| 
				7050
			 | 
			
				7044
			 | 
			
			
				 email_client 
			 | 
		
	
		
			
			| 
				7051
			 | 
			
				7045
			 | 
			
			
				 configure_firewall_for_email 
			 | 
		
	
		
			
			| 
				7052
			 | 
			
				7046
			 | 
			
			
				 folders_for_mailing_lists 
			 |