1

Topic: Ired + Samba 4.2.1

==== 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:
====

Hi,
I tested ired + m$ active directory, to day i want to integrate ired + samba4 domain.
.
i can login to mail server with domain account using thunder bird, webmail.
i can send mail success but not get mail to inbox..
In web mail, when i type word "to" box error :

An error occurred!
close
Application Error (700): Addressbook source (example.com) not found!

all config files:
/etc/postfix/ad_sender_login_maps.cf

server_host     = dc2.endorbegin.local
server_port     = 389
version         = 3
bind            = yes
start_tls       = no
bind_dn         = vmail@endorbegin.local
bind_pw         = P@$$w0rd
search_base     = cn=users,dc=endorbegin,dc=local
scope           = sub
#query_filter    = (&(userPrincipalName=%s)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
# Modified settings.
query_filter    = (&(userPrincipalName=%u@endorbegin.local)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
result_attribute= userPrincipalName
debuglevel      = 1

/etc/postfix/ad_virtual_mailbox_maps.cf

server_host     = dc1.endorbegin.local
server_port     = 389
version         = 3
bind            = yes
start_tls       = no
bind_dn         = vmail@endorbegin.local
bind_pw         = P@$$w0rd
search_base     = cn=users,dc=endorbegin,dc=local
scope           = sub
#query_filter    = (&(objectclass=person)(userPrincipalName=%s))
query_filter    = (&(objectClass=person)(sAMAccontName=%s))
result_attribute= userPrincipalName
result_format   = %d/%u/Maildir/
debuglevel      = 0

/etc/postfix/ad_virtual_group_maps.cf

server_host     = dc1.endorbegin.local
server_port     = 389
version         = 3
bind            = yes
start_tls       = no
bind_dn         = vmail@endorbegin.local
bind_pw         = P@$$w0rd
search_base     = cn=users,dc=endorbegin,dc=local
scope           = sub
#query_filter    = (&(objectClass=group)(mail=%s))
query_filter    = (&(objectClass=group)(sAMAccountName=%u))
special_result_attribute = member
leaf_result_attribute = mail
result_attribute= userPrincipalName
debuglevel      = 0

/etc/dovecot/dovecot-ldap.conf

osts           = dc1.endorbegin.local:389
ldap_version    = 3
auth_bind       = yes
dn              = vmail@endorbegin.local
dnpass          = P@$$w0rd
base            = cn=users,dc=endorbegin,dc=local
scope           = subtree
deref           = never
#user_filter     = (&(userPrincipalName=%u)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
#pass_filter     = (&(userPrincipalName=%u)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
# Modified settings.
user_filter     = (&(userPrincipalName=%n@endorbegin.local)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
pass_filter     = (&(userPrincipalName=%n@endorbegin.local)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
pass_attrs      = userPassword=password
default_pass_scheme = CRYPT
user_attrs      = =home=/var/vmail/vmail1/%Ld/%Ln/Maildir/,=mail=maildir:/var/vmail/vmail1/%Ld/%Ln/Maildir/

Ldap address book on /var/www/roudcube/config/config.inc.php

#
# "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", "example.com");

#
# Global LDAP Address Book with AD.
#
$config['ldap_public']["global_ldap_abook"] = array(
    'name'          => 'Global LDAP Address Book',
    'hosts'         => array("dc1.endorbegin.local"),      // <- 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=endorbegin,dc=local", // <- Set base dn in AD
    'bind_dn'       => "vmail@endorbegin.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
);

/var/log/mailog

May 28 16:01:38 mail postfix/error[1610]: 60DE042AFD: to=<test1@endorbegin.local>, relay=none, delay=1041, delays=1041/0.16/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
May 28 16:06:38 mail postfix/qmgr[1425]: 3CEE542AEF: from=<eob1@endorbegin.local>, size=1845, nrcpt=1 (queue active)
May 28 16:06:39 mail postfix/qmgr[1425]: warning: connect to transport private/dovecot                                                                   TRANSPORT(5): No such file or directory
May 28 16:06:39 mail postfix/error[1627]: 3CEE542AEF: to=<thai1@endorbegin.local>, relay=none, delay=1877, delays=1877/0.33/0/0.1, dsn=4.3.0, status=deferred (mail transport unavailable)
May 28 16:13:10 mail roundcube: <3kg4qvgk> PHP Error: Addressbook source (example.com) not found! in /var/www/roundcubemail-1.1.1/program/include/rcmail.php on line 252 (POST /mail/?_task=mail&_action=autocomplete?_task=&_action=)
May 28 16:21:38 mail postfix/qmgr[1425]: C037142AF5: from=<thai1@endorbegin.local>, size=1861, nrcpt=1 (queue active)
May 28 16:21:38 mail postfix/qmgr[1425]: warning: connect to transport private/dovecot                                                                   TRANSPORT(5): No such file or directory
May 28 16:21:38 mail postfix/qmgr[1425]: 60DE042AFD: from=<thai1@endorbegin.local>, size=1856, nrcpt=1 (queue active)
May 28 16:21:38 mail postfix/error[1698]: C037142AF5: to=<test1@endorbegin.local>, relay=none, delay=2382, delays=2381/0.15/0/0.08, dsn=4.3.0, status=deferred (mail transport unavailable)
May 28 16:21:38 mail postfix/error[1699]: 60DE042AFD: to=<test1@endorbegin.local>, relay=none, delay=2241, delays=2241/0.12/0/0.03, dsn=4.3.0, status=deferred (mail transport unavailable)

and nothing mail in maibox directory folder!

tks zhang

----

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

2

Re: Ired + Samba 4.2.1

Why integrate Active Directory with Samba? What for?

3

Re: Ired + Samba 4.2.1

ZhangHuangbin wrote:

Why integrate Active Directory with Samba? What for?


I want to integrate opensource system with sso authen.