Blogs

Staffe's picture

Mit dem eigenen (VPS/Root-)Server weg von Google: Centos 6.5 + Kolab 3.2 + Owncloud 6 + Plex

Es kann viele Gründe geben, Konzerne wie Microsoft, Apple oder Google zu meiden. Wer sich dazu entschließt, aber trotzdem auf Bequemlichkeiten der “Cloud” nicht verzichten will und seine Daten aber möglichst selbst unter Kontrolle haben möchte, ist mit einem gemieteten VPS oder root-Server gut beraten. Um zu einem passablen Ergebnis zu kommen, muss aber viel installiert und konfiguriert werden. Wer sich davon nicht zurückschrecken lässt, sollte zumindest ein paar Stunden Zeit einplanen. Dieses Tutorial soll helfen, die größten Probleme zu umschiffen und dem frisch gebackenen (oder auch teilweise erfahrenen Server-Admin) stundenlange Sucherei im Internet zu ersparen.
kolab
Zur eingesetzten Software: Als Betriebssystem habe ich mich für das aktuelle CentOS 6.5 entschieden. Mit der Kolab Groupware, ein auf Roundcube aufgesetztes Webinterface, installieren wir eine moderne Web-UI inklusive Mailserver (IMAP,POP3,SMTP,Spam- und Virenfilter), Adressbuch, Kalender, Aufgaben und Active Sync (Push-Mail). Als Daten-Cloud kommt ownCloud zum Einsatz und als “Schmankerl” installieren wir noch den Plex Media Server.  Die komplette Software ist kostenlos und zum größten Teil Open Source.

grote's picture

How Kolab is using Open Standards for Interoperability

Today is Document Freedom Day which started out for documents in the OOXML days, but now is much more generally about Open Standards. This is a great opportunity to show you how Kolab uses Open Standards all the way down to the storage layer.

Since Kolab is a lot about email, it uses SMTP (RFC 821) and IMAP (RFC 1730) to send and store emails which is by itself not overly exciting since at least in the free world, most email software does that. But Kolab goes further and uses IMAP as a NoSQL storage engine and therefore gets all the scalability, ACLs and sharing from IMAP for free. It uses the IMAP METADATA Extension (RFC 5464) to storage other content and even configuration in IMAP folders. Since Kolab is a Groupware Solution, it stores contacts, events and tasks in there. Of course, it does so using Open Standards as well. Contacts are stored in the xCard (RFC 6351) format and tasks as well as events are stored in the xCal (RFC 6321) format. All those objects are then encapsulated in a MIME message according to RFC 2822.

The advantage of that is that your personal data is not scattered all over the place, but in one central IMAP database which you can easily back up (e.g. with offlineimap) or move to another server (e.g. with imapsync). The new version of Kolab supports file storage and the default is to store them in IMAP as well.

Bottom up Kolab

Introduction

Kolab Sys has been putting a lot of effort
into developing
various components to provide a turn key enterprise communication
platform. Unfortunately for me,
they seem to be more of a CentOS / RedHat shop. Also, I'm not an
enterprise.

Paul Boddie has been doing lots of work trying adapt the Kolab Sys
packages for Debian.
See Minimal Kolab and
Kolab, Debian, LDAP and XMPP
for example.

For me the Kolab packages made too many assumptions about what my
environment should
look like -- that it should be using 389-ds, Cyrus IMAP, MySQL, Postfix,
and Apache-mod-php.

However I've been a long time Debian user so I've been running OpenLDAP,
Dovecot, and as a Python
programmer I've been using apache2-mpm-worker and mod-wsgi and didn't
want to switch to
apache2-mpm-prefork.

After seeing Paul's posts about the Kolab
setup-kolab,
dependency tree and then seeing Kolab from Source.
I had the idea, what if instead of trying to install all of Kolab and
use setup-kolab, I tried
to install Kolab piecemeal and manually configure just those components for my
environment?

One question I have is how many of the Kolab components do you need to
be running before you can be considered to be running "Kolab"?

Kolab 0

The most minimal way to get started with Kolab, is to run an IMAP server
and use KDEPIM
with libkolab and libkolabxml linked in. With that (and some
configuration in akonadi) you can store contacts
and calendar information on your IMAP server and access it from other
KDEPIM clients on other computers.

Andreas Cordes's picture

Kolab and vHosts

Today I played a little with the apache config to improve my performance using apache.

I noticed that my vHost setup was not working so I fixed this at first.  After a while I was wondering that I didn't receive any mail since then... Ok, something is now "kaputt" :-)

Now I had a look at the config of kolab in the apache sites-enabled directory. Kolab adds some entries in this directory, but thos "may" work for vHosts but not for my setup.

Simply moving the kolab-syncroton from sites-available to conf.d solved the problem for me.

Not the best, may be, but it's working.

greets

Andreas Cordes's picture

First impression - and thanks for the feedback

Hi,

first of all I wish to say thanks for your feedback on my posts :-)

