Active Directory Horde 5.1.x Ubuntu 14.04

cp /usr/share/webmail/imp/config/backends.php{,.ori}
vi /usr/share/webmail/imp/config/backends.php

<?php

$servers['secure-imap']=array(
        'disabled'=>false,
        'name'=>'test.lan',
        'hostspec'=>'imap.test.lan',
        'hordeauth'=>full,
        'protocol'=>'imap',
        'port'=>993,
        'secure'=>'ssl',
        'maildomain'=>'test.lan',
        'acl'=>true,
        'cache'=>false,
);
$servers['imap']=array(
        'disabled'=>false,
        'name'=>'IMAPServer',
        'hostspec'=>'localhost',
        'hordeauth'=>false,
        'protocol'=>'imap',
        'port'=>143,
        'secure'=>'tls',
);

$servers['advanced']=array(
        'disabled'=>true,
        'name'=>'AdvancedIMAPServer',
        'hostspec'=>'localhost',
        'hordeauth'=>false,
        'protocol'=>'imap',
        'port'=>143,
        'secure'=>'tls',
        'maildomain'=>'',
'smtp'=>array(
),
'spam'=>array(
),
'admin'=>array(
),
        'acl'=>true,
        'cache'=>false,
        'quota'=>array(
        'driver'=>'imap',
        'params'=>array(
        'hide_when_unlimited'=>true,
        'unit'=>'MB'
)
),
'special_mboxes'=>array(
),
'autocreate_special'=>false,
);

cp /usr/share/webmail/config/conf.php{,.ori}
vi /usr/share/webmail/config/conf.php

