Open XChange

From WickyWiki
Revision as of 07:24, 5 July 2013 by Admin (talk | contribs) (40 revisions)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Open XChange is difficult to setup, synchronization using Funambol seems not functional at this point and when I had it running it had a very slow interface. However, we have commandline tools and an administrator to cover administrative tasks, the interface looks quite sophisticated.

This guide assumes you have MySQL and Apache2 webserver up and running. An IMAP server is required, you can use a free gmail or yahoo account.

Sources

Some sites:

Keep track of the passwords you use:

  • Open XChange database user
  • Open-Xchange Admin Master
  • Open-Xchange Context Admin
  • Open-Xchange User account

Installation

sudo gedit /etc/apt/sources.list
	#20111012 open Xchange ppa
	deb http://download.opensuse.org/repositories/server:/OX:/ox6/xUbuntu_11.04/ /

sudo apt-get update

Custom install 64Mb:

sudo apt-get install open-xchange open-xchange-authentication-database open-xchange-admin-client open-xchange-admin-lib open-xchange-admin-plugin-hosting open-xchange-admin-plugin-hosting-client open-xchange-admin-plugin-hosting-lib open-xchange-configjump-generic open-xchange-admin-doc open-xchange-contactcollector open-xchange-conversion open-xchange-conversion-engine open-xchange-conversion-servlet open-xchange-crypto open-xchange-data-conversion-ical4j open-xchange-dataretention open-xchange-genconf open-xchange-genconf-mysql open-xchange-imap open-xchange-mailfilter open-xchange-management open-xchange-monitoring open-xchange-passwordchange-database open-xchange-passwordchange-servlet open-xchange-pop3 open-xchange-publish open-xchange-publish-basic open-xchange-publish-infostore-online open-xchange-publish-json open-xchange-publish-microformats open-xchange-push-udp open-xchange-resource-managerequest open-xchange-server open-xchange-settings-extensions open-xchange-smtp open-xchange-spamhandler-default open-xchange-sql open-xchange-subscribe open-xchange-xerces-sun open-xchange-subscribe-json open-xchange-subscribe-microformats open-xchange-subscribe-crawler open-xchange-templating open-xchange-threadpool open-xchange-unifiedinbox open-xchange-admin-plugin-hosting-doc open-xchange-charset open-xchange-group-managerequest open-xchange-i18n open-xchange-jcharset open-xchange-sessiond open-xchange-calendar-printing open-xchange-user-json open-xchange-gui-wizard-plugin open-xchange-report-client open-xchange-configjump-generic-gui open-xchange-gui open-xchange-gui-wizard-plugin-gui open-xchange-online-help-en

Non-LDAP singleserver installation +30Mb:

sudo apt-get install open-xchange-meta-singleserver open-xchange-meta-databaseonly

Create database user

mysql -hlocalhost -uroot -p
	GRANT ALL PRIVILEGES ON configdb.* TO openexchange@'localhost' IDENTIFIED BY '**password**';
	GRANT ALL PRIVILEGES ON `oxdatabase_%`.* TO openexchange@'localhost' IDENTIFIED BY '**password**';
	\q

Create database

Note: the initconfigdb scriptassumes you don't have a MySQL root password, I did a reinstall of MySQL, probably you know a better way.

sudo /opt/open-xchange/sbin/initconfigdb --configdb-pass=**password** -a

Basic configuration

sudo /opt/open-xchange/sbin/oxinstaller --no-license --servername=oxserver --configdb-pass=**password** --master-pass=**password** --ajp-bind-port=localhost --servermemory 512

Start admin:

sudo /etc/init.d/open-xchange-admin stop
sudo /etc/init.d/open-xchange-admin start

Register the local server at the Open-Xchange configdb database:

sudo /opt/open-xchange/sbin/registerserver -n oxserver -A oxadminmaster -P **password**

Create a local directory that should be used as Open-Xchange filestore:

sudo mkdir /var/opt/filestore
sudo chown open-xchange:open-xchange /var/opt/filestore

Register the directory as a filestore, -s <max size MB>:

sudo /opt/open-xchange/sbin/registerfilestore -A oxadminmaster -P **password** -t file:/var/opt/filestore -s 1000

Register the groupware database:

