Roundcube + адресная книга LDAP

EXIM, sendmail, postfix, Dovecot и прочие. Решение проблем связанных с работой электронной почты

Модератор: xM

Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
Гость
проходил мимо

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение Гость » 2009-07-29 9:43:42

Оп-оп! Помог LDAPAdmin =)
Поменял порт на 389 - стал получать все данные из ADLDAP =) Ух! Дерожись адресная книшка! :Yahoo!:

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

Daggers
проходил мимо

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение Daggers » 2009-07-30 9:42:59

Поможите, люди добрыя! Решил пофиксить автокомплит при наборе адреса как указано тут http://trac.roundcube.net/changeset/2479. В итоге автокомплит не работает вапще, даже не появляется сообщение о поиске. Вернул старые файлы - как об стенку горох, не запускаецо поиск по книжкам. Все контакты отображаются нормально. Куда копать? Где искать? Как вернуть автокомплит?

Larin
лейтенант
Сообщения: 975
Зарегистрирован: 2008-01-29 20:08:41
Откуда: РБ, Минск

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение Larin » 2009-09-07 16:16:33

поставил 0.3 версию. клево. автокомплит работает нормально даже с кириллицей. только вот когда выбираешь юзеров в адресной книге и жмешь создать сообщение пишет "no contacts found"

CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение CrazyPilot » 2009-09-07 16:32:43

Larin писал(а):жмешь создать сообщение пишет "no contacts found"
Такой же косяк :-(
Хотя если нажать на ссылку в e-mail то работает. Жалко что не работает, тогда можно было бы пачку контактов сразу выбрать и написать им письмо. Хотя не могу представить пользака, который до этого догадается...

Name
рядовой
Сообщения: 47
Зарегистрирован: 2008-08-26 17:44:35

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение Name » 2009-10-08 12:00:37

Подключаюсь к AD (Windows Server 2003)
Работает, но хочется фильтров, чтобы неактивных пользователей убрать

Конфигурация:

Код: Выделить всё

$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);  

CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение CrazyPilot » 2009-10-08 15:26:52

Name писал(а):

Код: Выделить всё

filter'            => '(mail=*)',  
userAccountControl вам в помощь, если это AD конечно =)

Name
рядовой
Сообщения: 47
Зарегистрирован: 2008-08-26 17:44:35

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение Name » 2009-10-09 15:30:10

Спасибо!

Код: Выделить всё

'filter'            => '(&(mail=*)(userAccountControl=512))',  

Аватара пользователя
ExTazZ
рядовой
Сообщения: 27
Зарегистрирован: 2009-05-25 13:46:15
Откуда: Санкт-Петербург
Контактная информация:

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение ExTazZ » 2009-10-15 15:54:16

У меня вот так работает всё на УРА!!! :Yahoo!:

Код: Выделить всё

$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);

gyash
рядовой
Сообщения: 49
Зарегистрирован: 2010-01-19 7:36:53
Откуда: Казахстан Атырау

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение gyash » 2010-05-13 9:17:49

Люди помогите вот мой конфиг круглолуба


// ----------------------------------
// ADDRESSBOOK SETTINGS
// ----------------------------------

// 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'] = 'sql';

// In order to enable public ldap search, configure an array like the Verisign
// example further below. if you would like to test, simply uncomment the example.
$rcmail_config['ldap_public'] = array();

//
// If you are going to use LDAP for individual address books, you will need to
// set 'user_specific' to true and use the variables to generate the appropriate DNs to access it.
//
// The recommended directory structure for LDAP is to store all the address book entries
// under the users main entry, e.g.:
//
// o=root
// ou=people
// uid=user@domain
// mail=contact@contactdomain
//
// So the base_dn would be uid=%fu,ou=people,o=root
// The bind_dn would be the same as based_dn or some super user login.
/*
* 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' => 'gn', // 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=person)(mail=*))', // used for basic listing (if not empty) and will be &'d with search queries. example: status=ac
//'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.
);
*/

// 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('ISKER.KZ','sql');


Перепробовал все что можно, ни чего не работает, не автокомпил не сами контакты. При открытии контактов только персональный адреса. все больше ничего нет.
pkg_info | grep ldap
openldap-client-2.4.22 Open source LDAP client implementation
php5-ldap-5.3.2 The ldap shared extension for php
roundcube-0.4.b,1
apache-2.2.15_4

Домен винда 2008 сервак. через аутлук автокомпиликт не работает. а вот поиск пашет на ура. Хотелось бы и в веб морде тоже сделать.


Помогите плиз.

CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение CrazyPilot » 2010-05-13 10:06:58

У меня работает в таком виде (домен на 2k3 R2)

Код: Выделить всё

$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');
Обратите внимание на порт, 389 у меня тож не работал.
gyash писал(а):Люди помогите вот мой конфиг круглолуба
$rcmail_config['address_book_type'] = 'sql';
Why SQL?
P.S. Пользуйтесь кнопочкой code, здесь это любят

