nextcloud / nextcloud/mail

mail app not searching receipents from ldap when sending email

Open
#8,977 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. to triage bug
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Steps to reproduce

1.open mail app, select new message, From field is auto populated, To field is empty
2.type a few letters in To field
3.mail app should search system address book (accounts, nextcloud users)
4.mail app is not recommending receipents from ldap email addreses

Expected behavior

Mail app should recommend receipents groups and email addresses from LDAP)

Actual behavior

Mail app cannot find email addreses from LDAP / AD

Mail app version

3.4.2

Mailserver or service

No response

Operating system

Ubuntu 22

PHP engine version

PHP 8.0

Web server

Nginx

Database

MySQL

Additional info

When typing in To field mail app queries LDAP but searches for only objectclass=group, it sould query person too.
Below is a line from debug log when typing "tosearch" chars in the To field of New Message dialog.

Calling LDAP function ldap_search with parameters [{},"ou=some ou,dc=domain,dc=tld","(&(&(|(objectclass=group)))(|(cn=tosearch@)(cn=tosearch@*)))",["cn","dn"],0,0,-1,0,[{"oid":"1.2.840.113556.1.4.319","value":{"size":500,"cookie":""},"iscritical":false}]]","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 OPR/103.0.0.0","version":"27.1.1.0","data":{"app":"user_ldap"}

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the mail app's recipient search entry point and trace the LDAP search shown in the debug log, including the user_ldap integration. Verify how the LDAP filter handles groups and people, then test that LDAP or AD users, groups, and email addresses are recommended when typing in the To field.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.