Index: npl/mailserver/kopano_conf/root/etc/kopano/licensed.cfg
===================================================================
--- npl/mailserver/kopano_conf/root/etc/kopano/licensed.cfg	(revision 84898b92427ab43677bfa70446cbedf778328a05)
+++ 	(revision )
@@ -1,39 +1,0 @@
-##############################################################
-# SERVER SETTINGS
-
-# The socket that the license server will run on
-# default: /var/run/kopano-licensed
-server_pipe_name = /var/run/kopanod/kopano-licensed
-
-# The URL on which we can contact kopano-server
-server_socket = file:///var/run/kopanod/prio.sock
-
-# License path (should contain 'base' and CALs in other files)
-license_path		= /etc/kopano/license
-
-# drop privileges and run the process as this user
-run_as_user		= kopano
-
-# drop privileges and run the process as this group
-run_as_group		= kopano
-
-# create a pid file for stopping the service via the init.d scripts
-pid_file		= /var/run/kopano-licensed.pid
-
-# run server in this path (when not using the -F switch)
-running_path = /
-
-##############################################################
-# LOG SETTINGS
-
-# Logging method (syslog, eventlog, file)
-log_method		= file
-
-# Logfile (for log_method = file, '-' for stderr)
-log_file		= /var/log/kopano/licensed.log
-
-# Loglevel (0=no logging, 5=full logging)
-log_level		= 2
-
-# Log timestamp - prefix each log line with timestamp in 'file' logging mode
-log_timestamp		= 1
Index: npl/mailserver/kopano_conf/root/etc/kopano/server.cfg
===================================================================
--- npl/mailserver/kopano_conf/root/etc/kopano/server.cfg	(revision 84898b92427ab43677bfa70446cbedf778328a05)
+++ npl/mailserver/kopano_conf/root/etc/kopano/server.cfg	(revision 6165e17e8aca2eb6d6c21d4cdd7daad9c7596626)
@@ -84,5 +84,5 @@
 
 # The user under which we connect with MySQL
-mysql_user		= kopano
+mysql_user		= zarafa
 
 # The password for the user (leave empty for no password)
@@ -90,5 +90,5 @@
 
 # Database to connect to
-mysql_database		= kopano
+mysql_database		= zarafa
 
 # Where to place attachments. Value can be 'database' or 'files'
@@ -375,6 +375,2 @@
 # and the value of '*' is used to indicate that all connections are proxied
 proxy_header =
-
-
-
-
Index: npl/mailserver/kopano_conf/root/etc/postinst.d/post.kopano_conf
===================================================================
--- npl/mailserver/kopano_conf/root/etc/postinst.d/post.kopano_conf	(revision 84898b92427ab43677bfa70446cbedf778328a05)
+++ npl/mailserver/kopano_conf/root/etc/postinst.d/post.kopano_conf	(revision 6165e17e8aca2eb6d6c21d4cdd7daad9c7596626)
@@ -2,13 +2,33 @@
 /sbin/postinst.sh post.openldap || exit 1
 
+#cleanup old zarafa stuff
+removepkg /var/log/packages/zarafa7*
+touch /var/log/packages/zarafa7-9-i586-9999
+
+removepkg /var/log/packages/zarafa_conf7*
+touch /var/log/packages/zarafa_conf7-9-i586-9999
+rm /usr/lib/python2.7/site-packages/zarafa*
+
+removepkg /var/log/packages/zarafa_licensed*
+touch /var/log/packages/zarafa_licensed-9-i586-9999
+
+removepkg /var/log/packages/zarafa_mdm*
+touch /var/log/packages/zarafa_mdm-9-noarch-9999
+
+removepkg /var/log/packages/zarafa_spamd*
+touch /var/log/packages/zarafa_spamd-9-i586-9999
+
+removepkg /var/log/packages/zarafa_webaccess*
+touch /var/log/packages/zarafa_webaccess-9-i586-9999
+touch /var/log/packages/zarafa_webaccess_muc-9-noarch-9999
+
+removepkg /var/log/packages/zarafa_webapp*
+touch /var/log/packages/zarafa_webapp-9-noarch-9999
+
+rm -rf /service/zarafa-* /etc/zarafa /usr/lib/python2.7/site-packages/zarafa* /var/www/htdocs/syn3/zarafa* /var/run/zarafa* /home/system/zarafa_webapp/ /home/system/zarafa_spamd
+rm -rf /home/system/zarafa_index/
+
+
 ldconfig #neccesary to fix hang-problems after updates?
