diff -Nur a/bundles/kolab_webmail/bin/kolab-webmail-install b/bundles/kolab_webmail/bin/kolab-webmail-install
--- a/bundles/kolab_webmail/bin/kolab-webmail-install	2013-09-06 01:21:25.000000000 +0200
+++ b/bundles/kolab_webmail/bin/kolab-webmail-install	2013-09-06 11:35:01.511138088 +0200
@@ -29,9 +29,9 @@
 $bundle = new Horde_Bundle($cli, $pear_config->getConfFile('system'));
 $bundle->init();
 $bundle->configDb();
-$bundle->migrateDb();
-$bundle->writeAllConfigs();
 $bundle->configAuth();
+$bundle->writeAllConfigs();
+$bundle->migrateDb();
 
 // Finished.
 $cli->writeln();
diff -Nur a/bundles/kolab_webmail/config/conf.d/20-kolab.xml b/bundles/kolab_webmail/config/conf.d/20-kolab.xml
--- a/bundles/kolab_webmail/config/conf.d/20-kolab.xml	2013-09-06 01:21:25.000000000 +0200
+++ b/bundles/kolab_webmail/config/conf.d/20-kolab.xml	2013-09-06 11:35:01.511138088 +0200
@@ -4,15 +4,47 @@
  <configsection name="auth">
    <configlist name="admins" desc="Which users should be treated as
    administrators (root, super-user) by Horde?">manager</configlist>
+   <configswitch name="driver" desc="What backend should we use for
+   authenticating users to Horde?">kolab</configswitch>
  </configsection>
- <configsection name="share">
+ <configsection name="prefs">
+  <configswitch name="driver" desc="What preferences driver should we
+   use?">KolabImap</configswitch>
+ </configsection>
+ <configsection name="group">
   <configswitch name="driver" desc="What backend should we use for Horde
-   Shares?">Kolab</configswitch>
+   Groups?">Kolab</configswitch>
+   <configsection name="params">
+     <!-- <configldap switchname="driverconfig"> -->
+       <configstring name="gid" desc="The group search key">cn</configstring>
+       <configstring name="scope" desc="where to search, starting from basedn">sub</configstring>
+       <configstring name="memberuid" desc="Group membership field">member</configstring>
+       <configboolean name="attrisdn" required="false" desc="If checked, the user member attributes returned from LDAP are expected to be fully qualified DNs">true</configboolean>
+       <configlist name="newgroup_objectclass" desc="What objectclasses should a new group be member of? These objectclasses should cover the mail and gidnumber attributes as well as the group search key">kolabGroupOfNames</configlist>
+       <!-- the following three will be set by Bundle.php -->
+       <configstring name="basedn" desc="Base DN of all entries." required="false"/>
+       <configstring name="writedn" desc="DN used to bind for creating and editing LDAP groups." required="false"/>
+       <configstring name="writepw" desc="Password for bind DN." required="false"/>
+       <configsection name="search">
+         <configstring name="filter_type" desc="How to specify a filter for the group lists">objectClass</configstring>
+	 <configlist name="objectclass" desc="The objectclass filter used to search for groups. Can be a single objectclass or a list.">kolabGroupOfNames</configlist>
+       </configsection>
+     <!-- </configldap> -->
+   </configsection>
+ </configsection>
+ <configsection name="share">
+  <configenum name="driver" desc="What backend should we use for Horde
+   Shares?">Kolab</configenum>
+ </configsection>
+ <configsection name="mailer">
+  <configswitch name="type" desc="What method should we use for sending
+   mail?">smtp</configswitch>
+ </configsection>
+ <configsection name="kolab">
+  <configswitch name="enabled" quote="false" desc="Horde/Kolab integration
+    status">true</configswitch>
  </configsection>
 <!--
-//@todo: Fix Kolab driver
-//$conf['group']['driver'] = 'kolab';
-$conf['group']['driver'] = 'Mock';
 //@todo: check
 //$conf['group']['cache'] = true;
 
diff -Nur a/bundles/kolab_webmail/docs/CHANGES b/bundles/kolab_webmail/docs/CHANGES
--- a/bundles/kolab_webmail/docs/CHANGES	2013-09-06 01:21:25.000000000 +0200
+++ b/bundles/kolab_webmail/docs/CHANGES	2013-09-06 11:35:01.511138088 +0200
@@ -1,4 +1,4 @@
 ----------
-v4.0.0-git
+v5.1.0-git
 ----------
 
