Closed Bug 1726350 Opened 3 years ago Closed 3 years ago

No address search in LDAP directory when entering in the creation of mail

Categories

(Thunderbird :: Address Book, defect)

Thunderbird 91
defect

Tracking

(thunderbird_esr91+ verified, thunderbird92 affected)

RESOLVED FIXED
93 Branch
Tracking Status
thunderbird_esr91 + verified
thunderbird92 --- affected

People

(Reporter: olivier.mathevon, Assigned: rnons)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0

Steps to reproduce:

Nouveau message
saisie du destinataire

Actual results:

Si le contact ne fait pas partie d'un carnet d'adresse local, il n'apparait pas, même s'il fait partie de l'annuaire LDAP

Expected results:

Des propositions de contacts de l'annuaire LDAP devraient apparaitre lors de la saisie d'un contact lors de la création d'un mail.
Par contre les propositions arrivent bien lors que l'on ouvre les carnets d'adresses, qu'on choisit l'annnuaire LDAP et qu'on saisit dans le champ de re"cherche.

Please use English in buzilla.

Google translate:

Steps to reproduce:

New message
recipient entry

Actual results:

If the contact is not part of a local address book, it does not appear, even if it is part of the LDAP directory

Expected results:

Suggestions for contacts from the LDAP directory should appear when entering a contact when creating an email.
On the other hand the proposals arrive well when one opens the address books, that one chooses the LDAP directory and that one enters in the search field.

Summary: Pas de recherche d'adresse dans annuaire LDAP lors de la saisie dans la creation de mail → No address search in LDAP directory when entering in the creation of mail

Two places to check:

  1. on the global Options page, go to Composition --> Addressing, is Directory Server set to a LDAP directory?
  2. on the Account Settings page, go to Composition & Addressing, is Directory Server set to use the global or a different one?

Of course these options have been verified.
It worked very well with TB 78, but since the update, it doesn’t work anymore. Thank you for your help.

Do you have customized Search Filter in the ldap directory setting? Do you have customized *.autoComplete.filterTemplate pref value?

Here are are the advanced preferences for autocompletion modified (in bold) :
ldap_2.autocomplete.directoryServer ldap_2.servers.xxxxxxx pencil for modify reinit curved arrow
ldap_2.autocomplete.useDirectory true reverse double arrow reinit curved arrow

Please set mailnews.ldap.loglevel to All, open DevTools, trigger an autocomplete in the compose window, see if we can get some debug logs in the Console.

Here is the resutl of the debug console :
mailnews.ldap: Connecting to ldap://xxx.xx-xxx.xx:xxx LDAPClient.jsm:38:18
mailnews.ldap: Connected LDAPClient.jsm:128:18
mailnews.ldap: Binding LDAPClient.jsm:59:18
mailnews.ldap: C: [1] BindRequest LDAPClient.jsm:208:18
mailnews.ldap: S: [1] BindResponse LDAPClient.jsm:166:20
mailnews.ldap: Searching ou=xx-xxx,ou=xxxxx,o=xxx,c=xx LDAPClient.jsm:108:18
mailnews.ldap: C: [2] SearchRequest LDAPClient.jsm:208:18
mailnews.ldap: S: [2] SearchResultDone LDAPClient.jsm:166:20
mailnews.ldap: Connecting to ldap://xxx.xx-xxx.xx:xxx LDAPClient.jsm:38:18
mailnews.ldap: Connected LDAPClient.jsm:128:18
mailnews.ldap: Binding LDAPClient.jsm:59:18
mailnews.ldap: C: [1] BindRequest LDAPClient.jsm:208:18
mailnews.ldap: S: [1] BindResponse LDAPClient.jsm:166:20
mailnews.ldap: Searching ou=xx-xxx,ou=xxxxx,o=xxx,c=xx LDAPClient.jsm:108:18
mailnews.ldap: C: [2] SearchRequest LDAPClient.jsm:208:18
mailnews.ldap: S: [2] SearchResultDone LDAPClient.jsm:166:20
But don’t forget that when I open the address books, point to the one concerning the LDAP and I enter a name in the search bar, I see proposals appear. I don’t think it’s a problem accessing the LDAP, but a problem in the search mode from the mail recipient field (both of them : for, cc or cci).

