$OpenBSD: README-main,v 1.2 2011/01/15 23:53:35 ajacoutot Exp $

*** Upgrading users: refer to zarafa documentation on the web to check
*** if any particular step is required after upgrading to a new version. 
    http://doc.zarafa.com/6.40/Administrator_Manual/en-US/html-single/index.html#_performing_the_upgrade

Post-install/update instructions for Zarafa
===========================================

By default the server is configured to accept SOAP connections on port
236. If you wish to connect Outlook clients on port 80, please setup
your web server to proxy HTTP requests with URI=/zarafa to
http://localhost:236.

It is advised to tune the MySQL installation according to:
    http://zarafa.com/wiki/index.php/MySQL_tuning
(especially for max_allowed_packet)


Before Starting zarafa-server for the first time
------------------------------------------------

* a MySQL datatabase access needs to be configured in
    /etc/zarafa/server.cfg


After zarafa-server was started for the first time
--------------------------------------------------

* Creating the public store.
    # /usr/local/bin/zarafa-admin -s

* Adding an admin user -- see zarafa-admin(1).
    # /usr/local/bin/zarafa-admin -c zadmin -p secret -e zarafa.admin@domain.tld -f "John Doe" -a 2


Mail delivery agent configuration
---------------------------------

The easiest way to use zarafa-dagent system-wide under a stock OpenBSD
sendmail(8) installation is to use procmail(1).
See the following URL for other MTA integration:
    http://www.zarafa.com/?q=en/faq/61

Anyway, here are the 3 ways of integrating Zarafa with sendmail(8).

* Using procmail.

First, install the procmail package and configure /etc/procmailrc
the following way:
 
:0 w
| /usr/local/bin/zarafa-dagent $LOGNAME
EXITCODE=$?

Next, you need to add the following line to your sendmail.mc file then
restart sendmail(8):
    FEATURE(`local_procmail')dnl

* Configuring sendmail to use the zarafa-dagent directly.

To enable the Zarafa dagent delivery from localhost, add the following
lines to your sendmail.mc and restart sendmail(8):
    FEATURE(`local_zarafa')dnl
To enable the Zarafa dagent for all other deliveries, add the following:
    MAILER(`zarafa')dnl

* Using a .forward file.

Add the following .forward file under the user(s) home directory that
will use Zarafa:
"|/usr/local/bin/zarafa-dagent <username>"

You can automate this step by copying
    /usr/local/share/examples/zarafa/createuser.dotforward
to
    /etc/zarafa/userscripts/createuser.d/
The .forward will be automatically generated when a new user is added to
Zarafa.


Zarafa webaccess
----------------

Zarafa webaccess is installed under
    /var/www/zarafa-webaccess

You should point the followings to the DocumentRoot of your web-server:
    # ln -s ../zarafa-webaccess /var/www/htdocs/webaccess
(make sure you use a relative symlink since Apache is chrooted)

You need to edit the config.php file installed under
/var/www/zarafa-webaccess for regular web client access.

With Apache, AllowOverride settings are required on the /var/www/zarafa-webaccess
directory. You can configure this as follows:
    # ln -s /var/www/conf/modules.sample/zarafa.conf \
      /var/www/conf/modules

If you want to debug the webaccess, copy the following file
   /var/www/zarafa-webaccess/debug.php.disabled
to
   /var/www/zarafa-webaccess/debug.php
The debugging output will then be available under:
   /var/www/zarafa-webaccess/debug.txt

You can enable the PHP mapi module by creating a symbolic
link from /var/www/conf/php5.sample/mapi.ini to
/var/www/conf/php5/mapi.ini:

    # ln -fs /var/www/conf/php5.sample/mapi.ini \
      /var/www/conf/php5/mapi.ini


The PHP mapi module and OpenBSD Apache
--------------------------------------

When using the OpenBSD Apache server, the runtime loader will need to
pre-load the pthread shared library. While the php binary is linked with
-pthread, httpd is not and the PHP mapi module needs
the pthread_mutex_init(3) function.
To do so, we need to start httpd with LD_PRELOAD set in /etc/rc.local
(do not set httpd_flags in rc.conf(8)).
e.g:

rm -f /var/www/logs/{ssl_mutex,httpd.lock,accept.lock}.*
echo -n ' httpd'
LD_PRELOAD=/usr/lib/libpthread.so /usr/sbin/httpd -DSSL


Documentation and help
----------------------

Each zarafa-* command has its corresponding manpage.

Some documentation is also available on the Internet:
    http://www.zarafa.com/wiki/index.php/Main_Page
    http://www.zarafa.com/content/documentation
    http://doc.zarafa.com/6.40/Administrator_Manual/en-US/html-single/index.html