-
-####### Cyrus stuff
-#make sure kopano imap stays down if the server uses cyrus
-if svstat /service/cyrus-imapd/|grep up; then
-	svcstop /service/kopano-gateway || exit 1
-	touch /service/kopano-gateway/down
-fi
-
 
 
@@ -16,11 +36,12 @@
 svcstart /service/mysql || exit 1
 
-echo | syn3-mysqlcreate kopano /etc/kopano/server.cfg || exit 1
+#keep database name zarafa, because we need to migrate existing db's
+echo | syn3-mysqlcreate zarafa /etc/kopano/server.cfg || exit 1
 
 
 ############# KOPANO STUFF
 
-useradd kopano 
-groupadd kopano 
+useradd kopano
+groupadd kopano
 useradd kopano-gateway
 
@@ -28,18 +49,21 @@
 chown root /etc/kopano/server.cfg || exit 1
 chmod 700 /etc/kopano/server.cfg || exit 1
-chown kopano /var/lib/kopano
-mkdir /var/run/kopanod 2>/dev/null
-chmod 775 /var/run/kopanod
-chown kopano:kopano /var/run/kopanod
+mkdir /var/run/kopano 2>/dev/null
+chmod 775 /var/run/kopano
+chown kopano:kopano /var/run/kopano
 
 #logging
 mkdir /var/log/kopano
 chown kopano /var/log/kopano || exit 1
-touch /var/log/kopano/gateway.log || exit 1
-chown kopano-gateway /var/log/kopano/gateway.log || exit 1
 
 #attachments
-mkdir /home/system/kopano 
-chown kopano /home/system/kopano || exit 1
+#migrate from zarafa?
+if [ -e /home/system/zarafa ]; then
+	chown kopano:kopano /home/system/zarafa
+	mv /home/system/zarafa /home/system/kopano
+else
+	mkdir /home/system/kopano
+	chown kopano /home/system/kopano || exit 1
+fi
 
 #search index
@@ -47,30 +71,15 @@
 chown kopano /home/system/kopano_index || exit 1
 
+
 #create public store (first time only)
 svcstart /service/kopano-server || exit 1
-kopano-admin -s 
+kopano-admin -s
 
 svcreset /service/kopano-server
 svcreset /service/mysql
 
-#remove old indexer stuff
-svc -d /service/kopano-indexer &>/dev/null
-rm -rf /service/kopano-indexer/ &>/dev/null
-
-#licensed 
-rm -rf /service/kopano-licenced #typo
-
-#remove obsolete mobile stuff
-rm -rf /var/www/htdocs/syn3/kopano-mobile/ &>/dev/null
-
-#webapp stuff
-mkdir -p /home/system/kopano_webapp &>/dev/null
-chown nobody /home/system/kopano_webapp
-
 #dagent stuff
 touch /var/log/kopano/dagent.log
 chown alias /var/log/kopano/dagent.log
-#kopano-dagent expect autoresponder in differen place (weird)
-ln -s /usr/bin/kopano-autorespond /usr/sbin/kopano-autorespond 2>/dev/null
 
 #spamd stuff
@@ -98,20 +107,4 @@
 svcreset /service/slapd || exit 1
 
-######## cleanup
-#old versions leave behind some unused libs
-removepkg /var/log/packages/kopano7-7.1* /var/log/packages/kopano-* 2>/dev/null
-touch /var/log/packages/kopano-999-i586-9999 #prevent reinstall
-rm /usr/lib/libkopanoclient.so /usr/lib/libkopanocontacts.so 2>/dev/null
-
-#old webapp plugins give conflicts
-removepkg /var/log/packages/kopano_webapp-1* /var/log/packages/kopano_webapp-2.1.*
-cd /var/www/htdocs/syn3/kopano_webapp/plugins/
-rm -rf example/ zperformance/ webodf/ twidget/ spreed/ shellgame/ salesforce/ oauthlib/ feedback/ facebook/ extbox/ dropboxattachment/ sugarcrm/ statslogging/ facebookwidget/ pdfbox/
-cd
-
-#delete old indexer index db 
-rm /home/system/kopano_index/state-* /home/system/kopano_index/*.kct /home/system/kopano_index/*.tmpkct 2>/dev/null
-
-
 
 
Index: npl/mailserver/kopano_conf/root/service/kopano-licensed/run
===================================================================
--- npl/mailserver/kopano_conf/root/service/kopano-licensed/run	(revision 84898b92427ab43677bfa70446cbedf778328a05)
+++ 	(revision )
@@ -1,3 +1,0 @@
-#!/bin/bash
-
-GCONV_PATH=/opt/kopano-licensed/lib LD_LIBRARY_PATH=/opt/kopano-licensed/lib/ exec /opt/kopano-licensed/lib/ld-linux.so.2 /opt/kopano-licensed/bin/kopano-licensed -F