From the log SearchResultDone is returned without any SearchResultEntry. Too bad I forgot to print out the filter string in the debug log. Do you by any chance have access to the server log?

The LDAP administrator does not find any logs when he uses the recipient search when creating a message with TB 78, and it works.
He will dig a little deeper to find logs when it works on his machine with TB 78 before analyzing the logs when I fail to do so with TB 91.
I'll let you know when I hear back from him.
For information, I tried on my computer a new TB 91 profile: without success.
I tried a first installation of TB 91 on a new PC, and I have the same problems.

I was working on bug 1727478 just now and added search filter to the debug log. Can you follow bug 1727478 comment 4 to download an artifact build?

Sorry, I tried to copy the contents of the folder "target.tar.bz2\target.tar\thunderbird" into "C:Program Files (x86)Mozilla Thunderbird".
Thunderbird doesn't work, I think the artifact is a version for GNU/Linux while I'm under Win10.

My bad, I forgot you're on Windows. Hopefully the fix will go into today's nightly. Then tomorrow you can download a thunderbird-93.0a1.en-US.win64.zip from https://ftp.mozilla.org/pub/thunderbird/nightly/latest-comm-central/. Thanks.

Thanks for the nigthly.
Sorry, but the 93.0a1 does not solve our problem.

Yes it doesn't, I still need you to follow comment 6 to get some logs, but this time the filter string will be included in the log, something like

mailnews.ldap: Searching dn="..." filter="..."

Please provide the logs of autocomplete in compose window and search in addressbook. By comparing them, we may find out why one returns empty but the other works. No need to try now, but wait for the nightly of 26-Aug-2021, thanks.

Here is the log content with TB 93.0a1 :
Relative positioning of table rows and row groups is now supported. This site may need to be updated because it may depend on this feature having no effect. preferences
debuggee 'resource://devtools/shared/base-loader.js:289' would run 2 builtin-modules.js:201:11
uncaught exception: Object
The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page.
mailnews.ldap: Connecting to ldap://annuaire.ac-besancon.fr:389 LDAPClient.jsm:42:18
mailnews.ldap: Connected LDAPClient.jsm:132:18
mailnews.ldap: Binding LDAPClient.jsm:63:18
mailnews.ldap: C: [1] BindRequest LDAPClient.jsm:237:18
mailnews.ldap: S: [1] BindResponse LDAPClient.jsm:179:20
mailnews.ldap: Searching ou=ac-besancon,ou=education,o=gouv,c=fr LDAPClient.jsm:112:18
mailnews.ldap: C: [2] SearchRequest LDAPClient.jsm:237:18
mailnews.ldap: S: [2] SearchResultDone LDAPClient.jsm:179:20
mailnews.ldap: Connecting to ldap://annuaire.ac-besancon.fr:389 LDAPClient.jsm:42:18
mailnews.ldap: Connected LDAPClient.jsm:132:18
mailnews.ldap: Binding LDAPClient.jsm:63:18
mailnews.ldap: C: [1] BindRequest LDAPClient.jsm:237:18
mailnews.ldap: S: [1] BindResponse LDAPClient.jsm:179:20
mailnews.ldap: Searching ou=ac-besancon,ou=education,o=gouv,c=fr LDAPClient.jsm:112:18
mailnews.ldap: C: [2] SearchRequest LDAPClient.jsm:237:18
mailnews.ldap: S: [2] SearchResultDone LDAPClient.jsm:179:20
mailnews.ldap: Connecting to ldap://annuaire.ac-besancon.fr:389 LDAPClient.jsm:42:18
mailnews.ldap: Connected LDAPClient.jsm:132:18
mailnews.ldap: Binding LDAPClient.jsm:63:18
mailnews.ldap: C: [1] BindRequest LDAPClient.jsm:237:18
mailnews.ldap: S: [1] BindResponse LDAPClient.jsm:179:20
mailnews.ldap: Searching ou=ac-besancon,ou=education,o=gouv,c=fr LDAPClient.jsm:112:18
mailnews.ldap: C: [2] SearchRequest LDAPClient.jsm:237:18
mailnews.ldap: S: [2] SearchResultDone LDAPClient.jsm:179:20
mailnews.ldap: Connecting to ldap://annuaire.ac-besancon.fr:389 LDAPClient.jsm:42:18
mailnews.ldap: Connected LDAPClient.jsm:132:18
mailnews.ldap: Binding LDAPClient.jsm:63:18
mailnews.ldap: C: [1] BindRequest LDAPClient.jsm:237:18
mailnews.ldap: S: [1] BindResponse LDAPClient.jsm:179:20
mailnews.ldap: Searching ou=ac-besancon,ou=education,o=gouv,c=fr LDAPClient.jsm:112:18
mailnews.ldap: C: [2] SearchRequest LDAPClient.jsm:237:18
mailnews.ldap: S: [2] SearchResultDone LDAPClient.jsm:179:20
mailnews.ldap: Connection closed 5 LDAPClient.jsm:215:18

