tasansga / haraka-ldap

Developing LDAP plugins for Haraka
MIT License
5 stars 6 forks source link

multi domain ldap #3

Closed ekozan closed 7 years ago

ekozan commented 7 years ago

Hello

First i'm fucking noob with ldap 👿

I can't figure how to setup auth and alias for multi domain ldap

my ldap look like

Org
--Ou: Hosting
---Ou: domain.com
----Ou:Alias
----Ou:People
-----Cn: JonDoe
-----Cn: JonDoe2
-----Cn: JonDoe3
-----Cn: JonDoe4
---Ou: domain.fr
----Ou:Alias
----Ou:People
-----Cn: JaneDoe
-----Cn: JaneDoe2
-----Cn: JaneDoe3
-----Cn: JaneDoe4

I can do this dn[] = cn=%u,ou=people,ou=domain.com,ou=hosting,dc=eko,dc=ovh dn[] = cn=%u,ou=people,ou=domain.fr,ou=hosting,dc=eko,dc=ovh

But i whant somme thing automatic :/

dn[] = cn=%u,ou=people,ou=%d,ou=hosting,dc=eko,dc=ovh ?? :D

Any advice ? need to modify your plugin ?

tasansga commented 7 years ago

This plugin supports several multi-domain LDAP scenarios.

Your question is somewhat unclear to me though. Users log in with their credentials, and there isn't a "domain" in the credentials, just name and password. (The name doesn't necessarily contain a domain part.) Also, I do not see what addresses you want to use and to aliase (and to aliase by what).

So, for just authn: Simply use a DN search filter to look up the proper user CN. Check "[authn] By search" in Examples for how to do this.

Join #haraka on freenode IRC if you're feeling stuck.