| 
				
			 | 
			
			
				@@ -8866,7 +8866,7 @@ function install_webmail { 
			 | 
		
	
		
			
			| 
				8866
			 | 
			
				8866
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				8867
			 | 
			
				8867
			 | 
			
			
				     apt-get -y install php5-common php5-cli php5-curl php5-gd php5-mysql php5-mcrypt git 
			 | 
		
	
		
			
			| 
				8868
			 | 
			
				8868
			 | 
			
			
				     apt-get -y install php5-dev imagemagick php5-imagick php5-sqlite php-auth-sasl php-net-smtp php-mime-type 
			 | 
		
	
		
			
			| 
				8869
			 | 
			
				
			 | 
			
			
				-    apt-get -y install php-mail-mime php-mail-mimedecode php-net-ldap3 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8869
			 | 
			
			
				+    apt-get -y install php-mail-mime php-mail-mimedecode php-net-ldap3 php5-pspell 
			 | 
		
	
		
			
			| 
				8870
			 | 
			
				8870
			 | 
			
			
				     pear install Net_IDNA2 
			 | 
		
	
		
			
			| 
				8871
			 | 
			
				8871
			 | 
			
			
				      
			 | 
		
	
		
			
			| 
				8872
			 | 
			
				8872
			 | 
			
			
				     if [ ! -f $WEBMAIL_PATH/index.php ]; then 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -8897,7 +8897,8 @@ function install_webmail { 
			 | 
		
	
		
			
			| 
				8897
			 | 
			
				8897
			 | 
			
			
				         fi 
			 | 
		
	
		
			
			| 
				8898
			 | 
			
				8898
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				8899
			 | 
			
				8899
			 | 
			
			
				     create_database webmail "$WEBMAIL_ADMIN_PASSWORD" 
			 | 
		
	
		
			
			| 
				8900
			 | 
			
				
			 | 
			
			
				- 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8900
			 | 
			
			
				+    mysql -u root --password="$MARIADB_PASSWORD" -D webmail < $WEBMAIL_PATH/SQL/mysql.initial.sql 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8901
			 | 
			
			
				+     
			 | 
		
	
		
			
			| 
				8901
			 | 
			
				8902
			 | 
			
			
				     if [ ! -d /var/www/$DEFAULT_DOMAIN_NAME/htdocs ]; then 
			 | 
		
	
		
			
			| 
				8902
			 | 
			
				8903
			 | 
			
			
				         mkdir -p /var/www/$DEFAULT_DOMAIN_NAME/htdocs 
			 | 
		
	
		
			
			| 
				8903
			 | 
			
				8904
			 | 
			
			
				     fi   
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -8921,35 +8922,36 @@ function install_webmail { 
			 | 
		
	
		
			
			| 
				8921
			 | 
			
				8922
			 | 
			
			
				     echo 'server {' > /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8922
			 | 
			
				8923
			 | 
			
			
				     echo "  listen 127.0.0.1:$WEBMAIL_ONION_PORT default_server;" >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8923
			 | 
			
				8924
			 | 
			
			
				     echo "  server_name $WEBMAIL_ONION_HOSTNAME;" >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8924
			 | 
			
				
			 | 
			
			
				-    echo '' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8925
			 | 
			
			
				+    echo "  root ${WEBMAIL_PATH};" >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8926
			 | 
			
			
				+    echo '  index index.php index.html index.htm;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8925
			 | 
			
				8927
			 | 
			
			
				     echo '  access_log off;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8926
			 | 
			
				8928
			 | 
			
			
				     echo '  error_log off;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8927
			 | 
			
				
			 | 
			
			
				-    echo '' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8928
			 | 
			
				
			 | 
			
			
				-    echo "  root ${WEBMAIL_PATH};" >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8929
			 | 
			
				
			 | 
			
			
				-    echo '  index index.php;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8930
			 | 
			
				
			 | 
			
			
				-    echo '' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8931
			 | 
			
				
			 | 
			
			
				-    echo '  location ~ \.php {' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8932
			 | 
			
				
			 | 
			
			
				-    echo '    include snippets/fastcgi-php.conf;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8933
			 | 
			
				
			 | 
			
			
				-    echo '    fastcgi_pass unix:/var/run/php5-fpm.sock;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8929
			 | 
			
			
				+    echo '  location / {' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8930
			 | 
			
			
				+    echo '    try_files $uri $uri/ /index.php?q=$uri&$args;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8934
			 | 
			
				8931
			 | 
			
			
				     echo '  }' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8935
			 | 
			
				
			 | 
			
			
				-    echo '' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8936
			 | 
			
				
			 | 
			
			
				-    echo '  location ~ \.php {' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8937
			 | 
			
				
			 | 
			
			
				-    echo '    include snippets/fastcgi-php.conf;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8938
			 | 
			
				
			 | 
			
			
				-    echo '    fastcgi_pass unix:/var/run/php5-fpm.sock;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8932
			 | 
			
			
				+    echo '  error_page 404 /404.html;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8933
			 | 
			
			
				+    echo '  error_page 500 502 503 504 /50x.html;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8934
			 | 
			
			
				+    echo '  location = /50x.html {' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8935
			 | 
			
			
				+    echo "    root ${WEBMAIL_PATH};" >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8939
			 | 
			
				8936
			 | 
			
			
				     echo '  }' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8940
			 | 
			
				
			 | 
			
			
				-    echo '' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8941
			 | 
			
				
			 | 
			
			
				-    echo '  location / {' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8942
			 | 
			
				
			 | 
			
			
				-    echo '    try_files $uri $uri/ @webmail;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8937
			 | 
			
			
				+    echo '  location ~ ^/(README.md|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8938
			 | 
			
			
				+    echo '    deny all;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8943
			 | 
			
				8939
			 | 
			
			
				     echo '  }' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8944
			 | 
			
				
			 | 
			
			
				-    echo '' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8945
			 | 
			
				
			 | 
			
			
				-    echo '  location @webmail {' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8946
			 | 
			
				
			 | 
			
			
				-    echo '    rewrite ^(.*)$ /index.php?p=$1 last;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8940
			 | 
			
			
				+    echo '  location ~ ^/(config|temp|logs)/ {' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8941
			 | 
			
			
				+    echo '    deny all;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8947
			 | 
			
				8942
			 | 
			
			
				     echo '  }' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8948
			 | 
			
				
			 | 
			
			
				-    echo '' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8949
			 | 
			
				
			 | 
			
			
				-    echo '  location ~ /\.(git) {' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8943
			 | 
			
			
				+    echo '  location ~ /\. {' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8950
			 | 
			
				8944
			 | 
			
			
				     echo '    deny all;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8945
			 | 
			
			
				+    echo '    access_log off;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8946
			 | 
			
			
				+    echo '    log_not_found off;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8947
			 | 
			
			
				+    echo '  }' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8948
			 | 
			
			
				+    echo '  location ~ \.php$ {' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8949
			 | 
			
			
				+    echo '    try_files $uri =404;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8950
			 | 
			
			
				+    echo '    fastcgi_pass unix:/var/run/php5-fpm.sock;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8951
			 | 
			
			
				+    echo '    fastcgi_index index.php;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8952
			 | 
			
			
				+    echo '    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				
			 | 
			
				8953
			 | 
			
			
				+    echo '    include fastcgi_params;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8951
			 | 
			
				8954
			 | 
			
			
				     echo '  }' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8952
			 | 
			
				
			 | 
			
			
				-    echo '' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8953
			 | 
			
				8955
			 | 
			
			
				     echo '  add_header X-Frame-Options DENY;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8954
			 | 
			
				8956
			 | 
			
			
				     echo '  add_header X-Content-Type-Options nosniff;' >> /etc/nginx/sites-available/webmail 
			 | 
		
	
		
			
			| 
				8955
			 | 
			
				8957
			 | 
			
			
				     echo '  client_max_body_size 15m;' >> /etc/nginx/sites-available/webmail 
			 |