So now the groupware is up and running and the next steps are planned already (XMPP = Chat/Messaging, OwnCloud).

The roundcube web frontend is a bit slow for daily work, and it reconnects to the imap server very often.

Sending mails from my own domain (dynamic IP) uses a smart host (mailjet, costs less and 200 mails/day are free :-)) and receiving mails also takes sometime because of Spam/Virus detection.

So the next parts are also performance improving.

Some topics to check are

memory usage (count of server process fro IMAP, Apache ...)
Proxy for roundcube connection to IMAP
deactivating Virus/Spam detection and use some header/body checks instead (not for production use of course)

If you have more cheats and hints to increase the performance, that would be nice.

greets

Andreas Cordes's picture

200 ok, it's working :-)

Hi there,

Yesterday I finished the compilation story and was able to setup kolab.
I had to install apache-2.2 and then compile 389-admin... but then...... 
Everything is available to install. :-)
Ok, I had some problems but here is a short summary:
Kolab needs some IMAP extensions which are available in cyrus-imap 2.5 (patches from kolab which are included un the next upstream) but currently the directories are not setup correctly.
Ok, just create some symlinks:
ln -s /var/lib/cyrus/ /var/lib/imap
ln -s /var/spool/cyrus/ /var/spool/imap
ln -s /usr/lib/cyrus /usr/lib/imap
And the SSL certificates are missing:
openssl req -new -x509 -nodes -out /etc/ssl/certs/cyrus-imaps.pem -keyout /etc/ssl/private/cyrus-imapd.key -days 3650
and change the filenames in the /etc/imapd.conf accordingly.
Now add postfix and cyrus to the ssl-cert group and also to the mail group.
Now it's time to start the command:

setup-kolab

Yeah, it's working. :-) (write down all the passwords, you'll need them)

I saw that my MySQL installation needs a password for the root user on localhost (got an error message during the setup) but nevertheless it's working.

You want to login after that?
Go to http://address/kolab-webadmin and login with "cn=directory manager" and the known password.

Now you can create a user and so on and it will receive mails just right after creation.

The cool stuff is, on my smartphone (Samsung Galaxy Note with Omni Rom = Android 4.4.2) I create a new account with "Microsoft Exchange", enter my eMail address and password, accepting all SSL certificates and that's it.

Now I can synch my mobile with my own groupware, including tasks, contacts, appointments.

Andreas Cordes's picture

The compilation story continues

Ok,

not only pykolab was missing. The order which package to compile, install and compile again is important but we will manage this.

Now I had to compile libkolab, kolab-utils and may be some more.

I have my DEB directory in the sources.list so I know which package is currently missing (aptitude says "unavailable"). So I change into that directory, running "apt-get build-dep packagename" and it should now install all missing packages. The new one are now in my DEB directory and a "apt-get update" will take the new ones into account.

Don't forget a
dpkg-scanpackages .  | gzip -c9 > Packages.gz
before running apt-get update so the Packages.gz file is new and includes the newly created DEBs..

The story continues :-)

greets

Andreas Cordes's picture

Compilation finished... But we are not ready

Yeah,

compilation finished after, well, quite a lot of time (~13h)...

I checked all the files and one package was missing (pykolab) because of some missing dependencies.

Checking again showed me that the following packages are missing:

intltool libglib2.0-dev python-icalendar python-nose

Ok. So we install these packages and continue with pykolab... (python-icalendar we compiled last night).

And again, compilation will take its time.

greets

Minimal Kolab: Unbundling the LDAP and IMAP Components

In my last post about Kolab I hinted about unbundling the LDAP server and using a remote server for LDAP service. Since then, I’ve been looking at making the IMAP server an “unbundled” component – IMAP service still being required, of course – and even at supporting Dovecot in setup-kolab as well. After all, choice is an important motivation for adopting Free Software, and we should at least try and make that choice convenient to exercise where possible. Supporting a choice of IMAP servers gives everyone a bit more flexibility and should make Kolab a bit easier to adopt. The Dovecot work is still very much in progress, however.

As you may recall, I wanted to deploy an XMPP server – ejabberd – on one host and the rest of the Kolab stack on another host, and yet retain the possibility of configuring these different components using setup-kolab. To support this specific situation, and to eventually move beyond it to support other architectural configurations, I have chosen to introduce a new metapackage called kolab-minimal: the glue components of Kolab plus the Web components minus the “infrastructure” components, those being the components providing the LDAP, IMAP and mail transport services. Here’s where this takes us:

A dependency diagram for Kolab featuring a kolab-minimal package and the different setup-kolab invocations

A dependency diagram for Kolab featuring a kolab-minimal package and the different setup-kolab invocations

Andreas Cordes's picture

Preparation page created

Ok guys,

I created the first How-To for Kolab on Pi.

http://whvneo.blogspot.de/p/preparation.html

Feel free to add any comments.

My RasPi is still compiling for 9 hours (and continues).

greets