Mailtrain-org / mailtrain

Self hosted newsletter app
GNU General Public License v3.0
5.51k stars 693 forks source link

v2 LDAP Support #590

Closed bbraganca closed 6 months ago

bbraganca commented 5 years ago

Hi all, does anyone have a step-by-step to configure AD/LDAP authentication on the v2?

Thanks in advance.

Charlo270398 commented 5 years ago

In my case I did this for LDAP:

  1. Install Apache Directory Studio.
  2. Install ldapauth/ldapjs packages if you don't have installed yet (go to mailtrain main folder and execute npm install ldapauth/ npm install ldapjs)
  3. Start Apache Directory Studio service (service apacheds start)
  4. Configure LDAP in default.yaml file. My current config is this:

imagen

  1. Restart Mailtrain service
  2. Open a new connection in Apache Directory Studio (use parameters used in default.yaml) In my config BindDN/user is uid=admin, ou=system (introduce this literally in authentication step) and bindPassword is secret.
  3. Then you can create domains and users into the root folder. In my case my folders structure is:

imagen

Users use inetOrgPerson class and domains use domain(structural) class. In my case, users are identified by uid field. I added a password for each user adding a userPassword field. Users must accomplish filter requirements.

  1. Try to login.

Note that right now if you try to login an user that doesn't exists in the BD you won't login, so add this user before using LDAP. I'm trying to solve this issue.

rbicelli commented 4 years ago

Are multiple LDAP Domains supported?

talheim-it commented 3 years ago

@rbicelli I don't think multi ldap is supported yet.

I need to digg into the code and look. But I look for testing and document ldap in v2.

talheim-it commented 6 months ago

We are going to start with the development and testing of mailtrain v3 in the next weeks.

You are welcome to help us with the testing as soon as the first release candidate is available.