diff -Nur a/bundles/kolab_webmail/imp/config/hooks.php b/bundles/kolab_webmail/imp/config/hooks.php
--- a/bundles/kolab_webmail/imp/config/hooks.php	2013-09-06 01:21:25.000000000 +0200
+++ b/bundles/kolab_webmail/imp/config/hooks.php	2013-09-06 11:35:01.511138088 +0200
@@ -95,7 +95,7 @@
    public function mbox_icons()
    {
        $types = $GLOBALS['injector']->getInstance('Horde_Kolab_Storage')
-           ->getList()->listFolderTypes();
+           ->getList()->getQuery()->listTypes();
 
        $icons = array();
        foreach ($types as $folder => $type) {
@@ -152,7 +152,7 @@
    public function display_folder($mailbox)
    {
        $types = $GLOBALS['injector']->getInstance('Horde_Kolab_Storage')
-           ->getList()->listFolderTypes();
+           ->getList()->getQuery()->listTypes();
        $f = Horde_String::convertCharset($mailbox, 'UTF7-IMAP', 'UTF-8');
        return empty($types[$f]) || ($types[$f] == 'mail');
    }
diff -Nur a/bundles/kolab_webmail/ingo/config/backends.d/20-kolab.php b/bundles/kolab_webmail/ingo/config/backends.d/20-kolab.php
--- a/bundles/kolab_webmail/ingo/config/backends.d/20-kolab.php	2013-09-06 01:21:25.000000000 +0200
+++ b/bundles/kolab_webmail/ingo/config/backends.d/20-kolab.php	2013-09-06 11:35:01.512138088 +0200
@@ -1,20 +1,26 @@
 <?php
-
-$backends = array();
-
 $backends['kolab'] = array(
     'disabled' => false,
-    'transport' => 'timsieved',
-    'hordeauth' => 'full',
-    'params' => array(
-        'hostspec' => $GLOBALS['injector']->getInstance('Horde_Kolab_Session')->getImapServer(),
-        'logintype' => 'PLAIN',
-        'usetls' => true,
-        'port' => $GLOBALS['conf']['kolab']['imap']['sieveport'],
-        'scriptname' => 'kmail-vacation.siv',
-        'debug' => false,
+    'transport' => array(
+        Ingo::RULE_ALL => array(
+            'driver' => 'timsieved',
+            'params' => array(
+                'hostspec' => $GLOBALS['injector']->getInstance('Horde_Kolab_Session')->getImapServer(),
+                'logintype' => 'PLAIN',
+                'usetls' => false, 
+                'port' => $GLOBALS['conf']['kolab']['imap']['sieveport'],
+                'scriptname' => 'kmail-vacation.siv',
+                'debug' => false,
+            ),
+        ),
+    ),
+    'script' => array(
+        Ingo::RULE_ALL => array(
+            'driver' => 'sieve',
+            'params' => array(
+               # 'utf8' => false,
+            ),
+        ),
     ),
-    'script' => 'sieve',
-    'scriptparams' => array(),
     'shares' => false
 );
diff -Nur a/bundles/kolab_webmail/ingo/config/hooks.php b/bundles/kolab_webmail/ingo/config/hooks.php
--- a/bundles/kolab_webmail/ingo/config/hooks.php	1970-01-01 01:00:00.000000000 +0100
+++ b/bundles/kolab_webmail/ingo/config/hooks.php	2013-09-06 11:35:01.512138088 +0200
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Ingo Hooks configuration file.
+ *
+ * THE HOOKS PROVIDED IN THIS FILE ARE EXAMPLES ONLY.  DO NOT ENABLE THEM
+ * BLINDLY IF YOU DO NOT KNOW WHAT YOU ARE DOING.  YOU HAVE TO CUSTOMIZE THEM
+ * TO MATCH YOUR SPECIFIC NEEDS AND SYSTEM ENVIRONMENT.
+ *
+ * For more information please see the horde/config/hooks.php.dist file.
+ *
+ * $Id: acf2c96e445f2709239902bda0371992f2f08c11 $
+ */
+
+class Ingo_Hooks
+{
+    /**
+     * Returns the username/password needed to connect to the transport
+     * backend.
+     *
+     * @param string $driver  The driver name (array key from backends.php).
+     *
+     * @return mixed  If non-array, uses Horde authentication credentials
+                      (DEFAULT). Otherwise, an array with the following keys
+     *                (non-existent keys will use default values):
+     *  - euser: (string; SIEVE ONLY) For the sieve driver, the effective
+     *           user to use.
+     *  - password: (string) Password.
+     *  - username: (string) User name.
+     */
+      public function transport_auth($driver)
+      {
+          switch ($driver) {
+          case 'timsieved':
+              // Example #2: Use IMP password/username.
+              $ob = $GLOBALS['registry']->call('mail/imapOb');
+              return array(
+                  'euser' => $ob->getParam('username'),
+                  'password' => $ob->getParam('password'),
+                  'username' => $ob->getParam('username')
+              );
+          }
+ 
+          return true;
+      }
+ 
+    /**
+     * Set the default addresses used for the vacation module.
+     *
+     * @param string $user  The username.
+     *
+     * @return array  A list of vacation addresses.
+     */
+//    public function vacation_addresses($user = null)
+//    {
+//        // Example #1: User has 2 vacation addresses.
+//        return array($user . '@example.com', $user . '@foobar.com');
+//    }
+
+}
diff -Nur a/bundles/kolab_webmail/kronolith/config/conf.d/20-kolab.xml b/bundles/kolab_webmail/kronolith/config/conf.d/20-kolab.xml
--- a/bundles/kolab_webmail/kronolith/config/conf.d/20-kolab.xml	2013-09-06 01:21:25.000000000 +0200
+++ b/bundles/kolab_webmail/kronolith/config/conf.d/20-kolab.xml	2013-09-06 11:35:01.512138088 +0200
@@ -14,5 +14,10 @@
     Kolab server's free/busy information">443</configinteger>
   </configswitch>
  </configsection>
-
+ <configsection name="calendars">
+  <configheader>Calendar Handler Settings</configheader>
+  <configswitch name="driver" desc="What type of calendar handler should we use?">kolab
+       <case name="kolab" desc="IMAP/Kolab" />
+  </configswitch>
+ </configsection>
 </configuration>
diff -Nur a/bundles/kolab_webmail/lib/Bundle.php b/bundles/kolab_webmail/lib/Bundle.php
--- a/bundles/kolab_webmail/lib/Bundle.php	2013-09-06 01:21:25.000000000 +0200
+++ b/bundles/kolab_webmail/lib/Bundle.php	2013-09-06 11:35:01.513138088 +0200
@@ -19,7 +19,7 @@
     /**
      * The bundle version.
      */
-    const VERSION = '4.0-RC1';
+    const VERSION = '5.1.0';
 
     /**
      * The bundle descriptive name.
@@ -39,28 +39,46 @@
     protected function _configAuth(Horde_Variables $vars)
     {
         $vars->auth__driver = 'kolab';
-        $host = $this->_cli->prompt('Provide the host name of your Kolab server:');
+        $kolabhost = $this->_cli->prompt('Provide the host name of your Kolab server:');
+        $smtphost = $this->_cli->prompt('Provide the host name of your SMTP server:', null, $kolabhost);
+        $ldaphost = $this->_cli->prompt('Provide the host name of your LDAP server:', null, $kolabhost);
         $maildomain = $this->_cli->prompt('Provide the primary mail domain of your Kolab server:');
         $basedn = $this->_cli->prompt('Provide the base DN of your Kolab server:');
-        $phppw = $this->_cli->prompt('Provide the PHP pw of your Kolab LDAP nobody user:');
+        $phpdn = $this->_cli->prompt('Provide the DN of your Horde LDAP user:', null, 'cn=nobody,cn=internal,' . $basedn );
+        $phppw = $this->_cli->passwordPrompt('Provide the password of your Horde LDAP user:');
+
         $vars->problems__email = 'postmaster@' . $maildomain;
         $vars->problems__maildomain = $maildomain;
         $vars->kolab__enabled = 'true';
-        $vars->kolab__ldap__server = 'ldap://' . $host . ':389';
-        $vars->kolab__ldap__hostname = $host;
+        $vars->kolab__ldap__server = $ldaphost;
+        $vars->kolab__ldap__hostname = $ldaphost;
         $vars->kolab__ldap__port = '389';
         $vars->kolab__ldap__basedn = $basedn;
-        $vars->kolab__ldap__phpdn = 'cn=nobody,cn=internal,' . $basedn;
+        $vars->kolab__ldap__phpdn = $phpdn;
         $vars->kolab__ldap__phppw = $phppw;
-        $vars->kolab__imap__server = $host;
-        $vars->kolab__imap__port = '993';
+        $vars->kolab__smtp__server = $smtphost;
+        $vars->kolab__imap__server = $kolabhost;
+        $vars->kolab__imap__port = '143';
         $vars->kolab__imap__sieveport = '2000';
         $vars->kolab__imap__maildomain = $maildomain;
+        $vars->kolab__freebusy__server = 'https://' . $kolabhost . '/freebusy';
         $vars->mailer__type = 'smtp';
-        $vars->mailer__params__auth = 'true';
-        $vars->mailer__params__port = 587;
-        $vars->mailer__params__host = $host;
+        $vars->mailer__params__auth = 'false';
+        $vars->mailer__params__port = 25;
+        $vars->mailer__params__host = $smtphost;
         $vars->prefs__driver = 'KolabImap';
+
+        $vars->group__params__basedn = $basedn;
+        $vars->group__params__writedn = $phpdn;
+        $vars->group__params__writepw = $phppw;
+
+	$vars->ldap__hostspec = $ldaphost;
+	$vars->ldap__tls = 'false';
+	$vars->ldap__version = 3;
+	$vars->ldap__binddn = $phpdn;
+	$vars->ldap__bindpw = $phppw;
+	$vars->ldap__useldap = 'true';
+
         return 'manager';
     }
 }
diff -Nur a/bundles/kolab_webmail/package.xml b/bundles/kolab_webmail/package.xml
--- a/bundles/kolab_webmail/package.xml	2013-09-06 01:21:25.000000000 +0200
+++ b/bundles/kolab_webmail/package.xml	2013-09-06 11:35:01.513138088 +0200
@@ -10,19 +10,19 @@
   <email>wrobel@horde.org</email>
   <active>yes</active>
  </lead>
- <date>2011-11-29</date>
- <time>19:43:49</time>
+ <date>2013-01-30</date>
+ <time>20:00:00</time>
  <version>
-  <release>4.0.0alpha1</release>
-  <api>4.0.0alpha1</api>
+  <release>5.1.0</release>
+  <api>5.0.0</api>
  </version>
  <stability>
-  <release>alpha</release>
-  <api>alpha</api>
+  <release>stable</release>
+  <api>stable</api>
  </stability>
  <license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
  <notes>
-* First release candidate of Horde Kolab Edition 4.0.
+* First release candidate of Horde Kolab Edition 5.1.0
  </notes>
  <contents>
   <dir baseinstalldir="/" name="/">
@@ -56,17 +56,18 @@
       <file name="20-kolab.php" role="horde" />
      </dir> <!-- /imp/config/backends.d -->
      <dir name="conf.d">
-      <file name="10-webmail.xml" role="horde" />
+      <!-- <file name="10-webmail.xml" role="horde" /> -->
       <file name="20-kolab.php" role="horde" />
      </dir> <!-- /imp/config/conf.d -->
+     <file name="hooks.php" role="horde" />
      <dir name="prefs.d">
       <file name="10-webmail.php" role="horde" />
      </dir> <!-- /imp/config/prefs.d -->
-     <file name="hooks.php" role="horde" />
     </dir> <!-- /imp/config -->
    </dir> <!-- /imp -->
    <dir name="ingo">
     <dir name="config">
+     <file name="hooks.php" role="horde" />      
      <dir name="backends.d">
       <file name="20-kolab.php" role="horde" />
      </dir> <!-- /ingo/config/backends.d -->
@@ -78,10 +79,13 @@
    <dir name="kronolith">
     <dir name="config">
      <dir name="conf.d">
-      <file name="10-webmail.xml" role="horde" />
+      <!-- <file name="10-webmail.xml" role="horde" /> -->
       <file name="20-kolab.php" role="horde" />
       <file name="20-kolab.xml" role="horde" />
      </dir> <!-- /kronolith/config/conf.d -->
+      <dir name="prefs.d">
+      <file name="20-kolab.php" role="horde" />
+      </dir> <!-- /kronolith/config/prefs.d -->
     </dir> <!-- /kronolith/config -->
    </dir> <!-- /kronolith -->
    <dir name="lib">
@@ -92,6 +96,9 @@
      <dir name="conf.d">
       <file name="20-kolab.xml" role="horde" />
      </dir> <!-- /mnemo/config/conf.d -->
+     <dir name="prefs.d">
+      <file name="20-kolab.php" role="horde" />
+     </dir> <!-- /mnemo/config/prefs.d -->
     </dir> <!-- /mnemo/config -->
    </dir> <!-- /mnemo -->
    <dir name="nag">
@@ -99,6 +106,9 @@
      <dir name="conf.d">
       <file name="20-kolab.xml" role="horde" />
      </dir> <!-- /nag/config/conf.d -->
+     <dir name="prefs.d">
+      <file name="20-kolab.php" role="horde" />
+     </dir> <!-- /nag/config/prefs.d -->
     </dir> <!-- /nag/config -->
    </dir> <!-- /nag -->
    <dir name="turba">
@@ -110,6 +120,10 @@
       <file name="10-webmail.xml" role="horde" />
       <file name="20-kolab.xml" role="horde" />
      </dir> <!-- /turba/config/conf.d -->
+     <file name="hooks.php" role="horde" />
+     <dir name="prefs.d">
+      <file name="20-kolab.php" role="horde" />
+     </dir> <!-- /turba/config/prefs.d -->
     </dir> <!-- /turba/config -->
    </dir> <!-- /turba -->
    <file name="COPYING" role="doc" />
@@ -137,98 +151,105 @@
    <package>
     <name>content</name>
     <channel>pear.horde.org</channel>
-    <min>1.0.0</min>
-    <max>2.0.0</max>
-    <exclude>2.0.0</exclude>
+    <min>2.0.1</min>
+    <max>3.0.0</max>
+    <exclude>3.0.0</exclude>
    </package>
    <package>
     <name>horde</name>
     <channel>pear.horde.org</channel>
-    <min>4.0.7</min>
-    <max>5.0.0</max>
-    <exclude>5.0.0</exclude>
+    <min>5.0.3</min>
+    <max>6.0.0</max>
+    <exclude>6.0.0</exclude>
    </package>
    <package>
     <name>imp</name>
     <channel>pear.horde.org</channel>
-    <min>5.0.8</min>
-    <max>6.0.0</max>
-    <exclude>6.0.0</exclude>
+    <min>6.0.3</min>
+    <max>7.0.0</max>
+    <exclude>7.0.0</exclude>
    </package>
    <package>
     <name>ingo</name>
     <channel>pear.horde.org</channel>
-    <min>2.0.3</min>
-    <max>3.0.0</max>
-    <exclude>3.0.0</exclude>
+    <min>3.0.2</min>
+    <max>4.0.0</max>
+    <exclude>4.0.0</exclude>
    </package>
    <package>
     <name>kronolith</name>
     <channel>pear.horde.org</channel>
-    <min>3.0.5</min>
-    <max>4.0.0</max>
-    <exclude>4.0.0</exclude>
+    <min>4.0.3</min>
+    <max>5.0.0</max>
+    <exclude>5.0.0</exclude>
    </package>
    <package>
     <name>mnemo</name>
     <channel>pear.horde.org</channel>
-    <min>3.0.1</min>
-    <max>4.0.0</max>
-    <exclude>4.0.0</exclude>
+    <min>4.0.2</min>
+    <max>5.0.0</max>
+    <exclude>5.0.0</exclude>
    </package>
    <package>
     <name>nag</name>
     <channel>pear.horde.org</channel>
-    <min>3.0.2</min>
-    <max>4.0.0</max>
-    <exclude>4.0.0</exclude>
+    <min>4.0.2</min>
+    <max>5.0.0</max>
+    <exclude>5.0.0</exclude>
    </package>
    <package>
     <name>timeobjects</name>
     <channel>pear.horde.org</channel>
-    <min>1.0.1</min>
-    <max>2.0.0</max>
-    <exclude>2.0.0</exclude>
+    <min>2.0.2</min>
+    <max>3.0.0</max>
+    <exclude>3.0.0</exclude>
    </package>
    <package>
     <name>turba</name>
     <channel>pear.horde.org</channel>
-    <min>3.0.4</min>
-    <max>4.0.0</max>
-    <exclude>4.0.0</exclude>
+    <min>4.0.2</min>
+    <max>5.0.0</max>
+    <exclude>5.0.0</exclude>
+   </package>
+   <package>
+    <name>Horde_Kolab_Format</name>
+    <channel>pear.horde.org</channel>
+    <min>2.0.2</min>
+    <max>3.0.0</max>
+    <exclude>3.0.0</exclude>
    </package>
    <package>
     <name>Horde_Kolab_Server</name>
     <channel>pear.horde.org</channel>
-    <min>1.0.0</min>
-    <max>2.0.0</max>
-    <exclude>2.0.0</exclude>
+    <min>2.0.1</min>
+    <max>3.0.0</max>
+    <exclude>3.0.0</exclude>
    </package>
    <package>
     <name>Horde_Kolab_Session</name>
     <channel>pear.horde.org</channel>
-    <min>1.0.0</min>
-    <max>2.0.0</max>
-    <exclude>2.0.0</exclude>
+    <min>2.0.1</min>
+    <max>3.0.0</max>
+    <exclude>3.0.0</exclude>
    </package>
    <package>
     <name>Horde_Kolab_Storage</name>
     <channel>pear.horde.org</channel>
-    <min>1.0.0</min>
-    <max>2.0.0</max>
-    <exclude>2.0.0</exclude>
+    <min>2.0.3</min>
+    <max>3.0.0</max>
+    <exclude>3.0.0</exclude>
    </package>
    <package>
     <name>Horde_Ldap</name>
     <channel>pear.horde.org</channel>
-    <min>1.0.0</min>
-    <max>2.0.0</max>
-    <exclude>2.0.0</exclude>
+    <min>2.0.1</min>
+    <max>3.0.0</max>
+    <exclude>3.0.0</exclude>
    </package>
    <package>
     <name>Net_SMTP</name>
     <channel>pear.php.net</channel>
-    <min>1.6.0</min>
+    <min>1.6.1</min>
    </package>
    <package>
     <name>Net_Sieve</name>
@@ -247,52 +268,56 @@
  </usesrole>
  <phprelease>
   <filelist>
+   <install as="COPYING" name="COPYING" />
    <install as="README" name="README" />
-   <install as="kolab-webmail-install" name="bin/kolab-webmail-install" />
-   <install as="config/hooks.php" name="config/hooks.php" />
+   <install as="bin/kolab-webmail-install" name="bin/kolab-webmail-install" />
    <install as="config/conf.d/20-kolab.xml" name="config/conf.d/20-kolab.xml" />
+   <install as="config/hooks.php" name="config/hooks.php" />
    <install as="config/prefs.d/10-webmail.php" name="config/prefs.d/10-webmail.php" />
    <install as="config/prefs.d/20-kolab.php" name="config/prefs.d/20-kolab.php" />
    <install as="config/registry.d/20-kolab.php" name="config/registry.d/20-kolab.php" />
-   <install as="CHANGES" name="docs/CHANGES" />
-   <install as="INSTALL" name="docs/INSTALL" />
-   <install as="PERFORMANCE" name="docs/PERFORMANCE" />
-   <install as="RELEASE_NOTES" name="docs/RELEASE_NOTES" />
-   <install as="TODO" name="docs/TODO" />
-   <install as="UPGRADING" name="docs/UPGRADING" />
-   <install as="imp/config/hooks.php" name="imp/config/hooks.php" />
+   <install as="docs/CHANGES" name="docs/CHANGES" />
+   <install as="docs/INSTALL" name="docs/INSTALL" />
+   <install as="docs/PERFORMANCE" name="docs/PERFORMANCE" />
+   <install as="docs/RELEASE_NOTES" name="docs/RELEASE_NOTES" />
+   <install as="docs/TODO" name="docs/TODO" />
+   <install as="docs/UPGRADING" name="docs/UPGRADING" />
    <install as="imp/config/backends.d/20-kolab.php" name="imp/config/backends.d/20-kolab.php" />
-   <install as="imp/config/conf.d/10-webmail.xml" name="imp/config/conf.d/10-webmail.xml" />
    <install as="imp/config/conf.d/20-kolab.php" name="imp/config/conf.d/20-kolab.php" />
    <install as="imp/config/prefs.d/10-webmail.php" name="imp/config/prefs.d/10-webmail.php" />
+   <install as="imp/config/hooks.php" name="imp/config/hooks.php" />
+   <install as="ingo/config/hooks.php" name="ingo/config/hooks.php" />
    <install as="ingo/config/backends.d/20-kolab.php" name="ingo/config/backends.d/20-kolab.php" />
    <install as="ingo/config/conf.d/20-kolab.xml" name="ingo/config/conf.d/20-kolab.xml" />
-   <install as="kronolith/config/conf.d/10-webmail.xml" name="kronolith/config/conf.d/10-webmail.xml" />
    <install as="kronolith/config/conf.d/20-kolab.php" name="kronolith/config/conf.d/20-kolab.php" />
    <install as="kronolith/config/conf.d/20-kolab.xml" name="kronolith/config/conf.d/20-kolab.xml" />
+   <install as="kronolith/config/prefs.d/20-kolab.php" name="kronolith/config/prefs.d/20-kolab.php" />
    <install as="lib/Bundle.php" name="lib/Bundle.php" />
    <install as="mnemo/config/conf.d/20-kolab.xml" name="mnemo/config/conf.d/20-kolab.xml" />
+   <install as="mnemo/config/prefs.d/20-kolab.php" name="mnemo/config/prefs.d/20-kolab.php" />
    <install as="nag/config/conf.d/20-kolab.xml" name="nag/config/conf.d/20-kolab.xml" />
+   <install as="nag/config/prefs.d/20-kolab.php" name="nag/config/prefs.d/20-kolab.php" />
    <install as="turba/config/backends.d/20-kolab.php" name="turba/config/backends.d/20-kolab.php" />
    <install as="turba/config/conf.d/10-webmail.xml" name="turba/config/conf.d/10-webmail.xml" />
-   <install as="COPYING" name="COPYING" />
    <install as="turba/config/conf.d/20-kolab.xml" name="turba/config/conf.d/20-kolab.xml" />
+   <install as="turba/config/prefs.d/20-kolab.php" name="turba/config/prefs.d/20-kolab.php" />
+   <install as="turba/config/hooks.php" name="turba/config/hooks.php" />
   </filelist>
  </phprelease>
  <changelog>
   <release>
    <version>
-     <release>4.0.0alpha1</release>
-     <api>4.0.0alpha1</api>
+     <release>5.1.0</release>
+     <api>5.1.0</api>
    </version>
    <stability>
-    <release>alpha</release>
-    <api>alpha</api>
+    <release>stable</release>
+    <api>stable</api>
    </stability>
-   <date>2011-11-29</date>
+   <date>2013-06-24</date>
    <license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
    <notes>
-* First release candidate of Horde Kolab Edition 4.0.
+* First release candidate of Horde Kolab Edition 5.1.0
    </notes>
   </release>
  </changelog>
diff -Nur a/bundles/kolab_webmail/turba/config/backends.d/20-kolab.php b/bundles/kolab_webmail/turba/config/backends.d/20-kolab.php
--- a/bundles/kolab_webmail/turba/config/backends.d/20-kolab.php	2013-09-06 01:21:25.000000000 +0200
+++ b/bundles/kolab_webmail/turba/config/backends.d/20-kolab.php	2013-09-06 11:35:01.514138088 +0200
@@ -1,11 +1,38 @@
 <?php
-
-$cfgSources = array();
-
+/*
+ * An address book based on message recipients. This will always be private and
+ * read-only. The address book content is provided by the
+ * contacts/favouriteRecipients API method which should be implemented by a
+ * mail client that collects the most regular message recipients, like IMP
+ * 4.2.
+ */
+$cfgSources['favourites'] = array(
+    // ENABLED by default
+    'disabled' => false,
+    'title' => _("Favourite Recipients"),
+    'type' => 'favourites',
+    'params' => array(
+        'limit' => 10
+    ),
+    'map' => array(
+        '__key' => 'email',
+        'name' => 'email',
+        'email' => 'email'
+    ),
+    'search' => array(
+        'email'
+    ),
+    'strict' => array(
+        'id',
+    ),
+    'export' => true,
+    'browse' => true,
+);
 /* A global address book for a Kolab Server. This is typically a
  * read-only public directory, stored in the default Kolab LDAP server.
  * The user accessing this should have read permissions to the shared
- * directory in LDAP. */
+ * directory in LDAP.
+ */
 $cfgSources['kolab_global'] = array(
     // ENABLED if LDAP functionality is present
     'disabled' => !function_exists('ldap_connect'),
@@ -77,15 +104,9 @@
     'export' => true,
     'browse' => true,
 );
-
-/**
- * A local address book on a Kolab or IMAP server. This implements a private
+/* A local address book on a IMAP or Kolab server. This implements a private
  * per-user address book. Sharing of this source with other users is
  * accomplished by IMAP ACLs and by setting 'use_shares' => true.
- *
- * Still missing attributes are:
- *
- *   picture, sensitivity
  */
 $cfgSources['kolab'] = array(
     // ENABLED by default
@@ -95,7 +116,7 @@
     'params' => array(
     ),
     'map' => array(
-        '__key' => 'uid',
+        '__key' => '__key',
         '__uid' => 'uid',
         '__type' => '__type',
         '__members' => '__members',
@@ -112,11 +133,15 @@
                                   'format' => '%s, %s'),
                             array('fields' => array('firstname', 'lastname'),
                                   'format' => '%s %s'))),
-        'firstname'         => 'given-name',
-        'lastname'          => 'last-name',
-        'middlenames'       => 'middle-names',
-        'namePrefix'        => 'prefix',
-        'nameSuffix'        => 'suffix',
+        'firstname' => 'given-name',
+        'lastname' => 'last-name',
+        'middlenames' => 'middle-names',
+        'namePrefix' => 'prefix',
+        'nameSuffix' => 'suffix',
+        // This is a shorter version of a "name" composite field which only
+        // consists of the first name and last name.
+        // 'name' => array('fields' => array('firstname', 'lastname'),
+        //                 'format' => '%s %s'),
         'initials'          => 'initials',
         'nickname'          => 'nick-name',
         'photo'             => 'photo',
@@ -131,12 +156,12 @@
         'workCity'          => 'addr-business-locality',
         'workProvince'      => 'addr-business-region',
         'workPostalCode'    => 'addr-business-postal-code',
-        'workCountry'       => 'addr-business-country',
+        'workCountryFree'   => 'addr-business-country',
         'homeStreet'        => 'addr-home-street',
         'homeCity'          => 'addr-home-locality',
         'homeProvince'      => 'addr-home-region',
         'homePostalCode'    => 'addr-home-postal-code',
-        'homeCountry'       => 'addr-home-country',
+        'homeCountryFree'   => 'addr-home-country',
         /* Communications */
         'emails'            => 'emails',
         'homePhone'         => 'phone-home1',
@@ -161,7 +186,6 @@
         'latitude'          => 'latitude',
         'longitude'         => 'longitude',
         /* Invisible */
-        'email'             => 'email',
         'pgpPublicKey'      => 'pgp-publickey',
     ),
     'tabs' => array(
@@ -170,9 +194,9 @@
                                'nickname', 'gender', 'birthday', 'spouse',
                                'anniversary', 'children', 'photo'),
         _("Location") => array('workStreet', 'workCity', 'workProvince',
-                               'workPostalCode', 'workCountry',
+                               'workPostalCode', 'workCountryFree',
                                'homeStreet', 'homeCity', 'homeProvince',
-                               'homePostalCode', 'homeCountry'),
+                               'homePostalCode', 'homeCountryFree'),
         _("Communications") => array('emails', 'homePhone', 'workPhone',
                                      'cellPhone', 'fax', 'imaddress'),
         _("Organization") => array('title', 'role', 'company', 'department',
diff -Nur a/bundles/kolab_webmail/turba/config/conf.d/20-kolab.xml b/bundles/kolab_webmail/turba/config/conf.d/20-kolab.xml
--- a/bundles/kolab_webmail/turba/config/conf.d/20-kolab.xml	2013-09-06 01:21:25.000000000 +0200
+++ b/bundles/kolab_webmail/turba/config/conf.d/20-kolab.xml	2013-09-06 11:35:01.514138088 +0200
@@ -5,6 +5,6 @@
   <configstring name="source" desc="Name of source for creating new
   shares.&lt;br /&gt; Note that leaving this blank will prevent users from
   being able to create new address books."
-  required="false">Kolab</configstring>
+  required="false">kolab</configstring>
  </configsection>
 </configuration>
diff -Nur a/bundles/kolab_webmail/turba/config/hooks.php b/bundles/kolab_webmail/turba/config/hooks.php
--- a/bundles/kolab_webmail/turba/config/hooks.php	2013-09-06 01:21:25.000000000 +0200
+++ b/bundles/kolab_webmail/turba/config/hooks.php	2013-09-06 11:35:01.514138088 +0200
@@ -34,4 +34,26 @@
            return $primary;
        }
    }
+
+   public function prefs_change($pref)
+   {
+       switch ($pref) {
+       case 'default_dir':
+           $value = $GLOBALS['prefs']->getValue('default_dir');
+           $addressbooks = $GLOBALS['injector']->getInstance('Horde_Core_Factory_Share')
+               ->create()
+               ->listShares(
+                   $GLOBALS['registry']->getAuth(),
+                   array('perm' => Horde_Perms::SHOW,
+                         'attributes' => $GLOBALS['registry']->getAuth()));
+           foreach ($addressbooks as $id => $addressbook) {
+               if ($id == $value) {
+                   $addressbook->set('default', true);
+                   $addressbook->save();
+                   break;
+               }
+           }
+           break;
+       }
+   }
 }
\ Kein Zeilenumbruch am Dateiende.