Index: npl/mailserver/kopano_conf/kopano_conf.build
===================================================================
--- npl/mailserver/kopano_conf/kopano_conf.build	(revision aa52b7df2e97853a60f3704d16701f587bf69f27)
+++ npl/mailserver/kopano_conf/kopano_conf.build	(revision 9befa48aedaed6e7459797f502ad0d783ea19588)
@@ -1,1 +1,1 @@
-24
+31
Index: npl/mailserver/kopano_conf/kopano_conf.md5
===================================================================
--- npl/mailserver/kopano_conf/kopano_conf.md5	(revision aa52b7df2e97853a60f3704d16701f587bf69f27)
+++ npl/mailserver/kopano_conf/kopano_conf.md5	(revision 9befa48aedaed6e7459797f502ad0d783ea19588)
@@ -3,7 +3,7 @@
 fd5fac3dcb59c74d9fc0994316749cf2  ./example-config/apparmor.d/usr.sbin.kopano-server
 ce5eb45e78a986fae32ebbdcbb1b844c  ./example-config/ldap.cfg
-1a2a7478a54653008f7303968f871c11  ./kopano_conf.pkg
+2e2ca425f29e228ac2b8f0234c83af84  ./kopano_conf.pkg
 1f5f7d6f71d47c726d70daff8100c56f  ./kopano_conf.SlackBuild
-73ec2cbaeacc40545d9e78574db4cddc  ./kopano_conf.SlackBuild.log.gz
+bedfca364ebabda1130e7801d5f5009f  ./kopano_conf.SlackBuild.log.gz
 8c028c32be066860d48b2f790d1a0e0f  ./root/etc/apache2/conf.d/kopano.conf
 509f4a95bd86ba60c414e0666dd21339  ./root/etc/cron.weekly/kopano_clean
@@ -13,6 +13,6 @@
 17e1514fc431e3f6dacd30d215b013ec  ./root/etc/kopano/dagent.cfg
 9c4545269155c1994f3a0b4939cdd915  ./root/etc/kopano/dspam.cfg
-125db7f424586e70c806e00400e9f1f4  ./root/etc/kopano/gateway.cfg
-a22505c1c8bb4384eb8c17d2e2c8d419  ./root/etc/kopano/ical.cfg
+0dec36477017b814d74f763f8dddc604  ./root/etc/kopano/gateway.cfg
+caf514c5ead6f3463f8e7a5011b9bebd  ./root/etc/kopano/ical.cfg
 15f20282c5d52667887b5f81f9ed1d27  ./root/etc/kopano/kopano.inf
 ae3927a695b6a8a2f6f7c25711b5e32d  ./root/etc/kopano/ldap.cfg
@@ -23,5 +23,5 @@
 e3334758874bfefdde06b10628bb8483  ./root/etc/kopano/presence.cfg
 75b18bb05a4664c0ac691c04c1e30efd  ./root/etc/kopano/search.cfg
-aa650880ca710ae913c9d94c909520c5  ./root/etc/kopano/server.cfg
+14734a631484542c2fedeb962b2d6d32  ./root/etc/kopano/server.cfg
 d6add55726cc61ad5e4ec4a7d7e3f64d  ./root/etc/kopano/spamd.cfg
 c8d9edf1081d5f13d03cddca794c041f  ./root/etc/kopano/spooler.cfg
@@ -41,5 +41,5 @@
 95056928c5e351a922159f93a8f57d2f  ./root/etc/kopano/zcontacts.inf
 61c38fc2330baa42b357af5c1d7cffe5  ./root/etc/php5/mapi.ini
-82fde8d7192feee453bcbc17381195ba  ./root/etc/postinst.d/post.kopano_conf
+af662abd81c9527630e5faf2e308730d  ./root/etc/postinst.d/post.kopano_conf
 cb2078ba94e47f1cde5423615362e097  ./root/service/kopano-dspam/run
 42f02baf49e63eb91c0f7dc979c31dc5  ./root/service/kopano-gateway/run
@@ -51,5 +51,4 @@
 40549bb77378b2635b3adb2f2219517c  ./root/service/kopano-spooler/run
 e65e469379b52767a6075d5db054c652  ./root/var/www/htdocs/syn3/kopano-webapp/config.php
-aec6484b4d06bf9d96df2e5445b2b198  ./root/var/www/htdocs/syn3/kopano-webapp/Kopano Logo.png
 78b2cc65fe10a67a4133c44a86b5e309  ./root/var/www/htdocs/syn3/kopano-webapp/webportal.desc
 ed201f546cd48af679f0676eea47ae73  ./root/var/www/htdocs/syn3/kopano-webapp/webportal.png
