Re: [Kolab-devel] roundcube 1.0-0.16 multidomain kolab 3.1
"Jeroen van Meeuwen (Kolab Systems)" <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kolab |
|---|---|
| Message-ID | <d79619d04d59a3f331696f14edfc4fb9__34540.4314496138$1383147703$gmane$org@kolabsys.com> |
On 2013-10-30 09:05, Manel Gimeno Zaragozá wrote:
> My question is, has someone created a hosted environment with kolab
> 3.1 dev? how roundcube multidomain management works? There is no info
> in kolab 3.1 documentacion, neither in ruondcube documentation.
>
Yes, we run mykolab.com on vanilla Kolab 3.1 [1]. This is *without* any
third party patches.
> Anyway, I find a way to simulate the behaviour I'm looking for, it is
> including this code:
>
> $server = $_SERVER["HTTP_HOST"];
> $dn = explode('.',$server);
> $count = count($dn);
> $domain_base_dn = "dc=$dn[0]";
> $i = 1;
> while ($i < $count){
> $domain_base_dn = $domain_base_dn . ",dc=$dn[$i]";
> $i++;
> }
>
Our configuration looks as follows:
== config.inc.php ==
$components = explode('.', $_SERVER["HTTP_HOST"]);
array_shift($components);
$domain = implode('.', $components);
// Note that this is for cookies
$config['session_domain'] = $domain;
// Note that this is only for a default "@$domain" suffix
// to an otherwise not fully qualified user login name.
$config['username_domain'] = $domain;
$config['mail_domain'] = null;
Attached you find our kolab_auth.inc.php for webmail.
Kind regards,
Jeroen van Meeuwen
[1] http://kolab.org/blog/vanmeeuwen/2013/08/18/my-kolab-es-su-kolab
--
Systems Architect, Kolab Systems AG
e: vanmeeuwen at kolabsys.com
m: +44 74 2516 3817
w: http://www.kolabsys.com
pgp: 9342 BF08
_______________________________________________
devel mailing list
[email protected]
https://lists.kolab.org/mailman/listinfo/devel
kolab_auth.inc.php
(text/x-php, 3.2 KB)
<?php
// The id of the LDAP address book (which refers to the rcmail_config['ldap_public'])
// or complete addressbook definition array.
$config['kolab_auth_addressbook'] = Array(
'name' => 'Kolab Auth',
'hosts' => Array('ldap.kolabsys.net'),
'port' => 389,
'use_tls' => false,
'user_specific' => false,
'base_dn' => 'ou=People,%dc',
'bind_dn' => 'uid=kolab-service,ou=Special Users,dc=kolabsys,dc=net',
'bind_pass' => 'not-really-here',
'writable' => false,
'ldap_version' => 3, // using LDAPv3
'fieldmap' => Array(
'name' => 'displayname',
'email' => 'mail',
'email:alias' => 'alias',
'role' => 'nsroledn',
),
'sort' => 'displayname',
'scope' => 'sub',
'filter' => '(objectClass=kolabinetorgperson)',
'fuzzy_search' => true,
'sizelimit' => '0',
'timelimit' => '0',
'groups' => Array(
'base_dn' => 'ou=Groups,%dc',
'filter' => '(|(objectclass=groupofuniquenames)(objectclass=groupofurls))',
'object_classes' => Array('top', 'groupOfUniqueNames'),
'member_attr' => 'uniqueMember',
),
'domain_base_dn' => 'ou=Domains,dc=kolabsys,dc=net',
'domain_filter' => '(&(objectclass=domainrelatedobject)(associateddomain=%s))',
'domain_name_attr' => 'associateddomain',
);
// This will overwrite defined filter
$config['kolab_auth_filter'] = '(&(objectclass=kolabinetorgperson)(|(nsroledn=cn=imap-user,%dc)(nsroledn=cn=kolab-user,%dc))(|(uid=%u)(mail=%fu)))';
// Use this fields (from fieldmap configuration) to get authentication ID
$config['kolab_auth_login'] = 'email';
// Use these fields (from fieldmap configuration) for the default identity
$config['kolab_auth_name'] = array('name', 'cn');
$config['kolab_auth_alias'] = 'alias';
$config['kolab_auth_email'] = 'email';
$config['kolab_auth_role'] = 'role';
$config['kolab_auth_role_plugins'] = Array(
'cn=activesync-user,%dc' => Array('kolab_activesync'),
'cn=kolab-user,%dc' => Array(
'calendar',
'kolab_config',
'kolab_files',
'libkolab',
'libcalendaring',
'tasklist',
),
);
// Administrative group name to which user must be assigned to
// which adds privilege to login as another user.
$config['kolab_auth_group'] = 'Kolab Helpdesk';
if (file_exists(RCUBE_CONFIG_DIR . '/' . $_SERVER["HTTP_HOST"] . '/' . basename(__FILE__))) {
include_once(RCUBE_CONFIG_DIR . '/' . $_SERVER["HTTP_HOST"] . '/' . basename(__FILE__));
}
?>