stalwartlabs / mail-server

Secure & Modern All-in-One Mail Server (IMAP, JMAP, POP3, SMTP)
https://stalw.art
3.55k stars 135 forks source link

[bug]: Active Directory integration #456

Closed flover97 closed 1 month ago

flover97 commented 1 month ago

What happened?

When integrating with Active Directory, user groups appear in accounts instead of the groups section. The user does not fill in any fields except Login name. The standard Base DN format does not work in the directory settings section(like "CN=vmail,OU=Service,OU=Support,OU=OFFICE-CO,DC=co,DC=local" only username@domain.local).

Stalwart mail-server version: 0.8.0 Debian 11 x64

Users list after ldap auth: изображение User details: изображение Group list after ldap auth: изображение

How can we reproduce the problem?

Directory settings: изображение

Version

v0.7.x

What database are you using?

PostgreSQL

What blob storage are you using?

Filesystem

Where is your directory located?

LDAP

What operating system are you using?

Linux

Relevant log output

LDAP entry context="ldap" event="fetch_principal" entry=SearchEntry { dn: "CN=Герасименко Георгий,OU=IT отдел,OU=Minsk,OU=Company-Name,OU=OFFICE-CO,DC=co,DC=local", attrs: {"memberOf": ["CN=mail,CN=Users,DC=co,DC=local", "CN=GR_VPN_FULL,CN=Users,DC=co,DC=local", "CN=GR_Cloud,CN=Users,DC=co,DC=local", "CN=Администраторы схемы,CN=Users,DC=co,DC=local", "CN=Администраторы домена,CN=Users,DC=co,DC=local", "CN=Администраторы,CN=Builtin,DC=co,DC=local", "CN=Администраторы предприятия,CN=Users,DC=co,DC=local"], "objectClass": ["top", "person", "organizationalPerson", "user"], "mail": ["georgiy.gerasimenko@co.local"], "description": ["123"]}, bin_attrs: {} }

Code of Conduct

mdecimus commented 1 month ago

Hi, this is not a bug. The account management page only works for the internal directory, what you are seeing is a list of internal mappings. When using an external directory you need to manage your users from your directory instead.

flover97 commented 1 month ago

Hi, this is not a bug. The account management page only works for the internal directory, what you are seeing is a list of internal mappings. When using an external directory you need to manage your users from your directory instead.

hi, I’m not trying to edit it, but as I understand, the fields in the user properties should be filled in from the ldap attributes, but they are not filled in.

mdecimus commented 1 month ago

You can safely ignore what is listed there. The list just contains mappings of LDAP entries to internal ids and nothing else is retrieved.