Open the nightly you downloaded yesterday, use the Help --> About Daily menu to upgrade to the latest. After restarting the app, search filter will be included in the logs. Please try again, thanks. Please provide the logs of both autocomplete in compose window and search in addressbook.

Here is the logs after update.
First test in compose autocomplete, second search in addressbook :
Error while calling actor 'console's method 'startListeners' JSWindowActorChild.sendAsyncMessage: JSWindowActorChild cannot send at the moment Actor.js:92:13
writeError resource://devtools/shared/protocol/Actor.js:92
handler resource://devtools/shared/protocol/Actor.js:215
DOMException: JSWindowActorChild.sendAsyncMessage: JSWindowActorChild cannot send at the moment Actor.js:99:15
writeError resource://devtools/shared/protocol/Actor.js:99
handler resource://devtools/shared/protocol/Actor.js:215
Error when attaching target:
InvisibleToDebugger: Error { }
target-command.js:189:15
_onTargetAvailable resource://devtools/shared/commands/target/target-command.js:189
InvalidStateError: JSWindowActorChild.sendAsyncMessage: JSWindowActorChild cannot send at the moment DevToolsFrameChild.jsm:431
mailnews.ldap: Connecting to ldap://annuaire.ac-besancon.fr:389 LDAPClient.jsm:43:18
mailnews.ldap: Connected LDAPClient.jsm:144:18
mailnews.ldap: Binding LDAPClient.jsm:64:18
mailnews.ldap: C: [1] BindRequest LDAPClient.jsm:254:18
mailnews.ldap: S: [1] BindResponse resultCode=0 message="" LDAPClient.jsm:191:20
mailnews.ldap: Searching dn="ou=ac-besancon,ou=education,o=gouv,c=fr" filter="(|(cn=f*)(mail=f)(givenName=f)(sn=))" LDAPClient.jsm:124:18
mailnews.ldap: C: [2] SearchRequest LDAPClient.jsm:254:18
mailnews.ldap: S: [2] SearchResultDone resultCode=2 message="Bad search filter" LDAPClient.jsm:191:20
mailnews.ldap: Connecting to ldap://annuaire.ac-besancon.fr:389 LDAPClient.jsm:43:18
mailnews.ldap: Connected LDAPClient.jsm:144:18
mailnews.ldap: Binding LDAPClient.jsm:64:18
mailnews.ldap: C: [1] BindRequest LDAPClient.jsm:254:18
mailnews.ldap: S: [1] BindResponse resultCode=0 message="" LDAPClient.jsm:191:20
mailnews.ldap: Searching dn="ou=ac-besancon,ou=education,o=gouv,c=fr" filter="(|(cn=fa
)(mail=fa)(givenName=fa)(sn=
))" LDAPClient.jsm:124:18
mailnews.ldap: C: [2] SearchRequest LDAPClient.jsm:254:18
mailnews.ldap: S: [2] SearchResultDone resultCode=2 message="Bad search filter" LDAPClient.jsm:191:20
mailnews.ldap: Connecting to ldap://annuaire.ac-besancon.fr:389 LDAPClient.jsm:43:18
mailnews.ldap: Connected LDAPClient.jsm:144:18
mailnews.ldap: Binding LDAPClient.jsm:64:18
mailnews.ldap: C: [1] BindRequest LDAPClient.jsm:254:18
mailnews.ldap: S: [1] BindResponse resultCode=0 message="" LDAPClient.jsm:191:20
mailnews.ldap: Searching dn="ou=ac-besancon,ou=education,o=gouv,c=fr" filter="(|(cn=fai
)(mail=fai)(givenName=fai)(sn=))" LDAPClient.jsm:124:18
mailnews.ldap: C: [2] SearchRequest LDAPClient.jsm:254:18
mailnews.ldap: S: [2] SearchResultDone resultCode=2 message="Bad search filter" LDAPClient.jsm:191:20
mailnews.ldap: Connecting to ldap://annuaire.ac-besancon.fr:389 LDAPClient.jsm:43:18
mailnews.ldap: Connected LDAPClient.jsm:144:18
mailnews.ldap: Binding LDAPClient.jsm:64:18
mailnews.ldap: C: [1] BindRequest LDAPClient.jsm:254:18
mailnews.ldap: S: [1] BindResponse resultCode=0 message="" LDAPClient.jsm:191:20
mailnews.ldap: Searching dn="ou=ac-besancon,ou=education,o=gouv,c=fr" filter="(|(cn=faiv
)(mail=faiv)(givenName=faiv)(sn=
))" LDAPClient.jsm:124:18
mailnews.ldap: C: [2] SearchRequest LDAPClient.jsm:254:18
mailnews.ldap: S: [2] SearchResultDone resultCode=2 message="Bad search filter" LDAPClient.jsm:191:20
mailnews.ldap: Connecting to ldap://annuaire.ac-besancon.fr:389 LDAPClient.jsm:43:18
mailnews.ldap: Connected LDAPClient.jsm:144:18
mailnews.ldap: Binding LDAPClient.jsm:64:18
mailnews.ldap: C: [1] BindRequest LDAPClient.jsm:254:18
mailnews.ldap: S: [1] BindResponse resultCode=0 message="" LDAPClient.jsm:191:20
mailnews.ldap: Searching dn="ou=ac-besancon,ou=education,o=gouv,c=fr" filter="(|(cn=faivr
)(mail=faivr)(givenName=faivr)(sn=**))" LDAPClient.jsm:124:18
mailnews.ldap: C: [2] SearchRequest LDAPClient.jsm:254:18
mailnews.ldap: S: [2] SearchResultDone resultCode=2 message="Bad search filter" LDAPClient.jsm:191:20
debuggee 'resource://devtools/shared/base-loader.js:289' would run 2 builtin-modules.js:201:11
Security Error: Content at chrome://global/skin/search-textbox.css may not load or link to resource://gre-resources/searchfield-cancel.svg.
mailnews.ldap: Connecting to ldap://annuaire.ac-besancon.fr:389 LDAPClient.jsm:43:18
mailnews.ldap: Connected LDAPClient.jsm:144:18
mailnews.ldap: Binding LDAPClient.jsm:64:18
mailnews.ldap: C: [1] BindRequest LDAPClient.jsm:254:18
mailnews.ldap: S: [1] BindResponse resultCode=0 message="" LDAPClient.jsm:191:20
mailnews.ldap: Searching dn="ou=ac-besancon,ou=education,o=gouv,c=fr" filter="(&(|(cn=faiv)(givenName=faiv)(sn=faiv)(mozillaNickname=faiv)(mail=faiv)(mozillaSecondEmail=faiv)(&(null=TRUE)(description=faiv))(o=faiv)(ou=faiv)(title=faiv)(mozillaWorkUrl=faiv)(mozillaHomeUrl=faiv)))" LDAPClient.jsm:124:18
mailnews.ldap: C: [2] SearchRequest LDAPClient.jsm:254:18
mailnews.ldap: S: [2] SearchResultEntry <empty string> 100 LDAPClient.jsm:191:20
mailnews.ldap: S: [2] SearchResultDone resultCode=4 message="" LDAPClient.jsm:191:20
<Provider> does not support changing store on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/reactjs/react-redux/releases/tag/v2.0.0 for the migration instructions. react-redux.js:881:13
Redux 3
React 38
renderApp resource://devtools/client/webconsole/webconsole-wrapper.js:41
init resource://devtools/client/webconsole/webconsole-wrapper.js:121
init resource://devtools/client/webconsole/webconsole-wrapper.js:85
_initializer resource://devtools/client/webconsole/webconsole-ui.js:162
debuggee 'resource://devtools/shared/base-loader.js:289' would run 2 builtin-modules.js:201:11