sudo /opt/open-xchange/sbin/registerdatabase -A oxadminmaster -P **password** -n oxdatabase -p **password** -m true

Configure apache2

sudo a2enmod proxy proxy_ajp proxy_balancer expires deflate headers rewrite
sudo /etc/init.d/apache2 force-reload

Configure the mod_proxy_ajp module by creating a new Apache configuration file:

sudo gedit /etc/apache2/conf.d/proxy_ajp.conf
<Location /servlet/axis2/services>
	# restrict access to the soap provisioning API
	Order Deny,Allow
	Deny from all
	Allow from 127.0.0.1
	# you might add more ip addresses / networks here
	# Allow from 192.168 10 172.16
</Location>
<IfModule mod_proxy_ajp.c>
   ProxyRequests Off
   <Proxy balancer://oxcluster>
	   Order deny,allow
	   Allow from all
	   # multiple server setups need to have the hostname inserted instead localhost
	   BalancerMember ajp://localhost:8009 timeout=100 smax=0 ttl=60 retry=60 loadfactor=50 route=OX1
	   # Enable and maybe add additional hosts running OX here
	   # BalancerMember ajp://oxhost2:8009 timeout=100  smax=0 ttl=60 retry=60 loadfactor=50 route=OX2
	   ProxySet stickysession=JSESSIONID
   </Proxy>
   <Proxy /ajax>
	   ProxyPass balancer://oxcluster/ajax
   </Proxy>
   <Proxy /servlet>
	   ProxyPass balancer://oxcluster/servlet
   </Proxy>
   <Proxy /infostore>
	   ProxyPass balancer://oxcluster/infostore
   </Proxy>
   <Proxy /publications>
	   ProxyPass balancer://oxcluster/publications
   </Proxy>
   <Proxy /Microsoft-Server-ActiveSync>
	   ProxyPass balancer://oxcluster/Microsoft-Server-ActiveSync
   </Proxy>
   <Proxy /usm-json>
	   ProxyPass balancer://oxcluster/usm-json
   </Proxy>
</IfModule>

Apache2 default website:

sudo gedit /etc/apache2/sites-available/default
<VirtualHost *:80>
	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/
	<Directory /var/www/>
		AllowOverride None
		Order allow,deny
		allow from all
		RedirectMatch ^/$ /ox6/
	           Options +FollowSymLinks +SymLinksIfOwnerMatch
	</Directory>
	   # deflate
	  AddOutputFilterByType DEFLATE text/html text/plain text/javascript application/javascript text/css text/xml application/xml text/x-js application/x-javascript
	# pre-compressed files
	AddType text/javascript .jsz
	AddType text/css .cssz
	AddType text/xml .xmlz
	AddType text/plain .po
	AddEncoding gzip .jsz .cssz .xmlz
	SetEnvIf Request_URI "\.(jsz|cssz|xmlz)$" no-gzip
	ExpiresActive On
	<Location /ox6>
		    # Expires (via ExpiresByType to override global settings)
		    ExpiresByType image/gif "access plus 6 months"
		    ExpiresByType image/png "access plus 6 months"
		    ExpiresByType image/jpg "access plus 6 months"
		    ExpiresByType image/jpeg "access plus 6 months"
		    ExpiresByType text/css "access plus 6 months"
		    ExpiresByType text/html "access plus 6 months"
		    ExpiresByType text/xml "access plus 6 months"
		    ExpiresByType text/javascript "access plus 6 months"
		    ExpiresByType text/x-js "access plus 6 months"
		    ExpiresByType application/x-javascript "access plus 6 months"
		    ExpiresDefault "access plus 6 months"
		    Header append Cache-Control "private"
		    Header unset Last-Modified
		    Header unset Vary
		    # Strip version
		    RewriteEngine On
		    RewriteRule v=\w+/(.+) $1 [L]
		    # Turn off ETag
		    Header unset ETag
		    FileETag None
	</Location>
	<Location /ox6/ox.html>
		    ExpiresByType text/html "now"
		    ExpiresDefault "now"
		    Header unset Last-Modified
		    Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
		    # Turn off ETag
		    Header unset ETag
		    FileETag None
	</Location>
	<Location /ox6/index.html>
		    ExpiresByType text/html "now"
		    ExpiresDefault "now"
		    Header unset Last-Modified
		    Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
		    # Turn off ETag
		    Header unset ETag
		    FileETag None
	</Location>