<?php
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Id: 56a06c9745abf383eb7381c3efc537045bf0ba0c $
$conf['vhosts'] = false;
$conf['debug_level'] = E_ALL & ~E_NOTICE;
$conf['max_exec_time'] = 0;
$conf['compress_pages'] = true;
$conf['secret_key'] = '536e14ff-429c-4e6c-b459-0aabb08257c5';
$conf['umask'] = 077;
$conf['testdisable'] = true;
$conf['use_ssl'] = 2;
$conf['server']['name'] = $_SERVER['SERVER_NAME'];
$conf['urls']['token_lifetime'] = 30;
$conf['urls']['hmac_lifetime'] = 30;
$conf['urls']['pretty'] = false;
$conf['safe_ips'] = array();
$conf['session']['name'] = 'Horde';
$conf['session']['use_only_cookies'] = true;
$conf['session']['timeout'] = 0;
$conf['session']['cache_limiter'] = 'nocache';
$conf['session']['max_time'] = 72000;
$conf['cookie']['domain'] = $_SERVER['SERVER_NAME'];
$conf['cookie']['path'] = '/';
/* MySQL, normalement rien à faire */
$conf['sql']['username'] = 'horde';
$conf['sql']['password'] = 'password';
$conf['sql']['hostspec'] = '127.0.0.1';
$conf['sql']['port'] = 3306;
$conf['sql']['protocol'] = 'tcp';
$conf['sql']['database'] = 'horde';
$conf['sql']['charset'] = 'utf-8';
$conf['sql']['ssl'] = true;
$conf['sql']['splitread'] = false;
$conf['sql']['phptype'] = 'mysql';
$conf['nosql']['phptype'] = false;
/* Fin de MySQL */
/* LDAP-AD, a adapter selon vos besoins */
// nom du serveur utilisé pour la connexion
$conf['ldap']['hostspec'] = 'dc1.test.lan';
$conf['ldap']['port'] = 389;
$conf['ldap']['tls'] = false;
$conf['ldap']['version'] = 3;
// compte pour la connexion à l'annuaire AD
$conf['ldap']['binddn'] = 'TESTbind-ad';
$conf['ldap']['bindpw'] = 'Password';
$conf['ldap']['bindas'] = 'admin';
$conf['ldap']['useldap'] = true;
// compte qui servira pour se connecter avec le profil Admin
$conf['auth']['admins'] = array('toto');
$conf['auth']['checkip'] = true;
$conf['auth']['checkbrowser'] = true;
$conf['auth']['resetpassword'] = true;
$conf['auth']['alternate_login'] = false;
$conf['auth']['redirect_on_logout'] = false;
$conf['auth']['list_users'] = 'list';
$conf['auth']['params']['basedn'] = 'ou=Utilisateurs,dc=test,dc=lan';
$conf['auth']['params']['scope'] = 'sub';
$conf['auth']['params']['ad'] = true;
$conf['auth']['params']['uid'] = 'sAMAccountname';
$conf['auth']['params']['encryption'] = 'ssha';
$conf['auth']['params']['newuser_objectclass'] = array('Person');
// les utilisateurs doivent être membres du groupe Webmail pour se connecter à Horde
$conf['auth']['params']['filter'] = '(&(objectClass=user)(objectCategory=person)(memberOf=cn=Webmail,ou=Utilisateurs,dc=test,dc=lan))';
$conf['auth']['params']['password_expiration'] = 'no';
$conf['auth']['params']['driverconfig'] = 'horde';
$conf['auth']['driver'] = 'ldap';
/* Fin de la partie LDAP-AD */
// modifier les valeurs suivantes que lorsque les connexions sont concluantes
$conf['auth']['params']['count_bad_logins'] = false;
$conf['auth']['params']['login_block'] = false;
$conf['auth']['params']['login_block_count'] = 5;
$conf['auth']['params']['login_block_time'] = 5;
/* Fin du blocage des comptes */
$conf['signup']['allow'] = false;
$conf['log']['priority'] = 'INFO';
$conf['log']['ident'] = 'HORDE';
$conf['log']['name'] = LOG_USER;
$conf['log']['type'] = 'syslog';
$conf['log']['enabled'] = true;
$conf['log_accesskeys'] = false;
$conf['prefs']['params']['driverconfig'] = 'horde';
$conf['prefs']['driver'] = 'Sql';
$conf['alarms']['params']['driverconfig'] = 'horde';
$conf['alarms']['params']['ttl'] = 300;
$conf['alarms']['driver'] = 'Sql';
$conf['group']['driverconfig'] = 'horde';
$conf['group']['driver'] = 'Sql';
$conf['perms']['driverconfig'] = 'horde';
$conf['perms']['driver'] = 'Sql';
$conf['share']['no_sharing'] = false;
$conf['share']['auto_create'] = true;
$conf['share']['world'] = true;
$conf['share']['any_group'] = false;
$conf['share']['hidden'] = false;
$conf['share']['cache'] = false;
$conf['share']['driver'] = 'Sqlng';
$conf['cache']['default_lifetime'] = 86400;
$conf['cache']['params']['sub'] = 0;
$conf['cache']['driver'] = 'File';
$conf['cache']['use_memorycache'] = '';
$conf['cachecssparams']['url_version_param'] = true;
$conf['cachecss'] = false;
$conf['cachejsparams']['url_version_param'] = true;
$conf['cachejs'] = false;
$conf['cachethemes'] = false;
$conf['lock']['params']['driverconfig'] = 'horde';
$conf['lock']['driver'] = 'Sql';
$conf['token']['params']['driverconfig'] = 'horde';
$conf['token']['driver'] = 'Sql';
$conf['davstorage']['params']['driverconfig'] = 'horde';
$conf['davstorage']['driver'] = 'Sql';
/* Mailer, a adpter selon vos besoins */
$conf['mailer']['params']['host'] = 'smtp.test.lan';
$conf['mailer']['params']['port'] = 25;
/* $conf['mailer']['params']['port'] = 487; */
$conf['mailer']['params']['auth'] = false;
$conf['mailer']['type'] = 'smtp';
$conf['mailformat']['brokenrfc2231'] = false;
/* Fin de la partie Mailer */
$conf['vfs']['params']['driverconfig'] = 'horde';
$conf['vfs']['type'] = 'Sql';
$conf['sessionhandler']['type'] = 'Builtin';
$conf['sessionhandler']['hashtable'] = false;
$conf['spell']['driver'] = '';
$conf['gnupg']['keyserver'] = array('pool.sks-keyservers.net');
$conf['gnupg']['timeout'] = 10;
$conf['nobase64_img'] = false;
$conf['image']['driver'] = false;
$conf['exif']['driver'] = 'Bundled';
$conf['timezone']['location'] = 'ftp://ftp.iana.org/tz/tzdata-latest.tar.gz';
$conf['problems']['email'] = 'toto@test.lan';
$conf['problems']['maildomain'] = 'test.lan';
$conf['problems']['tickets'] = false;
$conf['problems']['attachments'] = true;
$conf['menu']['links']['help'] = 'all';
$conf['menu']['links']['prefs'] = 'authenticated';
$conf['menu']['links']['problem'] = 'all';
$conf['menu']['links']['login'] = 'all';
$conf['menu']['links']['logout'] = 'authenticated';
$conf['portal']['fixed_blocks'] = array();
$conf['accounts']['driver'] = 'null';
$conf['user']['verify_from_addr'] = false;
$conf['user']['select_view'] = true;
$conf['facebook']['enabled'] = false;
$conf['twitter']['enabled'] = false;
$conf['urlshortener'] = false;
$conf['weather']['provider'] = false;
$conf['imap']['enabled'] = false;
$conf['imsp']['enabled'] = false;
$conf['kolab']['enabled'] = false;
$conf['hashtable']['driver'] = 'none';
$conf['activesync']['enabled'] = true;
$conf['activesync']['emailsync'] = true;
$conf['activesync']['version'] = '14';
$conf['activesync']['autodiscovery'] = 'full';
$conf['activesync']['outlookdiscovery'] = false;
$conf['activesync']['logging']['type'] = 'horde';
$conf['activesync']['ping']['heartbeatmin'] = 60;
$conf['activesync']['ping']['heartbeatmax'] = 2700;
$conf['activesync']['ping']['heartbeatdefault'] = 480;
$conf['activesync']['ping']['deviceping'] = true;
$conf['activesync']['ping']['waitinterval'] = 15;
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */

Turba

  • Il est possible d'utiliser Turba depuis un annuaire Active Directory, à adapter selon les besoins :

cp /usr/share/webmail/turba/config/backends.php{,.ori}
vi /usr/share/webmail/turba/config/backends.php

<?php
$cfgSources['localldap'] = array(
    // Disabled by default
    'disabled' => false,
    'title' => _("Annuaire test"),
    'type' => 'ldap',
    'params' => array(
        'server' => 'dc1.test.lan',
        'port' => 389,
        'tls' => false,
        'root' => 'ou=Utilisateurs,dc=test,dc=lan',
        'bind_dn' => 'testbind-ad',
        'bind_password' => 'Password',
        'sizelimit' => 0,
        'dn' => array('cn'),
        'objectclass' => array('organizationalPerson',
                               'user',
                               'group',
                               'contact'),
        'scope' => 'sub',
        'charset' => 'utf-8',
        'checkrequired' => false,
        'checkrequired_string' => ' ',
        'checksyntax' => false,
        'version' => 3,
        'deref' => LDAP_DEREF_ALWAYS,
        'filter' => '&(SAMAccountName=*)(mail=*)',
        'referrals' => 0,
    ),
    'map' => array(
        '__key' => 'dn',

     'name' => 'displayname',
     'email' => 'mail',
        'testPhone' => 'testphone',
        'workPhone' => 'telephonenumber',
        'cellPhone' => 'mobiletelephonenumber',
        'testAddress' => 'testpostaladdress',
        'title' => 'title',
        'cellPhone' => 'mobile',
        'department' => 'department',
        'company' => 'company',
    ),
    'search' => array(
        'name',
        'email',
        'testPhone',
        'workPhone',
        'cellPhone',
        'testAddress'
    ),
    'strict' => array(
        'dn', 'uid'
    ),
    'approximate' => array(
        'cn',
    ),
    'export' => true,
    'browse' => true,
);
?>