Index: npl/mailserver/kopano_conf/root/etc/kopano/gateway.cfg
===================================================================
--- npl/mailserver/kopano_conf/root/etc/kopano/gateway.cfg	(revision aa52b7df2e97853a60f3704d16701f587bf69f27)
+++ npl/mailserver/kopano_conf/root/etc/kopano/gateway.cfg	(revision 9befa48aedaed6e7459797f502ad0d783ea19588)
@@ -29,20 +29,5 @@
 #coredump_enabled = systemdefault
 
-# enable/disable POP3, and POP3 listen port
-pop3_enable	=	yes
-pop3_port	=	110
-
-# enable/disable Secure POP3, and Secure POP3 listen port
-pop3s_enable	=	yes
-pop3s_port	=	995
-
-# enable/disable IMAP, and IMAP listen port
-imap_enable	=	yes
-imap_port	=	143
-
-# enable/disable Secure IMAP, and Secure IMAP listen port
-imaps_enable	=	yes
-imaps_port	=	993
-
+#
 # Only mail folder for IMAP or all subfolders (calendar, contacts, tasks, etc. too)
 imap_only_mailfolders	=	yes
Index: npl/mailserver/kopano_conf/root/etc/kopano/ical.cfg
===================================================================
--- npl/mailserver/kopano_conf/root/etc/kopano/ical.cfg	(revision aa52b7df2e97853a60f3704d16701f587bf69f27)
+++ npl/mailserver/kopano_conf/root/etc/kopano/ical.cfg	(revision 9befa48aedaed6e7459797f502ad0d783ea19588)
@@ -17,15 +17,4 @@
 #server_bind =
 
-# whether normal connections can be made to the ical server
-ical_enable = yes
-
-# port which the ical server listens on for normal connections
-ical_port = 8080
-
-# whether ssl connections can be made to the ical server
-icals_enable = yes
-
-# port which the ical server listens on for ssl connections
-icals_port = 8443
 
 # default connection to the storage server
Index: npl/mailserver/kopano_conf/root/etc/kopano/server.cfg
===================================================================
--- npl/mailserver/kopano_conf/root/etc/kopano/server.cfg	(revision aa52b7df2e97853a60f3704d16701f587bf69f27)
+++ npl/mailserver/kopano_conf/root/etc/kopano/server.cfg	(revision 9befa48aedaed6e7459797f502ad0d783ea19588)
@@ -7,9 +7,5 @@
 #server_bind		=
 
-# Accept normal TCP connections (not recommended to disable)
-server_tcp_enabled	= yes
-
-# Port to bind to
-server_tcp_port		= 236
+
 
 # Accept Unix pipe connections (not recommended to disable)
@@ -183,9 +179,4 @@
 #  SSL SETTINGS
 
-# enable SSL support in server
-server_ssl_enabled	= no
-
-# Listen for SSL connections on this port
-server_ssl_port		= 237
 
 # Required Server certificate, contains the certificate and the private key parts
Index: npl/mailserver/kopano_conf/root/etc/postinst.d/post.kopano_conf
===================================================================
--- npl/mailserver/kopano_conf/root/etc/postinst.d/post.kopano_conf	(revision aa52b7df2e97853a60f3704d16701f587bf69f27)
+++ npl/mailserver/kopano_conf/root/etc/postinst.d/post.kopano_conf	(revision 9befa48aedaed6e7459797f502ad0d783ea19588)
@@ -57,5 +57,5 @@
 
 #create and own stuff
-chown root /etc/kopano/server.cfg || exit 1
+chown kopano /etc/kopano/server.cfg || exit 1
 chmod 700 /etc/kopano/server.cfg || exit 1
 mkdir /var/run/kopano 2>/dev/null
@@ -90,9 +90,21 @@
 
 # fix is neccesary one time, but may be run always
-kopano-dbadm k-1216  || exit 1
+if ! [ -e /etc/kopano/.upgrade-1216-ok ]; then
+	kopano-dbadm k-1216  || exit 1
+	touch /etc/kopano/.upgrade-1216-ok
+fi
+
+# only needed once when upgrading (server can be down)
+if ! [ -e /etc/kopano/.upgrade-usmp-ok ]; then
+	kopano-dbadm usmp || exit 1
+	touch /etc/kopano/.upgrade-usmp-ok
+fi
 
 #create public store (first time only)
 svcstart /service/kopano-server || exit 1
-kopano-admin -s
+if ! [ -e /etc/kopano/.create-publicstore-ok ]; then
+	kopano-admin -s 
+	touch /etc/kopano/.create-publicstore-ok
+fi
 
 
