PageRenderTime 68ms CodeModel.GetById 27ms RepoModel.GetById 1ms app.codeStats 0ms

/iRedMail/samples/roundcubemail/global_ldap_address_book.inc.php

https://bitbucket.org/zhb/iredmail
PHP | 70 lines | 62 code | 5 blank | 3 comment | 0 complexity | bb9c2242ed60aadb33c7e4acac5562cc MD5 | raw file
  1. // Global LDAP address book.
  2. $config['ldap_public']["global_ldap_abook"] = array(
  3. 'name' => 'Global LDAP Address Book',
  4. 'hosts' => array('PH_LDAP_SERVER_HOST'),
  5. 'port' => PH_LDAP_SERVER_PORT,
  6. 'use_tls' => false,
  7. 'ldap_version' => '3',
  8. 'network_timeout' => 10,
  9. 'user_specific' => true,
  10. // Search mail users under same domain.
  11. 'base_dn' => 'domainName=%d,PH_LDAP_BASEDN',
  12. 'bind_dn' => 'mail=%u@%d,ou=Users,domainName=%d,PH_LDAP_BASEDN',
  13. 'hidden' => false,
  14. 'searchonly' => false,
  15. 'writable' => false,
  16. 'search_fields' => array('mail', 'cn', 'sn', 'givenName', 'street', 'telephoneNumber', 'mobile', 'stree', 'postalCode'),
  17. // mapping of contact fields to directory attributes
  18. 'fieldmap' => array(
  19. 'name' => 'cn',
  20. 'surname' => 'sn',
  21. 'firstname' => 'givenName',
  22. 'title' => 'title',
  23. 'email' => 'mail:*',
  24. 'phone:work' => 'telephoneNumber',
  25. 'phone:mobile' => 'mobile',
  26. 'street' => 'street',
  27. 'zipcode' => 'postalCode',
  28. 'locality' => 'l',
  29. 'department' => 'departmentNumber',
  30. 'notes' => 'description',
  31. 'name' => 'cn',
  32. 'surname' => 'sn',
  33. 'firstname' => 'givenName',
  34. 'title' => 'title',
  35. 'email' => 'mail:*',
  36. 'phone:work' => 'telephoneNumber',
  37. 'phone:mobile' => 'mobile',
  38. 'phone:workfax' => 'facsimileTelephoneNumber',
  39. 'street' => 'street',
  40. 'zipcode' => 'postalCode',
  41. 'locality' => 'l',
  42. 'department' => 'departmentNumber',
  43. 'notes' => 'description',
  44. 'photo' => 'jpegPhoto',
  45. ),
  46. 'sort' => 'cn',
  47. 'scope' => 'sub',
  48. 'filter' => '(&(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))',
  49. 'fuzzy_search' => true,
  50. 'vlv' => false, // Enable Virtual List View to more efficiently fetch paginated data (if server supports it)
  51. 'sizelimit' => '0', // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
  52. 'timelimit' => '0', // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
  53. 'referrals' => false, // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups
  54. 'group_filters' => array(
  55. 'departments' => array(
  56. 'name' => 'Mailing Lists',
  57. 'scope' => 'sub',
  58. 'base_dn' => 'domainName=%d,PH_LDAP_BASEDN',
  59. 'filter' => '(&(|(objectclass=mailList)(objectClass=mailAlias))(accountStatus=active)(enabledService=displayedInGlobalAddressBook))',
  60. 'name_attr' => 'cn',
  61. 'email' => 'mail',
  62. ),
  63. ),
  64. );
  65. $config['autocomplete_addressbooks'] = array('sql', 'global_ldap_abook');