1 (edited by vietthai23 2015-05-25 14:49:09)

Topic: ired Authen MS Active Directory

==== Required information ====
- iRedMail version: 0.9.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Linux/BSD distribution name and version: CentOS 6.5 x64
- Related log if you're reporting an issue: Roudcube : CONFIGURATION ERROR

config.inc.php was not found.
Please read the INSTALL instructions!
====

Hi, i see http://www.iredmail.org/docs/active.directory.html
and success, but 1 error in web mail. i can connect server with thunderbird,... but not webmail.
help me pls,

sorry for bad english.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: ired Authen MS Active Directory

vietthai23 wrote:

Roudcube : CONFIGURATION ERROR
config.inc.php was not found.
Please read the INSTALL instructions!

Did you configure /var/www/roundcubemail/config/config.inc.php?

3 (edited by vietthai23 2015-05-25 23:05:42)

Re: ired Authen MS Active Directory

ZhangHuangbin wrote:
vietthai23 wrote:

Roudcube : CONFIGURATION ERROR
config.inc.php was not found.
Please read the INSTALL instructions!

Did you configure /var/www/roundcubemail/config/config.inc.php?

yeah, i configured.

my file.

<?php

// SQL DATABASE
$config['db_dsnw'] = 'mysqli://roundcube:Kil1VCMdklArOb3QDlrlu3VU9fXv5M@127.0.0.1/roundcubemail';

// LOGGING
$config['log_driver'] = 'syslog';
$config['syslog_facility'] = LOG_MAIL;

// IMAP
$config['default_host'] = '127.0.0.1';
$config['default_port'] = 143;
$config['imap_auth_type'] = 'LOGIN';
$config['imap_delimiter'] = '/';
// Required if you're running PHP 5.6
$config['imap_conn_options'] = array(
    'ssl' => array(
        'verify_peer'  => false,
        'verify_peer_name' => false,
    ),
);

// SMTP
$config['smtp_server'] = 'tls://127.0.0.1';
$config['smtp_port'] = 587;
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['smtp_auth_type'] = 'LOGIN';
// Required if you're running PHP 5.6
$config['smtp_conn_options'] = array(
    'ssl' => array(
        'verify_peer'      => false,
        'verify_peer_name' => false,
    ),
);

// Use user's identity as envelope sender for 'return receipt' responses,
// otherwise it will be rejected by iRedAPD plugin `reject_null_sender`.
$config['mdn_use_from'] = true;

// SYSTEM
$config['force_https'] = true;
$config['login_autocomplete'] = 2;
$config['ip_check'] = true;
$config['des_key'] = 'ZeHpeULeLvQvWOcs27qVQn35';
$config['useragent'] = 'Roundcube Webmail'; // Hide version number
//$config['username_domain'] = 'end.local';
$config['mime_types'] = '/etc/mime.types';

// USER INTERFACE
$config['create_default_folders'] = true;
$config['quota_zero_as_unlimited'] = true;

// USER PREFERENCES
$config['default_charset'] = 'UTF-8';
//$config['addressbook_sort_col'] = 'name';
$config['draft_autosave'] = 60;
$config['preview_pane'] = true;
$config['default_list_mode'] = 'threads';
$config['autoexpand_threads'] = 2;
$config['check_all_folders'] = true;
$config['default_font_size'] = '12pt';
$config['message_show_email'] = true;

// PLUGINS
$config['plugins'] = array('managesieve', 'password');

#
# "sql" is personal address book stored in roundcube database.
# "example.com" is new LDAP address book with AD, we will create it below.
#
$config['autocomplete_addressbooks'] = array('sql', 'global_ldap_abook');

#
# Global LDAP Address Book with AD.
#
$config['ldap_public']["global_ldap_abook"] = array(
    'name'          => 'Global LDAP Address Book',
    'hosts'         => array('10.0.2.10'),      // <- Set AD hostname or IP address here.
    'port'          => 389,
    'use_tls'       => false,   // <- Set to true if you want to use LDAP over TLS.
    'ldap_version'  => '3',
    'network_timeout' => 10,
    'user_specific' => false,

    'base_dn'       => "CN=Users,DC=end,DC=local", // <- Set base dn in AD
    'bind_dn'       => "vmail@end.local",                      // <- bind dn
    'bind_pass'     => "P@$$w0rd",          // <- bind password
    'writable'      => false,                        // <- Do not allow mail user write data back to AD.

    'search_fields' => array('mail', 'cn', 'sAMAccountName', 'displayname', 'sn', 'givenName'),

    // mapping of contact fields to directory attributes
    'fieldmap' => array(
        'name'        => 'cn',
        'surname'     => 'sn',
        'firstname'   => 'givenName',
        'title'       => 'title',
        'email'       => 'mail:*',
        'phone:work'  => 'telephoneNumber',
        'phone:mobile' => 'mobile',
        'street'      => 'street',
        'zipcode'     => 'postalCode',
        'locality'    => 'l',
        'department'  => 'departmentNumber',
        'notes'       => 'description',
        'name'        => 'cn',
        'surname'     => 'sn',
        'firstname'   => 'givenName',
        'title'       => 'title',
        'email'       => 'mail:*',
        'phone:work'  => 'telephoneNumber',
        'phone:mobile' => 'mobile',
        'phone:workfax' => 'facsimileTelephoneNumber',
        'street'      => 'street',
        'zipcode'     => 'postalCode',
        'locality'    => 'l',
        'department'  => 'departmentNumber',
        'notes'       => 'description',
        'photo'       => 'jpegPhoto',
    ),
    'sort'          => 'cn',
    'scope'         => 'sub',
    //'filter'        => "(&(objectclass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))",
    'filter'        => "(mail=*@*)",
    'fuzzy_search'  => true,
    'vlv'           => false,   // Enable Virtual List View to more efficiently fetch paginated data (if server supports it)
    'sizelimit'     => '0',     // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
    'timelimit'     => '0',     // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
    'referrals'     => false,  // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups
);