</VirtualHost>

Start server:

sudo /etc/init.d/open-xchange-groupware start

Show login page:

firefox localhost

Create default context

sudo /opt/open-xchange/sbin/createcontext -A oxadminmaster -P **password** -c 1 -u oxadmin -d "Context Admin" -g Admin -s User -p **password** -L defaultcontext -e admin@wilbertvolkers.dyndns.org -q 1024 --access-combination-name=all

Create user (e-mail must be different from context e-mail). Note: Open XChange account password must match the IMAP account password:

sudo /opt/open-xchange/sbin/createuser -c 1 -A oxadmin -P **password** -u wilbert -d "Wilbert Volkers" -g Volkers -s User -p **password** -e wilbertvolkers@hotmail.com --imaplogin wilbert --imapserver 127.0.0.1 --smtpserver 127.0.0.1

To allow modification of e-mails:

sudo gedit /opt/open-xchange/etc/admindaemon/User.properties
PRIMARY_MAIL_UNCHANGEABLE=false

In order to make this work you need an IMAP server as it seems to use the IMAP folders for storage. I used a Yahoo IMAP server. The poor performance could be related to the IMAP performance.

Account:

  • imaps://imap.mail.yahoo.com:993
  • account@yahoo.com
  • smtps://smtp.mail.yahoo.com:465

In the database:

  • table: user_mail_account
    • imaps://imap.mail.yahoo.com:993
    • account@yahoo.com
  • table: user_transport_account
    • smtps://smtp.mail.yahoo.com:465
    • account@yahoo.com

Note: Open XChange account password must match the IMAP account password

Administrator GUI

The GUI can be used for various tasks you would otherwise do with the commandline tools.

Site:

wget http://oxgui.sciencesoft.at/psoxgui.0.1.15.tar.gz
sudo tar -C / -xvzf  psoxgui.0.1.15.tar.gz
sudo chown -R open-xchange:open-xchange /opt/open-xchange/etc/psoxgui
#to set default language (is German now) etc:
sudo gedit /opt/open-xchange/etc/psoxgui/psoxgui.properties

sudo /etc/init.d/open-xchange-groupware stop
sudo /etc/init.d/open-xchange-admin stop

sudo /etc/init.d/open-xchange-groupware start
sudo /etc/init.d/open-xchange-admin start

firefox http://wjv5/servlet/webserver/index.html

Open-xchange - funambol connector

It's not working.