gyash
рядовой
Сообщения: 49
Зарегистрирован: 2010-01-19 7:36:53
Откуда: Казахстан Атырау

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение gyash » 2010-05-13 10:42:02

Код: Выделить всё

[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');
Обратите внимание на порт, 389 у меня тож не работал.
[quote="gyash"]Люди помогите вот мой конфиг круглолуба
$rcmail_config['address_book_type'] = 'sql';
[/quote]

Why SQL?
P.S. Пользуйтесь кнопочкой code, здесь это любят[/quote]
[/code]

Поменял порт все равно не пашет.
$rcmail_config['address_book_type'] = 'sql'; Что тут написать надо?

CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение CrazyPilot » 2010-05-13 10:49:20

Ниасилили английский?

Код: Выделить всё

// 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';

gyash
рядовой
Сообщения: 49
Зарегистрирован: 2010-01-19 7:36:53
Откуда: Казахстан Атырау

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение gyash » 2010-05-13 12:01:13

Код: Выделить всё

[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';
[/quote][/code]

Поставил ldap теперь при автоподборе пишет Ошибка сервера Internal error
а при открытии адреной книги, пишет не обнаруженна страница

CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение CrazyPilot » 2010-05-13 12:07:18

телепатируем содержимое логов web сервака.

gyash
рядовой
Сообщения: 49
Зарегистрирован: 2010-01-19 7:36:53
Откуда: Казахстан Атырау

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение gyash » 2010-05-13 12:39:32

CrazyPilot писал(а):телепатируем содержимое логов web сервака.
[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 operations
[Thu May 13 11:33:32 2010] [error] [client 192.168.15.16] File does not exist: /usr/local/www/roundcube/installer
[Thu May 13 11:33:37 2010] [error] [client 192.168.15.16] File does not exist: /usr/local/www/roundcube/installer
[Thu May 13 11:50:52 2010] [error] [client 192.168.15.253] File does not exist: /usr/local/www/postfixadmin/favicon.ico, referer: http://mail-admin.isker.kz/login.php

вот что в логах апача.

это в логах кгруглолуба
[12-May-2010 18:13:09] PHP Fatal error: Call to a member function set_pagesize() on a non-object in /usr/local/www/roundcube/program/steps/mail/autocomplete.inc on line 43
больше нет ничего

gyash
рядовой
Сообщения: 49
Зарегистрирован: 2010-01-19 7:36:53
Откуда: Казахстан Атырау

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение gyash » 2010-05-13 12:40:18

нету в логах ни слова о том что есть проблемы с лдапом.

CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение CrazyPilot » 2010-05-13 12:58:22

ну хз. Посмотрите в логах круглокуба. Там есть debug level, побольше поставьте. Покажите конфиг круглокуба без камментов.

gyash
рядовой
Сообщения: 49
Зарегистрирован: 2010-01-19 7:36:53
Откуда: Казахстан Атырау

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение gyash » 2010-05-13 13:43:40

Код: Выделить всё

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;

CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение CrazyPilot » 2010-05-13 14:00:21

ммм, как-то хреново грепнулось. Эх, не силен я в регэкспах

Код: Выделить всё

cat main.inc.php | grep -v "^\s*//" | grep -v "^$"

gyash
рядовой
Сообщения: 49
Зарегистрирован: 2010-01-19 7:36:53
Откуда: Казахстан Атырау

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение gyash » 2010-05-13 14:19:40

Код: Выделить всё

<?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;

?>


CrazyPilot
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение CrazyPilot » 2010-05-13 14:26:56

Ну ппц.

Это убрать.

Код: Выделить всё

$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.
);

*/
Оставить только ldap

Код: Выделить всё

$rcmail_config['autocomplete_addressbooks'] = array('ldap','sql');

gyash
рядовой
Сообщения: 49
Зарегистрирован: 2010-01-19 7:36:53
Откуда: Казахстан Атырау

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение gyash » 2010-05-13 14:32:33

Код: Выделить всё

[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.
);

*/
Оставить только ldap

Код: Выделить всё

$rcmail_config['autocomplete_addressbooks'] = array('ldap','sql');
[/quote]
[/code]


Щас попробую
Спасибо за наводку

gyash
рядовой
Сообщения: 49
Зарегистрирован: 2010-01-19 7:36:53
Откуда: Казахстан Атырау

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение gyash » 2010-05-13 14:58:44

Код: Выделить всё

$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
ст. сержант
Сообщения: 321
Зарегистрирован: 2008-08-14 9:17:58
Откуда: Санкт-Петербург
Контактная информация:

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение CrazyPilot » 2010-05-13 15:01:17

:evil:

коменты сверху /* и *, бл@

gyash
рядовой
Сообщения: 49
Зарегистрирован: 2010-01-19 7:36:53
Откуда: Казахстан Атырау

Re: Roundcube + адресная книга LDAP

Непрочитанное сообщение gyash » 2010-05-13 15:09:25

CrazyPilot писал(а)::evil:

коменты сверху /* и *, бл@

Все открылось но контактов там как не было так и нет. и поиск также не работает. Куда дальше смотреть