Error LDAP request in new message DavMail 6.0.0-3375
Brought to you by:
mguessan
Good day! Thunderbird 91.0.1 (64 bit), DavMail 6.0.0-3375 (64 bit), Windows 10 (64 bit), MS Exchange Server 2007 SP1 - when creating a new message and dialing the recipient's address, an error appears and the recipient's address cannot be found (in DavMail 5.5.1 there was no such error):
2021-08-20 09:25:37,728 DEBUG [LdapConnection-61267] davmail - LOG_LDAP_REQ_BIND Success
2021-08-20 09:25:37,732 DEBUG [LdapConnection-61267-Search-2] davmail - LDAP_REQ_SEARCH 2 base=ou=people scope: 2 sizelimit: 100 timelimit: 0 filter: (|(sn=)(cn=*nurg*)(mail=*nurg*)(givenname=*nurg*)) returning attributes: []
2021-08-20 09:25:37,802 DEBUG [LdapConnection-61267-Search-2] davmail.exchange.ews.EWSMethod - The request failed schema validation: The 'http://schemas.microsoft.com/exchange/services/2006/messages:UnresolvedEntry' element is invalid - The value '' is invalid according to its datatype 'http://schemas.microsoft.com/exchange/services/2006/types:NonEmptyStringType' - The actual length is less than the MinLength value.
2021-08-20 09:25:37,802 ERROR [LdapConnection-61267-Search-2] davmail - The request failed schema validation: The 'http://schemas.microsoft.com/exchange/services/2006/messages:UnresolvedEntry' element is invalid - The value '' is invalid according to its datatype 'http://schemas.microsoft.com/exchange/services/2006/types:NonEmptyStringType' - The actual length is less than the MinLength value.
If you search for a recipient through the Thunderbird Address Book, there is no error, the search is successful:
2021-08-20 09:25:23,667 DEBUG [LdapConnection-61261-Search-2] davmail - LDAP_REQ_SEARCH 2 base=ou=people scope: 2 sizelimit: 100 timelimit: 0 filter: (&(|(sn=*nurg*)(&(description=*nurg*)(null=TRUE))(o=*nurg*)(mail=*nurg*)(givenname=*nurg*)(mozillaworkurl=*nurg*)(title=*nurg*)(ou=*nurg*)(mozillahomeurl=*nurg*)(cn=*nurg*)(mozillanickname=*nurg*)(mozillasecondemail=*nurg*))) returning attributes: []
2021-08-20 09:25:23,668 DEBUG [LdapConnection-61261-Search-2] davmail - Unknown attribute: null
2021-08-20 09:25:23,946 DEBUG [LdapConnection-61261-Search-2] davmail.exchange.ExchangeSession - ResolveNames(nurg) returned 11 results
2021-08-20 09:25:23,989 DEBUG [LdapConnection-61261-Search-2] davmail.exchange.ExchangeSession - ResolveNames(nurg) returned 11 results
2021-08-20 09:25:24,027 DEBUG [LdapConnection-61261-Search-2] davmail.exchange.ExchangeSession - ResolveNames(smtp:nurg) returned 9 results
2021-08-20 09:25:24,071 DEBUG [LdapConnection-61261-Search-2] davmail.exchange.ExchangeSession - ResolveNames(nurg) returned 11 results
2021-08-20 09:25:24,117 DEBUG [LdapConnection-61261-Search-2] davmail.exchange.ExchangeSession - ResolveNames(nurg) returned 11 results
2021-08-20 09:25:24,163 DEBUG [LdapConnection-61261-Search-2] davmail.exchange.ExchangeSession - ResolveNames(nurg) returned 11 results
2021-08-20 09:25:24,163 DEBUG [LdapConnection-61261-Search-2] davmail - LDAP_REQ_SEARCH 2 found 11 results
Please see what the problem is.
Thanks
I have been observing the exact same problem. It happens when the LDAP query has "sn" equal to nothing (empty string). DavMail makes an invalid request to EWS that has the "UnresolvedEntry" element left empty.
In Thunderbird, this problem happens when composing an email when I start typing someone's first name in the To field the press CTRL+space to try to autocomplete the address. However, if I instead type the first name then a space and then part of the last name then press CTRL+space then the error does not happen. The LDAP request made by Thunderbird has "sn" set to some non-empty string in that case.
I believe DavMail needs to be fixed so that it does not make requests to EWS with empty "UnresolvedEntry" element.