
Поменял порт на 389 - стал получать все данные из ADLDAP
 Ух! Дерожись адресная книшка!
  Ух! Дерожись адресная книшка!    
Модератор: xM

 Ух! Дерожись адресная книшка!
  Ух! Дерожись адресная книшка!    
Такой же косякLarin писал(а):жмешь создать сообщение пишет "no contacts found"

Код: Выделить всё
$rcmail_config['ldap_public']['Address Book'] = array(
    'name'              => 'Address Book',
    'hosts'             => array('10.10.0.1'),
    'port'              => 389,
    'use_tls'           => false,
    'user_specific'     => false,
    'base_dn'           => 'OU=otdels,DC=domain,DC=local',
    'bind_dn'           => 'CN=roundcube,CN=Users,DC=domain,DC=local',
    'bind_pass'         => 'roundcube',
    'writable'          => false,
    'ldap_version'      => 3,       // using LDAPv3
    'search_fields'     => array('mail', 'dispayName'),  
    'name_field'        => 'displayName',   
    'email_field'       => 'mail',  
    'surname_field'     => 'sn',    
    'firstname_field'   => 'givenname',  
    'sort'              => 'cn',    
    'scope'             => 'sub',   
    'filter'            => '(mail=*)',   
    'fuzzy_search'      => true);  
userAccountControl вам в помощь, если это AD конечноName писал(а):Код: Выделить всё
filter' => '(mail=*)',

Код: Выделить всё
'filter'            => '(&(mail=*)(userAccountControl=512))',   
 Код: Выделить всё
$rcmail_config['ldap_public']['Trans'] = array(
  'name'          => 'Trans',
  'hosts'         => array('xxx.xxx.xxx.xxx'),
  'port'          => 389,
  'use_tls'         => false,
  'user_specific' => false,   
  'base_dn'       => 'DC=Trans',
  'bind_dn'       => 'TRANS\Admin',
  'bind_pass'     => 'Password',
  'writable'      => false,
  'LDAP_Object_Classes' => array("top", "inetOrgPerson"), 
  'required_fields'     => array("cn", "sn", "mail"),
  'LDAP_rdn'      => 'mail',
  'ldap_version'  => 3,     
  'search_fields' => array('mail', 'cn'), 
  'name_field'    => 'cn',    
  'email_field'   => 'mail',  
  'surname_field' => 'sn',    
  'firstname_field' => 'gn',  
  'sort'          => 'cn',  
  'scope'         => 'sub',   
  'filter'        => '(&(objectClass=person)(mail=*))',  
  'fuzzy_search'  => true);Код: Выделить всё
$rcmail_config['ldap_public']['COMPANY'] = array(
  'name'          => 'COMPANY',
  'hosts'         => array('boss2.company.ru'),
  'port'          => 3268,
  'use_tls'         => false,
  'user_specific' => false,   // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
  'base_dn'       => 'DC=company,DC=ru',
  'bind_dn'       => 'CN=ldap ldap,CN=Users,DC=company,DC=ru',
  'bind_pass'     => 'password',
  'writable'      => false,   // Indicates if we can write to the LDAP directory or not.
  'LDAP_Object_Classes' => array("top", "inetOrgPerson"), // To create a new contact these are the object classes to specify (or any other classes you wish to use).
  'required_fields'     => array("cn", "sn", "mail"),     // The required fields needed to build a new contact as required by the object classes (can include additional fields not required by the object classes).
  'LDAP_rdn'      => 'mail', // The RDN field that is used for new entries, this field needs to be one of the search_fields, the base of base_dn is appended to the RDN to insert into the LDAP directory.
  'ldap_version'  => 3,       // using LDAPv3
  'search_fields' => array('mail', 'sn','cn'),  // fields to search in
  'name_field'    => 'cn',    // this field represents the contact's name
  'email_field'   => 'mail',  // this field represents the contact's e-mail
  'surname_field' => 'sn',    // this field represents the contact's last name
  'firstname_field' => 'givenName',  // this field represents the contact's first name
  'sort'          => 'cn',    // The field to sort the listing by.
  'scope'         => 'sub',   // search mode: sub|base|list
  'filter'        => '(&(mail=*)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(|(&(ObjectClass=user)(!(ObjectClass=computer)))(objectClass=group)))',
   // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
  'fuzzy_search'  => true);   // server allows wildcard search