Thanks, seems your LDAP server doesn't like the filter string. I need you to do another test:

  1. Find the key of your ldap addressbok. Open Config Editor, search for ldap_2.servers.*.description, the * part is the addressbook key. For example, my addressbook name is test, so I see ldap_2.servers.ldap.description test in the Config Editor, ldap is my key
  2. Stay in the Config Editor, add an entry named ldap_2.servers.<your-key>.autoComplete.filterTemplate, with value (|(cn=*%v1*%v2-*)(mail=*%v*)(givenName=*%v1*)(sn=*))
  3. Open a compose window, type f to the To field, see if there is any result, if not, show me the log. Please use markdown syntax to wrap the logs in three backticks (```), so that * is preserved.

Sorry, for the second step, please set the value to (|(cn=*%v1*%v2-*)(mail=*%v*)(givenName=*%v1*)(sn=*%v*))

Some servers don't like (sn=**) filter.

Assignee: nobody → remotenonsense
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Regressed by: 1626944

Great!
Your solution now allows to find entries in the LDAP directory when creating mails.
And it also works when inviting people to events in the calendar since it is at the level of the search filter in the LDAP.
Please let me know when a next release will include this filtering when creating an LDAP address book.
Thanks again for your help.

Target Milestone: --- → 93 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/1e0111fdbd87
Fix the default filterTemplate for LDAP autocomplete. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Comment on attachment 9238290 [details]
Bug 1726350 - Fix the default filterTemplate for LDAP autocomplete. r=darktrojan

[Approval Request Comment]
Regression caused by (bug #): bug 1626944
User impact if declined: LDAP autocompletion doesn't work for some servers
Testing completed (on c-c, etc.): c-c
Risk to taking this patch (and alternatives if risky): low

Attachment #9238290 - Flags: approval-comm-esr91?
Attachment #9238290 - Flags: approval-comm-beta?

Comment on attachment 9238290 [details]
Bug 1726350 - Fix the default filterTemplate for LDAP autocomplete. r=darktrojan

[Triage Comment]
Merge is next Monday, so this will be in 93 beta. And thereafter good for 91.1.1 or 91.1.2.

Attachment #9238290 - Flags: approval-comm-beta? → approval-comm-beta-

Comment on attachment 9238290 [details]
Bug 1726350 - Fix the default filterTemplate for LDAP autocomplete. r=darktrojan

[Triage Comment]
Approved for esr91

Attachment #9238290 - Flags: approval-comm-esr91? → approval-comm-esr91+
Blocks: tb91found

confirmed working in 91.1.1

i also confirmed working in 91.1.1

I also confirm that it's functional in 91.1.1
Many thanks for your help.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: