1

Topic: Cannot connect to LDAP Server

==== Required information ====
- iRedMail version: iRedmail 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Linux Ubuntu
- Related log if you're reporting an issue:
====

Hi,

I have 3 server, server no.1 is for iredmail service (pop3/imap/smtp), server no.2 is for ldap and mysql server, and server no.3 is for shared storage/nfs storage

I have problem with authenticating user from iredmail to ldap server, I have copy iredmail.schema and amavis.schema to ldap server. I found this on dovecot error log

Nov 18 08:23:57 auth: Error: LDAP: binding failed (dn cn=vmail,dc=mailexample,dc=com): Invalid credentials

and I use private IP to connect from iredmail to ldap server,  bellow is the dovecot configuration

hosts           = 192.168.12.48:389
ldap_version    = 3
auth_bind       = yes
dn              = cn=vmail,dc=mailexample,dc=com
dnpass          = Xfm5EOje91nNwHVzNh8xcClj3YQAbI
base            = o=domains,dc=mailexample,dc=com
scope           = subtree
deref           = never

Is there something wrong with my config in iredmail or ldap server ?

thanks

----

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

2

Re: Cannot connect to LDAP Server

nitrixhost wrote:

Nov 18 08:23:57 auth: Error: LDAP: binding failed (dn cn=vmail,dc=mailexample,dc=com): Invalid credentials

LDAP error message "Invalid credentials" always means you're using incorrect bind dn OR bind password. Please fix it first.

3

Re: Cannot connect to LDAP Server

Hi Zhang,

I use the setting as same as iredmail installation

Below is from iredmail.tips

OpenLDAP:
    * LDAP suffix: dc=mailexample,dc=com
    * LDAP root dn: cn=Manager,dc=mailexample,dc=com, password: blabla
    * LDAP bind dn (read-only): cn=vmail,dc=mailexample,dc=com, password: Xfm5EOje91nNwHVzNh8xcClj3YQAbI
    * LDAP admin dn (used for iRedAdmin): cn=vmailadmin,dc=mailexample,dc=com, password: JKP1a1gIpJTeKty9YQBlxl8OvmNXsq
    * LDAP base dn: o=domains,dc=mailexample,dc=com
    * LDAP admin base dn: o=domainAdmins,dc=mailexample,dc=com

and the dovecot is same but only ip adress point to ldap server

hosts           = 192.168.12.48:389
ldap_version    = 3
auth_bind       = yes
dn              = cn=vmail,dc=mailexample,dc=com
dnpass          = Xfm5EOje91nNwHVzNh8xcClj3YQAbI
base            = o=domains,dc=mailexample,dc=com
scope           = subtree
deref           = never

thanks

4

Re: Cannot connect to LDAP Server

Did you import the same LDAP accounts on remote ldap server? If not, then obviously it has different bind dn/password.
Please do a simple test.