[imp] autocomplete/search not working with LDAP in New Message mode

ANANT S ATHAVALE asa at isac.gov.in
Tue Jul 15 09:21:30 UTC 2008


Problem solved.  I had forgotten to set addressbooks in prefs.php of turba.

Regards,
ANANT.


Quoting ANANT S ATHAVALE <asa at isac.gov.in>:

> Dear List:
>
> I have the following settings in imp/prefs.php for address book.
>
> $_prefs['search_sources'] = array(
>     'value' => "localldap\tlocalsql",
>     'locked' => true,
>     'shared' => false,
>     'type' => 'implicit');
>
>
> $_prefs['search_fields'] = array(
>     'value' => "localldap\tname\temail\tstaffnumber\nlocalsql\tname\temail",
>     'locked' => true,
>     'shared' => false,
>     'type' => 'implicit');
>
> $_prefs['add_source'] = array(
>     'value' => 'localsql',
>     'locked' => true,
>     'shared' => true,
>     'type' => 'implicit'
> );
>
> and following settings in turba/sources.php
>
> $cfgSources['localsql'] = array(
>     'title' => _("My Address Book"),
>     'type' => 'sql',
>     // The default connection details are pulled from the Horde-wide SQL
>     // connection configuration.
>     'params' => array_merge($GLOBALS['conf']['sql'], array('table' =>
> 'turba_objects')),
>     // Using two tables as datasource.
>     // 'params' => array_merge($GLOBALS['conf']['sql'],
>     //                         array('table' => 'leaddetails LEFT JOIN
> leadaddress ON leaddetails.leadid = leadaddress.leadaddressid',
>     //                               'filter' => 'leaddetails.converted
> = 0')),
>     'map' => array(
>         '__key' => 'object_id',
>         '__owner' => 'owner_id',
>         '__type' => 'object_type',
>         '__members' => 'object_members',
>         '__uid' => 'object_uid',
>         'firstname' => 'object_firstname',
>         'lastname' => 'object_lastname',
>         'middlenames' => 'object_middlenames',
>         'namePrefix' => 'object_nameprefix',
>         'nameSuffix' => 'object_namesuffix',
>         'name' => array('fields' => array('namePrefix', 'firstname',
>                                           'middlenames', 'lastname',
>                                           'nameSuffix'),
>                         'format' => '%s %s %s %s %s',
>                         'parse' => array(
>                             array('fields' => array('firstname',
> 'middlenames',
>                                                     'lastname'),
>                                   'format' => '%s %s %s'),
>                             array('fields' => array('firstname', 'lastname'),
>                                   'format' => '%s %s'))),
>         // 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'),
>         'alias' => 'object_alias',
>         'birthday' => 'object_bday',
>         'homeStreet' => 'object_homestreet',
>         'homePOBox' => 'object_homepob',
>         'homeCity' => 'object_homecity',
>         'homeProvince' => 'object_homeprovince',
>         'homePostalCode' => 'object_homepostalcode',
>         'homeCountry' => 'object_homecountry',
>         // This is an example composite field for addresses, so you can
> display
>         // the various map links. If you use this, be sure to add
> 'homeAddress'
>         // to the 'tabs' parameter below.
>         //'homeAddress' => array('fields' => array('homeStreet', 'homeCity',
>         //                                         'homeProvince',
>         //                                         'homePostalCode'),
>         //                       'format' => "%s \n %s, %s  %s"),
>         'workStreet' => 'object_workstreet',
>         'workPOBox' => 'object_workpob',
>         'workCity' => 'object_workcity',
>         'workProvince' => 'object_workprovince',
>         'workPostalCode' => 'object_workpostalcode',
>         'workCountry' => 'object_workcountry',
>         'timezone' => 'object_tz',
>         'email' => 'object_email',
>         'homePhone' => 'object_homephone',
>         'workPhone' => 'object_workphone',
>         'cellPhone' => 'object_cellphone',
>         'fax' => 'object_fax',
>         'pager' => 'object_pager',
>         'title' => 'object_title',
>         'role' => 'object_role',
>         'company' => 'object_company',
>         'category' => 'object_category',
>         'notes' => 'object_notes',
>         'website' => 'object_url',
>         'freebusyUrl' => 'object_freebusyurl',
>         'pgpPublicKey' => 'object_pgppublickey',
>         'smimePublicKey' => 'object_smimepublickey',
>     ),
>     'tabs' => array(
>         _("Personal") => array('firstname', 'lastname', 'middlenames',
>                                'namePrefix', 'nameSuffix', 'name', 'alias',
>                                'birthday'),
>         _("Location") => array('homeStreet', 'homePOBox', 'homeCity',
>                                'homeProvince', 'homePostalCode',
> 'homeCountry',
>                                'workStreet', 'workPOBox', 'workCity',
>                                'workProvince', 'workPostalCode',
> 'workCountry',
>                                'timezone'),
>         _("Communications") => array('email', 'homePhone', 'workPhone',
>                                      'cellPhone', 'fax', 'pager'),
>         _("Organization") => array('title', 'role', 'company'),
>         _("Other") => array('category', 'notes', 'website', 'freebusyUrl',
>                             'pgpPublicKey', 'smimePublicKey'),
>     ),
>     'search' => array(
>         'name',
>         'email'
>     ),
>     'strict' => array(
>         'object_id',
>         'owner_id',
>         'object_type',
>     ),
>     'export' => true,
>     'browse' => true,
>     'use_shares' => true,
>     'list_name_field' => 'lastname',
> );
>
>
> $cfgSources['localldap'] = array(
>     'title' => _("LDAP Directory"),
>     'type' => 'ldap',
>     'params' => array(
>          'server' => 'ldapserver',
>          'port' => 389,
>          'tls' => false,
>          'root' => 'dc=abcde',
>          'bind_dn' => 'cn=Manager,dc=abcde',
>          'bind_password' => 'password',
>          'sizelimit' => 0,
>          'dn' => array('cn'),
>          'objectclass' => array('employee'),
>          'scope' => 'sub',
>          'charset' => 'iso-8859-1',
>          'checkrequired' => false,
>          'checkrequired_string' => ' ',
>          'checksyntax' => false,
>          'version' => 3
>      ),
>      'map' => array(
>          '__key' => 'dn',
>          '__uid' => 'uid',
>          'name' => 'cn',
>          'email' => 'mail',
>          'staffnumber' => 'staffnumber'
>      ),
>      'search' => array(
>          'name',
>          'email',
>          'staffnumber'
>      ),
>      'strict' => array(
>          'dn'
>      ),
>      'approximate' => array(
>          'name'
>      ),
>      'export' => false,
>      'browse' => false
> );
>
> Using Horde Groupware Webmail Edition  1.1.1.
>
>
> Autocomplete works only with local address book.  Even Addressbook
> search while composing a mail does not work with LDAP address book.
> Whereas everything works fine in Turba.
>
> There was a similar problem mentioned in this list, but for him, it was
> working for first source only.  But, in my case, even if I change the
> order of source, LDAP search is not working.
>
> Please point me how to debug.  Similar configuration works in IMP 4.1.5.
>
> Regards,
> ANANT.
>
> -- 
> IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org



Regards,

Anant Athavale.


More information about the imp mailing list