sudo -i

	cd /opt/Funambol
	bin/funambol stop

	#http://oxpedia.org/wiki/index.php?title=Open-Xchange_Funambol_7.0
	cd /some_folder
	wget http://download.forge.objectweb.org/sync4j/funambol-ox-module-7.0.8.zip

	#instead of wget use: ox-listener patch - werkt niet
	#http://blog.peter-b.org/2010/12/11/funambol-ox-connector-open-xchange-6-18-server-error-511/

	unzip funambol-ox-module-7.0.8.zip
	cp Funambol/ox-connector/ox-connector-7.0.8.s4j /opt/Funambol/ds-server/modules/
	cd Funambol/ox-listener
	unzip funambol-ox-listener-7.0.8.zip
	cp -r Funambol/* /opt/Funambol/

	sudo gedit /opt/Funambol/ds-server/install.properties
		#20111014 wjv add ",ox-connector-7.0.8"
		modules-to-install=content-provider-10.0.0,email-connector-10.0.0,foundation-10.0.0,phones-support-10.0.0,webdemo-10.0.0,ox-connector-7.0.8

	cd /opt/Funambol
	bin/funambol start
	bin/funambol-server start
	#press y until done:
	./bin/install-modules

exit

sudo gedit /opt/Funambol/bin/ox-listener
	#20111014 wjv configure another port than JMX_PORT=3101
	JMX_PORT=3102
	#20111014 wjv insert line "unset JAVA_HOME" to force bundled java
	unset JAVA_HOME
	if [ -z "$JAVA_HOME" ]; then 
	#20111014 wjv correct wrong jre version, replace "jre-1.5.0" by "jre-1.6.0"

#set property "OXUrl" with value "http://192.168.1.8:80"
sudo gedit /opt/Funambol/config/com/funambol/oxlistener/task/OXListenerTask.xml
	<void property="OXUrl">
		<string>http://192.168.1.8:80</string>
	</void>

#set property "OXUrl" with value "http://192.168.1.8:80"
sudo gedit /opt/Funambol/config/ox/ox/OXConnector.xml
	<void property="OXUrl">
		<string>http://192.168.1.8:80</string>
	</void>

#modify
sudo gedit /opt/Funambol/config/Funambol.xml
	<void property="officer">
		<!-- 20111014 wjv open-xchange modified -->
		<string>com/funambol/server/security/OXOfficer.xml</string>

#note:did not manage to make it start automatically

sudo cp /opt/Funambol/bin/ox-listener /etc/init.d/ox-listener
sudo update-rc.d -f ox-listener defaults
sudo /opt/Funambol/bin/ox-listener start
sudo /opt/Funambol/bin/ox-listener status

#ox-connector needs the jdbc driver
sudo ln -s /usr/share/java/mysql-connector-java.jar /opt/Funambol/ox-listener/lib/

#--------------------(restart)

sudo /opt/Funambol/bin/ox-listener stop
sudo /etc/init.d/open-xchange-groupware stop
sudo /etc/init.d/open-xchange-admin stop
sudo /opt/Funambol/bin/funambol stop

sudo /opt/Funambol/bin/funambol start
sudo /etc/init.d/open-xchange-admin start
sudo /etc/init.d/open-xchange-groupware start
sudo /opt/Funambol/bin/ox-listener start

sudo /opt/Funambol/admin/bin/funamboladmin

Note: the default e-mail account cannot be edited in the interface, it can be edited in the database tables, it seems it must be an IMAP server. If the IMAP is not functional other things may fail as well

Note: funambol user information is automatically overwritten by ox user (name, pwd etc) principle pairs remain

# -------------------- PROBLEM NOTES

http://markmail.org/message/45ippcbar7zqp5ze#query:+page:1+mid:7bcqu2bamb665jro+state:results

#open-xchange.log.0
[2011-10-17 22:03:52,608] [funambol.engine] [ERROR] [39399AC720B90514E0E1BC9DD74DD973] [192.168.1.62] [fwm-00F3F517301060070] [wilbert] [oxcard] Error starting the sync
com.funambol.framework.engine.source.SyncSourceException: Error setting main info for sync session. Error getting the user info from DB.
	at com.funambol.ox.engine.source.OXSyncSource.beginSync(OXSyncSource.java:233)

[2011-10-17 22:03:54,998] [funambol.auth] [ERROR] [90F91B403558397E2A377A627B72434E] [192.168.1.62] [fwm-00F3F517301060070] [] [] Error setting information for the user: wilbert 
com.funambol.ox.exception.OXAccessException: Wrong response while attempting to retrieve config data.
	at com.funambol.ox.items.dao.OXEntityDAO.getUserConfig(OXEntityDAO.java:532)

Oct 18, 2011 11:29:03 PM com.openexchange.mailfilter.ajax.AJAXServlet doGet
SEVERE: MAIL_FILTER-0014 Category=8 Message=Error in low level connection to sieve server imap.mail.yahoo.com at port 2000 exceptionID=-1889291126-8
MAIL_FILTER-0014 Category=8 Message=Error in low level connection to sieve server imap.mail.yahoo.com at port 2000 exceptionID=-1889291126-8
	at com.openexchange.mailfilter.ajax.actions.MailfilterAction.actionConfig(MailfilterAction.java:170)

Oct 17, 2011 9:33:14 PM com.openexchange.mailfilter.ajax.AJAXServlet doGet
SEVERE: MAIL_FILTER-0014 Category=8 Message=Error in low level connection to sieve server imap.mail.yahoo.com at port 2000 exceptionID=-1489271125-426
MAIL_FILTER-0014 Category=8 Message=Error in low level connection to sieve server imap.mail.yahoo.com at port 2000 exceptionID=-1489271125-426

Oct 17, 2011 9:47:52 PM com.openexchange.ajax.Appointment doPut
SEVERE: SVL-0002 Category=8 Message=Exception while parsing JSON: "["undefined"]". exceptionID=-1489271125-453
SVL-0002 Category=8 Message=Exception while parsing JSON: "["undefined"]". exceptionID=-1489271125-453