// An ordered array of the ids of the addressbooks that should be searched
// when populating address autocomplete fields server-side. ex: array('sql','Verisign');
$rcmail_config['autocomplete_addressbooks'] = array('ldap');
Why SQL?gyash писал(а):Люди помогите вот мой конфиг круглолуба
$rcmail_config['address_book_type'] = 'sql';
Код: Выделить всё
[quote="CrazyPilot"]У меня работает в таком виде (домен на 2k3 R2)
[code]
$rcmail_config['ldap_public']['COMPANY'] = array(
  'name'          => 'COMPANY',
  'hosts'         => array('boss2.company.ru'),
  'port'          => 3268,
  'use_tls'         => false,
  'user_specific' => false,   // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
  'base_dn'       => 'DC=company,DC=ru',
  'bind_dn'       => 'CN=ldap ldap,CN=Users,DC=company,DC=ru',
  'bind_pass'     => 'password',
  'writable'      => false,   // Indicates if we can write to the LDAP directory or not.
  'LDAP_Object_Classes' => array("top", "inetOrgPerson"), // To create a new contact these are the object classes to specify (or any other classes you wish to use).
  'required_fields'     => array("cn", "sn", "mail"),     // The required fields needed to build a new contact as required by the object classes (can include additional fields not required by the object classes).
  'LDAP_rdn'      => 'mail', // The RDN field that is used for new entries, this field needs to be one of the search_fields, the base of base_dn is appended to the RDN to insert into the LDAP directory.
  'ldap_version'  => 3,       // using LDAPv3
  'search_fields' => array('mail', 'sn','cn'),  // fields to search in
  'name_field'    => 'cn',    // this field represents the contact's name
  'email_field'   => 'mail',  // this field represents the contact's e-mail
  'surname_field' => 'sn',    // this field represents the contact's last name
  'firstname_field' => 'givenName',  // this field represents the contact's first name
  'sort'          => 'cn',    // The field to sort the listing by.
  'scope'         => 'sub',   // search mode: sub|base|list
  'filter'        => '(&(mail=*)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(|(&(ObjectClass=user)(!(ObjectClass=computer)))(objectClass=group)))',
   // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
  'fuzzy_search'  => true);   // server allows wildcard search
// An ordered array of the ids of the addressbooks that should be searched
// when populating address autocomplete fields server-side. ex: array('sql','Verisign');
$rcmail_config['autocomplete_addressbooks'] = array('ldap');
Код: Выделить всё
// 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'] = 'ldap';Код: Выделить всё
[quote="CrazyPilot"]Ниасилили английский?
[code]// 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'] = 'ldap';[Thu May 13 10:22:15 2010] [notice] Apache/2.2.15 (FreeBSD) mod_ssl/2.2.15 OpenSSL/0.9.8k DAV/2 PHP/5.2.9 with Suhosin-Patch configured -- resuming normal operationsCrazyPilot писал(а):телепатируем содержимое логов web сервака.
Код: Выделить всё
cat main.inc.php | grep \\$
$rcmail_config = array();
$rcmail_config['debug_level'] = 8;
$rcmail_config['log_driver'] = 'file';
$rcmail_config['log_date_format'] = 'd-M-Y H:i:s O';
$rcmail_config['syslog_id'] = 'roundcube';
$rcmail_config['syslog_facility'] = LOG_USER;
$rcmail_config['smtp_log'] = true;
$rcmail_config['log_logins'] = false;
$rcmail_config['sql_debug'] = false;
$rcmail_config['imap_debug'] = false;
$rcmail_config['ldap_debug'] = false;
$rcmail_config['smtp_debug'] = false;
$rcmail_config['default_host'] = 'ssl://localhost:993';
$rcmail_config['default_port'] = 993;
$rcmail_config['imap_auth_type'] = null;
$rcmail_config['imap_root'] = null;
$rcmail_config['imap_delimiter'] = null;
$rcmail_config['imap_force_caps'] = false;
$rcmail_config['smtp_server'] = 'localhost';
$rcmail_config['smtp_port'] = 9025;
$rcmail_config['smtp_user'] = '%u';
$rcmail_config['smtp_pass'] = '%p';
$rcmail_config['smtp_auth_type'] = 'PLAIN';
$rcmail_config['smtp_helo_host'] = '';
$rcmail_config['enable_installer'] = true;
$rcmail_config['log_dir'] = 'logs/';
$rcmail_config['temp_dir'] = 'temp/';
$rcmail_config['enable_caching'] = false;
$rcmail_config['message_cache_lifetime'] = '10d';
$rcmail_config['force_https'] = false;
$rcmail_config['auto_create_user'] = true;
$rcmail_config['skin_include_php'] = false;
$rcmail_config['session_lifetime'] = 10;
$rcmail_config['ip_check'] = false;
$rcmail_config['double_auth'] = false;
$rcmail_config['des_key'] = 'rcmail-!24ByteDESkey*Str';
$rcmail_config['username_domain'] = '';
$rcmail_config['mail_domain'] = '';
$rcmail_config['password_charset'] = 'ISO-8859-1';
$rcmail_config['sendmail_delay'] = 0;
$rcmail_config['max_recipients'] = 0;
$rcmail_config['max_group_members'] = 0;
$rcmail_config['useragent'] = 'RoundCube Webmail/'.RCMAIL_VERSION;
$rcmail_config['product_name'] = 'ISKER Webmail';
$rcmail_config['include_host_config'] = false;
$rcmail_config['generic_message_footer'] = '';
$rcmail_config['http_received_header'] = false;
$rcmail_config['http_received_header_encrypt'] = false;
$rcmail_config['mail_header_delimiter'] = NULL;
$rcmail_config['session_domain'] = '';
$rcmail_config['dont_override'] = array();
$rcmail_config['identities_level'] = 0;
$rcmail_config['mime_magic'] = '/usr/share/misc/magic';
$rcmail_config['email_dns_check'] = false;
$rcmail_config['plugins'] = array();
$rcmail_config['message_sort_col'] = 'date';
$rcmail_config['message_sort_order'] = 'DESC';
$rcmail_config['list_cols'] = array('subject', 'from', 'date', 'size', 'flag', 'attachment');
$rcmail_config['language'] = null;
$rcmail_config['date_short'] = 'D H:i';
$rcmail_config['date_long'] = 'd.m.Y H:i';
$rcmail_config['date_today'] = 'H:i';
$rcmail_config['drafts_mbox'] = 'Drafts';
$rcmail_config['junk_mbox'] = 'Junk';
$rcmail_config['sent_mbox'] = 'Sent';
$rcmail_config['trash_mbox'] = 'Trash';
$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
$rcmail_config['create_default_folders'] = true;
$rcmail_config['protect_default_folders'] = true;
$rcmail_config['quota_zero_as_unlimited'] = false;
$rcmail_config['mdn_requests'] = 0;
$rcmail_config['enable_spellcheck'] = true;
$rcmail_config['spellcheck_engine'] = 'googie';
// 'http://' . $_SERVER['HTTP_HOST'] . '/spellchecker.php?lang='
$rcmail_config['spellcheck_uri'] = '';
$rcmail_config['spellcheck_languages'] = NULL;
$rcmail_config['max_pagesize'] = 200;
$rcmail_config['min_keep_alive'] = 60;
$rcmail_config['address_book_type'] = 'ldap';
$rcmail_config['ldap_public'] = array();
$rcmail_config['ldap_public']['ISKER.KZ'] = array(
$rcmail_config['autocomplete_addressbooks'] = array('ldap','sql');
$rcmail_config['default_charset'] = 'UTF-8';
$rcmail_config['default_charset'] = 'ISO-8859-1';
$rcmail_config['skin'] = 'default';
$rcmail_config['pagesize'] = 40;
$rcmail_config['timezone'] = 'auto';
$rcmail_config['dst_active'] = (bool)date('I');
$rcmail_config['prefer_html'] = true;
$rcmail_config['show_images'] = 0;
$rcmail_config['htmleditor'] = true;
$rcmail_config['prettydate'] = true;
$rcmail_config['draft_autosave'] = 300;
$rcmail_config['preview_pane'] = true;
$rcmail_config['preview_pane_mark_read'] = 0;
$rcmail_config['focus_on_new_message'] = true;
$rcmail_config['logout_purge'] = false;
$rcmail_config['logout_expunge'] = false;
$rcmail_config['inline_images'] = true;
$rcmail_config['mime_param_folding'] = 1;
$rcmail_config['skip_deleted'] = false;
$rcmail_config['read_when_deleted'] = true;
$rcmail_config['flag_for_deletion'] = false;
$rcmail_config['keep_alive'] = 60;
$rcmail_config['check_all_folders'] = false;
$rcmail_config['display_next'] = false;
$rcmail_config['autoexpand_threads'] = 0;
$rcmail_config['top_posting'] = false;
$rcmail_config['strip_existing_sig'] = true;
$rcmail_config['show_sig'] = 1;
$rcmail_config['sig_above'] = false;
$rcmail_config['force_7bit'] = false;
// Please note that folder names should to be in sync with $rcmail_config['default_imap_folders']
$rcmail_config['search_mods'] = null;  // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
$rcmail_config['delete_always'] = false;
Код: Выделить всё
cat main.inc.php | grep -v "^\s*//" | grep -v "^$"
Код: Выделить всё
<?php
/*
 +-----------------------------------------------------------------------+
 | Main configuration file                                               |
 |                                                                       |
 | This file is part of the RoundCube Webmail client                     |
 | Copyright (C) 2005-2009, RoundCube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 +-----------------------------------------------------------------------+
*/
$rcmail_config = array();
$rcmail_config['debug_level'] = 8;
$rcmail_config['log_driver'] = 'file';
$rcmail_config['log_date_format'] = 'd-M-Y H:i:s O';
$rcmail_config['syslog_id'] = 'roundcube';
$rcmail_config['syslog_facility'] = LOG_USER;
$rcmail_config['smtp_log'] = true;
$rcmail_config['log_logins'] = false;
$rcmail_config['sql_debug'] = false;
$rcmail_config['imap_debug'] = false;
$rcmail_config['ldap_debug'] = false;
$rcmail_config['smtp_debug'] = false;
$rcmail_config['default_host'] = 'ssl://localhost:993';
$rcmail_config['default_port'] = 993;
$rcmail_config['imap_auth_type'] = null;
$rcmail_config['imap_root'] = null;
$rcmail_config['imap_delimiter'] = null;
$rcmail_config['imap_force_caps'] = false;
$rcmail_config['smtp_server'] = 'localhost';
$rcmail_config['smtp_port'] = 9025;
$rcmail_config['smtp_user'] = '%u';
$rcmail_config['smtp_pass'] = '%p';
$rcmail_config['smtp_auth_type'] = 'PLAIN';
$rcmail_config['smtp_helo_host'] = '';
$rcmail_config['enable_installer'] = true;
$rcmail_config['log_dir'] = 'logs/';
$rcmail_config['temp_dir'] = 'temp/';
$rcmail_config['enable_caching'] = false;
$rcmail_config['message_cache_lifetime'] = '10d';
$rcmail_config['force_https'] = false;
$rcmail_config['auto_create_user'] = true;
$rcmail_config['skin_include_php'] = false;
$rcmail_config['session_lifetime'] = 10;
$rcmail_config['ip_check'] = false;
$rcmail_config['double_auth'] = false;
$rcmail_config['des_key'] = 'rcmail-!24ByteDESkey*Str';
$rcmail_config['username_domain'] = '';
$rcmail_config['mail_domain'] = '';
$rcmail_config['password_charset'] = 'ISO-8859-1';
$rcmail_config['sendmail_delay'] = 0;
$rcmail_config['max_recipients'] = 0;
$rcmail_config['max_group_members'] = 0;
$rcmail_config['useragent'] = 'RoundCube Webmail/'.RCMAIL_VERSION;
$rcmail_config['product_name'] = 'ISKER Webmail';
$rcmail_config['include_host_config'] = false;
$rcmail_config['generic_message_footer'] = '';
$rcmail_config['http_received_header'] = false;
$rcmail_config['http_received_header_encrypt'] = false;
$rcmail_config['mail_header_delimiter'] = NULL;
$rcmail_config['session_domain'] = '';
$rcmail_config['dont_override'] = array();
$rcmail_config['identities_level'] = 0;
$rcmail_config['mime_magic'] = '/usr/share/misc/magic';
$rcmail_config['email_dns_check'] = false;
$rcmail_config['plugins'] = array();
$rcmail_config['message_sort_col'] = 'date';
$rcmail_config['message_sort_order'] = 'DESC';
$rcmail_config['list_cols'] = array('subject', 'from', 'date', 'size', 'flag', 'attachment');
$rcmail_config['language'] = null;
$rcmail_config['date_short'] = 'D H:i';
$rcmail_config['date_long'] = 'd.m.Y H:i';
$rcmail_config['date_today'] = 'H:i';
$rcmail_config['drafts_mbox'] = 'Drafts';
$rcmail_config['junk_mbox'] = 'Junk';
$rcmail_config['sent_mbox'] = 'Sent';
$rcmail_config['trash_mbox'] = 'Trash';
$rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
$rcmail_config['create_default_folders'] = true;
$rcmail_config['protect_default_folders'] = true;
$rcmail_config['quota_zero_as_unlimited'] = false;
$rcmail_config['mdn_requests'] = 0;
$rcmail_config['enable_spellcheck'] = true;
$rcmail_config['spellcheck_engine'] = 'googie';
$rcmail_config['spellcheck_uri'] = '';
$rcmail_config['spellcheck_languages'] = NULL;
$rcmail_config['max_pagesize'] = 200;
$rcmail_config['min_keep_alive'] = 60;
$rcmail_config['address_book_type'] = 'ldap';
$rcmail_config['ldap_public'] = array();
/*
 * example config for Verisign directory
 *
$rcmail_config['ldap_public']['ISKER.KZ'] = array(
  'name'          => 'ISKER.KZ',
  'hosts'         => array('192.168.15.2'),
  'port'          => 389,
  'use_tls'         => false,
  'user_specific' => false,   // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
  // %fu - The full username provided, assumes the username is an email
  //       address, uses the username_domain value if not an email address.
  // %u  - The username prior to the '@'.
  // %d  - The domain name after the '@'.
  'base_dn'       => 'DC=ISKER,DC=KZ',
  'bind_dn'       => 'cn=administrator,dc=isker,dc=kz',
  'bind_pass'     => '********',
  'writable'      => false,   // Indicates if we can write to the LDAP directory or not.
  // If writable is true then these fields need to be populated:
  // LDAP_Object_Classes, required_fields, LDAP_rdn
  'LDAP_Object_Classes' => array("top", "inetOrgPerson"), // To create a new contact these are the object classes to specify (or any other classes you wish t
  'required_fields'     => array("cn", "sn", "mail"),     // The required fields needed to build a new contact as required by the object classes (can include
  'LDAP_rdn'      => 'mail', // The RDN field that is used for new entries, this field needs to be one of the search_fields, the base of base_dn is appended
  'ldap_version'  => 3,       // using LDAPv3
  'search_fields' => array('mail', 'cn'),  // fields to search in
  'name_field'    => 'cn',    // this field represents the contact's name
  'email_field'   => 'mail',  // this field represents the contact's e-mail
  'surname_field' => 'sn',    // this field represents the contact's last name
  'firstname_field' => 'givenName',  // this field represents the contact's first name
  'sort'          => 'cn',    // The field to sort the listing by.
  'scope'         => 'sub',   // search mode: sub|base|list
  'filter'        => '(&(objectClass=user)(mail=*))',      // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
  'fuzzy_search'  => true     // server allows wildcard search
  //'sizelimit'     => '0',     // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
  //'global_search' => true,
  //'timelimit'     => '0',     // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
);
*/
$rcmail_config['autocomplete_addressbooks'] = array('ldap','sql');
$rcmail_config['default_charset'] = 'UTF-8';
$rcmail_config['default_charset'] = 'ISO-8859-1';
$rcmail_config['skin'] = 'default';
$rcmail_config['pagesize'] = 40;
$rcmail_config['timezone'] = 'auto';
$rcmail_config['dst_active'] = (bool)date('I');
$rcmail_config['prefer_html'] = true;
$rcmail_config['show_images'] = 0;
$rcmail_config['htmleditor'] = true;
$rcmail_config['prettydate'] = true;
$rcmail_config['draft_autosave'] = 300;
$rcmail_config['preview_pane'] = true;
$rcmail_config['preview_pane_mark_read'] = 0;
$rcmail_config['focus_on_new_message'] = true;
$rcmail_config['logout_purge'] = false;
$rcmail_config['logout_expunge'] = false;
$rcmail_config['inline_images'] = true;
$rcmail_config['mime_param_folding'] = 1;
$rcmail_config['skip_deleted'] = false;
$rcmail_config['read_when_deleted'] = true;
$rcmail_config['flag_for_deletion'] = false;
$rcmail_config['keep_alive'] = 60;
$rcmail_config['check_all_folders'] = false;
$rcmail_config['display_next'] = false;
$rcmail_config['autoexpand_threads'] = 0;
$rcmail_config['top_posting'] = false;
$rcmail_config['strip_existing_sig'] = true;
$rcmail_config['show_sig'] = 1;
$rcmail_config['sig_above'] = false;
$rcmail_config['force_7bit'] = false;
$rcmail_config['search_mods'] = null;  // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
$rcmail_config['delete_always'] = false;
?>
Код: Выделить всё
$rcmail_config['ldap_public'] = array();
Код: Выделить всё
/*
 * example config for Verisign directory
 *
$rcmail_config['ldap_public']['ISKER.KZ'] = array(
  'name'          => 'ISKER.KZ',
  'hosts'         => array('192.168.15.2'),
  'port'          => 389,
  'use_tls'         => false,
  'user_specific' => false,   // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
  // %fu - The full username provided, assumes the username is an email
  //       address, uses the username_domain value if not an email address.
  // %u  - The username prior to the '@'.
  // %d  - The domain name after the '@'.
  'base_dn'       => 'DC=ISKER,DC=KZ',
  'bind_dn'       => 'cn=administrator,dc=isker,dc=kz',
  'bind_pass'     => '********',
  'writable'      => false,   // Indicates if we can write to the LDAP directory or not.
  // If writable is true then these fields need to be populated:
  // LDAP_Object_Classes, required_fields, LDAP_rdn
  'LDAP_Object_Classes' => array("top", "inetOrgPerson"), // To create a new contact these are the object classes to specify (or any other classes you wish t
  'required_fields'     => array("cn", "sn", "mail"),     // The required fields needed to build a new contact as required by the object classes (can include
  'LDAP_rdn'      => 'mail', // The RDN field that is used for new entries, this field needs to be one of the search_fields, the base of base_dn is appended
  'ldap_version'  => 3,       // using LDAPv3
  'search_fields' => array('mail', 'cn'),  // fields to search in
  'name_field'    => 'cn',    // this field represents the contact's name
  'email_field'   => 'mail',  // this field represents the contact's e-mail
  'surname_field' => 'sn',    // this field represents the contact's last name
  'firstname_field' => 'givenName',  // this field represents the contact's first name
  'sort'          => 'cn',    // The field to sort the listing by.
  'scope'         => 'sub',   // search mode: sub|base|list
  'filter'        => '(&(objectClass=user)(mail=*))',      // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
  'fuzzy_search'  => true     // server allows wildcard search
  //'sizelimit'     => '0',     // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
  //'global_search' => true,
  //'timelimit'     => '0',     // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
);
*/
Код: Выделить всё
$rcmail_config['autocomplete_addressbooks'] = array('ldap','sql');
Код: Выделить всё
[quote="CrazyPilot"]Ну ппц.
Это убрать.
[code]
$rcmail_config['ldap_public'] = array();
Код: Выделить всё
/*
 * example config for Verisign directory
 *
$rcmail_config['ldap_public']['ISKER.KZ'] = array(
  'name'          => 'ISKER.KZ',
  'hosts'         => array('192.168.15.2'),
  'port'          => 389,
  'use_tls'         => false,
  'user_specific' => false,   // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
  // %fu - The full username provided, assumes the username is an email
  //       address, uses the username_domain value if not an email address.
  // %u  - The username prior to the '@'.
  // %d  - The domain name after the '@'.
  'base_dn'       => 'DC=ISKER,DC=KZ',
  'bind_dn'       => 'cn=administrator,dc=isker,dc=kz',
  'bind_pass'     => '********',
  'writable'      => false,   // Indicates if we can write to the LDAP directory or not.
  // If writable is true then these fields need to be populated:
  // LDAP_Object_Classes, required_fields, LDAP_rdn
  'LDAP_Object_Classes' => array("top", "inetOrgPerson"), // To create a new contact these are the object classes to specify (or any other classes you wish t
  'required_fields'     => array("cn", "sn", "mail"),     // The required fields needed to build a new contact as required by the object classes (can include
  'LDAP_rdn'      => 'mail', // The RDN field that is used for new entries, this field needs to be one of the search_fields, the base of base_dn is appended
  'ldap_version'  => 3,       // using LDAPv3
  'search_fields' => array('mail', 'cn'),  // fields to search in
  'name_field'    => 'cn',    // this field represents the contact's name
  'email_field'   => 'mail',  // this field represents the contact's e-mail
  'surname_field' => 'sn',    // this field represents the contact's last name
  'firstname_field' => 'givenName',  // this field represents the contact's first name
  'sort'          => 'cn',    // The field to sort the listing by.
  'scope'         => 'sub',   // search mode: sub|base|list
  'filter'        => '(&(objectClass=user)(mail=*))',      // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
  'fuzzy_search'  => true     // server allows wildcard search
  //'sizelimit'     => '0',     // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
  //'global_search' => true,
  //'timelimit'     => '0',     // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
);
*/
Код: Выделить всё
$rcmail_config['autocomplete_addressbooks'] = array('ldap','sql');
Код: Выделить всё
$rcmail_config['address_book_type'] = 'ldap';
/*
 * example config for Verisign directory
 *
$rcmail_config['ldap_public']['ISKER.KZ'] = array(
  'name'          => 'ISKER.KZ',
  'hosts'         => array('192.168.15.2'),
  'port'          => 3268,
  'use_tls'         => false,
  'user_specific' => false,
  'base_dn'       => 'DC=ISKER',
  'bind_dn'       => 'administrator@isker.kz',
  'bind_pass'     => 'Sk272BV4',
  'writable'      => false,
  'LDAP_Object_Classes' => array("top", "inetOrgPerson"),
  'required_fields'     => array("cn", "sn", "mail"),
  'LDAP_rdn'      => 'mail',
  'ldap_version'  => 3,
  'search_fields' => array('mail', 'cn'),
  'name_field'    => 'cn',
  'email_field'   => 'mail',
  'surname_field' => 'sn',
  'firstname_field' => 'givenname',
  'sort'          => 'cn',
  'scope'         => 'sub',
  'filter'        => '(mail=*)',
  'fuzzy_search'  => true
  //'sizelimit'     => '0',
  //'global_search' => true,
  //'timelimit'     => '0',
);
$rcmail_config['autocomplete_addressbooks'] = array('ldap');
 
 CrazyPilot писал(а):
коменты сверху /* и *, бл@