thankyou very much.

4

Re: ired Authen MS Active Directory

Any related error message in /var/log/maillog when you access Roundcube webmail?

5

Re: ired Authen MS Active Directory

tks Zhang,
nothing in /var/log/mailog when client access roudcube !

6

Re: ired Authen MS Active Directory

vietthai23 wrote:

Roudcube : CONFIGURATION ERROR
config.inc.php was not found.

Please show me output of below commands:

# ls -l /var/www/
# ls -l /var/www/roundcubemail/
# ls -l /var/www/roundcubemail/config/

7

Re: ired Authen MS Active Directory

# ls -l /var/www/

total 24
drwxr-xr-x  2 root      root      4096 Oct 16  2014 cgi-bin
drwxr-xr-x  3 root      root      4096 May 24 16:33 error
drwxr-xr-x  2 root      root      4096 May 24 16:34 html
drwxr-xr-x  3 root      root      4096 May 24 16:34 icons
lrwxrwxrwx  1 root      root        24 May 24 16:34 iredadmin -> /var/www/iRedAdmin-0.4.2
dr-xr-xr-x  9 iredadmin iredadmin 4096 May 24 16:34 iRedAdmin-0.4.2
lrwxrwxrwx  1 root      root        28 May 24 16:34 roundcubemail -> /var/www/roundcubemail-1.1.1
drwxr-xr-x 12 root      root      4096 May 26 11:53 roundcubemail-1.1.1

# ls -l /var/www/roundcubemail/

total 248
drwxr-xr-x  2 root   root     4096 May 24 16:34 bin
----------  1 root   root   125558 Mar 17 03:54 CHANGELOG
-rw-r--r--  1 root   root     1547 Mar 17 03:54 composer.json-dist
drwxr-xr-x  2 root   root     4096 May 26 12:22 config
-rw-r--r--  1 root   root     1290 Mar 17 03:54 Dockerfile
-rw-r--r--  1 root   root    12323 Mar 17 03:54 index.php
----------  1 root   root     9049 Mar 17 03:54 INSTALL
d---------  3 root   root     4096 May 24 16:34 installer
----------  1 root   root    35147 Mar 17 03:54 LICENSE
drwxr-xr-x  2 apache apache   4096 May 24 23:57 logs
drwxr-xr-x 34 root   root     4096 May 24 16:34 plugins
drwxr-xr-x  8 root   root     4096 May 24 16:34 program
----------  1 root   root     3750 Mar 17 03:54 README.md
-rw-r--r--  1 root   root       26 Mar 17 03:54 robots.txt
drwxr-xr-x  4 root   root     4096 May 24 16:34 skins
d---------  7 root   root     4096 May 24 16:34 SQL
drwxr-xr-x  2 apache apache   4096 May 24 16:34 temp
----------  1 root   root     3403 Mar 17 03:54 UPGRADING
drwxr-xr-x  9 root   root     4096 Mar 17 03:54 vendor

# ls -l /var/www/roundcubemail/config/

total 84
-rw------- 1 root   root    4756 May 26 12:20 config.inc.php
-rwx---rwx 1 apache apache  5043 May 24 16:34 config.inc.php.back
-rw------- 1 root   root    4769 May 25 12:48 config.inc.php.back.1
-rw-r--r-- 1 root   root    3908 Mar 17 03:54 config.inc.php.sample
-rw-r--r-- 1 root   root   48592 Mar 17 03:54 defaults.inc.php
-rw------- 1 apache apache   158 May 24 16:34 dovecot.sieve
-rw-r--r-- 1 root   root    2815 Mar 17 03:54 mimetypes.php

pls.

8

Re: ired Authen MS Active Directory

vietthai23 wrote:

-rw------- 1 root   root    4756 May 26 12:20 config.inc.php

File /var/www/roundcubemail/config/config.inc.php should be owned by apache:apache. After this fix, Roundcube should work as expected.

9

Re: ired Authen MS Active Directory

ZhangHuangbin wrote:
vietthai23 wrote:

-rw------- 1 root   root    4756 May 26 12:20 config.inc.php

File /var/www/roundcubemail/config/config.inc.php should be owned by apache:apache. After this fix, Roundcube should work as expected.

Woa, im very happy, tks so much zhang, its worked.
Have nice day.