Cool Solution - Roundcube
From Univention Wiki
Note: Cool Solutions are articles documenting additional functionality based on Univention products.
Not all of the shown steps in the article are covered by Univention Support. For questions about your support coverage contact your contact person at Univention before you want to implement one of the shown steps.
Installation
First of all, bind the unmaintained UCS repository on your server system via the command:
ucr set repository/online/unmaintained='yes'
To guarantee a successful installation of roundcube, execute the following command to install mysql.
univention-install univention-mysql
Hint: Please note the mysql root password, because it's necessary for the further installation.
cat /etc/mysql.secret
Now let's intall roundcube:
apt-get install roundcube
While the installation you will be asked for the mysql root password to grat access to the mysql server. After that a mysql user, named "roundcube", will be created. Set an individual password for this user. Confirm your password a second time .
The installation should be now successful.
Open the roundcube apache config via the command:
vim /etc/apache2/conf.d/roundcube
and delete the "#" before the Alias entries. Before:
#Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/ #Alias /roundcube /var/lib/roundcube
After:
Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/ Alias /roundcube /var/lib/roundcube
This is necessary to gain access to the roundcube web frontend.
Setup LDAP adress book
The default type of adress book in roundcube is mysql. To setup the LDAP adress book as the primary adress book open the file /var/lib/roundcube/config/main.inc.php with an editor of your choice.
Move to the section ADDRESSBOOK SETTINGS and search for:
// This indicates which type of address book to use. Possible choises: // 'sql' (default) and 'ldap'. // If set to 'ldap' then it will look at using the first writable LDAP // address book as the primary address book and it will not display the // SQL address book in the 'Address Book' view. $rcmail_config['address_book_type'] = 'sql';
Change the value 'sql' to 'ldap' and save the config file.
Now search for $rcmail_config['ldap_public'] and add the following code to your file. Values in '< >' syntax must be changed to your own settings:
$rcmail_config['ldap_public']['<your base dn>'] = array( 'name' => '<your base dn>', 'hosts' => array('<your ip adress>'), 'port' => 7389, 'use_tls' => false, 'ldap_version' => 3, 'user_specific' => true, 'base_dn' => '<your base dn>', 'bind_dn' => '<your bind user>', //e.g uid=Administrator,cn=users,<your base dn> 'bind_pass' => '<password of your bind user>', 'search_base_dn' => , 'search_filter' => 'uid=%u', 'search_bind_dn' => , 'search_bind_pw' => , 'search_dn_default' => , 'auth_cid' => , 'auth_method' => , 'hidden' => false, 'searchonly' => false, 'writable' => false, 'LDAP_Object_Classes' => array('top', 'inetOrgPerson'), 'LDAP_rdn' => 'mail', 'required_fields' => array('cn', 'sn', 'mailPrimaryAdress'), 'search_fields' => array('mailPrimaryAdress', 'cn'), 'fieldmap' => array( // Roundcube => LDAP 'name' => 'cn', 'surname' => 'sn', 'firstname' => 'givenName', 'email' => 'mailPrimaryAdress', 'phone:home' => 'homePhone', 'phone:work' => 'telephoneNumber', 'phone:mobile' => 'mobile', 'street' => 'street', 'zipcode' => 'postalCode', 'locality' => 'l', 'country' => 'c', 'organization' => 'o', ), 'sort' => 'cn', 'scope' => 'sub', 'filter' => '(objectClass=inetOrgPerson)', 'fuzzy_search' => true, 'vlv' => false, 'numsub_filter' => '(objectClass=organizationalUnit)', 'sizelimit' => '0', 'timelimit' => '0', 'referrals' => true|false, 'groups' => array( 'base_dn' => , 'scope' => 'sub', // search mode: sub|base|list 'filter' => '(objectClass=groupOfNames)', 'object_classes' => array("top", "groupOfNames"), 'member_attr' => 'member', 'name_attr' => 'cn', ), );
Hint: Make sure the following example in your main.inc.php, beginning with verisign.com, is uncommented. It can be seen at the syntax:
/*
*/
Restart apache to accept the settings.
invoke-rc.d apache2 restart
Log on Roundcube
Open roundcube via a browser of your choice. Enter the following URL:
<ip-of-your-server>/roundcube
Now you can fill out the text fields and login with the following syntax:
username = user@mail.domain
password = <password-of-the-user>
server = <your-mail-server>
Further information
More information about configuration can be obtained from the Roundcube installation guide.